Heim  >  Artikel  >  Backend-Entwicklung  >  淘宝客click链接转换不了,有没有人做过淘宝客的 研究好几天了 还是不行 大家来帮帮我 可送Q币或话费

淘宝客click链接转换不了,有没有人做过淘宝客的 研究好几天了 还是不行 大家来帮帮我 可送Q币或话费

WBOY
WBOYOriginal
2016-06-23 14:04:231371Durchsuche

默认FTP:服务器:IP: 198.105.221.105  端口:21

用户名:  hlwebcam  密码: dxO5212hCi

大家不要改我的密码 
------------------------------------------------------------
demo1.php文件  
访问地址   http://www.hlwebcam.com/demo1.php

<script src="http://l.tbcdn.cn/apps/top/x/sdk.js?appkey=21434106"></script><?php$app_key = '21434106';/*填写appkey */$secret='290598d1ed95a9eb5db95224a5e642b0';/*填入Appsecret'*/$timestamp=time()."000";$message = $secret.'app_key'.$app_key.'timestamp'.$timestamp.$secret;$mysign=strtoupper(hash_hmac("md5",$message,$secret));setcookie("timestamp",$timestamp);setcookie("sign",$mysign);echo $mysign;?><div class="top-login-btn-container"></div><script>    TOP.ui("login-btn", {      container:".top-login-btn-container",      type:"1,1",      callback:{         login:function(user){alert(user)},         logout:function(){}    }    });</script><?phpinclude "TopSdk.php";$c = new TopClient;$c->$app_key = '21434106';$c->$secret='290598d1ed95a9eb5db95224a5e642b0';$req = new TaobaokeWidgetItemsConvertRequest;$req->setFields("num_iid,click_url,iid,commission,commission_rate,commission_num,commission_volume");$req->setOuterCode("bbs");$req->setNumIids("7642584420");$resp = $c->execute($req);print_r($resp);$click_url = $result['taobaokeItem']['click_url'];echo $req->$geturl;?>



最后网页上回复的内容是

Warning: Cannot modify header information - headers already sent by (output started at /home/hlwebcam/public_html/demo1.php:3) in /home/hlwebcam/public_html/demo1.php on line 9

Warning: Cannot modify header information - headers already sent by (output started at /home/hlwebcam/public_html/demo1.php:3) in /home/hlwebcam/public_html/demo1.php on line 10
3CA7E84E183F3C37F329FA55B4AF9281
请求失败,请重试,code:53
SimpleXMLElement Object ( [code] => 28 [msg] => Missing app key ) 
Fatal error: Cannot access empty property in /home/hlwebcam/public_html/demo1.php on line 39



-------------------------------------------------------
根本就不能获取clickurl地址,有谁获得过地址的 ,帮帮我


回复讨论(解决方案)

如果还不清楚的,可联系我的Q  87102146  或miaozilong@gmail.com

我的网站淘宝已经通过认证,可以做返利网站了

你把那行script移到下面去,看看

你把那行script移到下面去,看看 帅哥 script在html中位置无所谓的 

把代码精简一下 
 

<script src="http://l.tbcdn.cn/apps/top/x/sdk.js?appkey=21434106"></script><?phpinclude "TopSdk.php";include("top/TopClient.php");   include("top/request/ItemGetRequest.php"); $c = new TopClient;$app_key='21434106';/*填写appkey */$secret='290598d1ed95a9eb5db95224a5e642b0';/*填入Appsecret'*/$c->app_key=$app_key;/*填写appkey */$c->secret=$secret;/*填入Appsecret'*/$req = new TaobaokeItemsGetRequest;$req->setFields("num_iid,title,nick,pic_url,price,click_url,commission,commission_rate,commission_num,commission_volume,shop_click_url,seller_credit_score,item_location,volume");$req->setKeyword("泳衣");echo $req->getClick_url();$resp = $c->execute($req);print_r($resp);?>



这样还是不行  打印出来的结果是SimpleXMLElement Object ( [code] => 28 [msg] => Missing app key )
真窝火!!!

include "TopSdk.php";
include("top/TopClient.php");   
include("top/request/ItemGetRequest.php"); 

为何要载入三遍 

其次 一楼的那段必须在JSSDK组件实现吧?

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Vorheriger Artikel:php webservices 问题Nächster Artikel:用过微信公众账号的要小心了