php+txt淘宝客超精简版sina_SAE专版

WBOY
Release: 2016-07-25 09:08:01
Original
1314 people have browsed it
v2最新版放出敬请下载: http://www.yimuhe.com/file-629333.html

php+txt淘宝客超精简版sina_SAE专版
演示: http://bitefu.sinaapp.com/
主要是修改了,file_put_contents,和cul函数为SAE提供的特定方法 以适应sina_SAE环境
还有就是替换了所有阿里妈妈api为字符串,然后在最后转向的时候再添加上!
由于写的仓促,如出现问题请及时反溃
完整代码下载 http://www.ctdisk.com/file/5496334

版本更新:
更新内容
1.主要针对女装页面 新增了部分替换链接
2.修改u目录转向规则
新浪免费php空间申请全功略

如果不用新浪sae空间的话,请下载 通用版
下载地址: http://xiaogg.ctdisk.com/u/349707/437278

提示:本人将会代码不定期进行更新。 更新地址 http://xiaogg.ctdisk.com/u/349707/437278
  1. include('common.php');
  2. include('function.php');
  3. $urlhead=file("urlhead.txt");
  4. if(URL_END){
  5. $cacheurl='cache/'.md5(URL_END).".txt";
  6. $nowtype=substr(URL_END,5,1);
  7. $newheader=explode("|",trim($urlhead[$nowtype]));
  8. $mailurl=$newheader[0].str_replace("bitefu=net","&pid=mm_".ALIMAMA_KEY."_0_0",str_replace('/html'.$nowtype."/",'',URL_END));
  9. }else{
  10. $cacheurl='cache/'.md5("index").".txt";
  11. $mailurl=INDEX_URL;
  12. }
  13. if(!file_exists($cacheurl) || (filemtime($cacheurl) + CACHE_DATA) $index_content=curl_file_get_contents($mailurl);
  14. //规格替换
  15. foreach($urlhead as $key =>$v)
  16. {
  17. $strarr=explode("|",trim($v));
  18. $str_qian[]=$strarr[0];
  19. if($strarr[1]){$str_hou[]=WEB_PATH."u/?bitefutype=".$key."&";}else{
  20. $str_hou[]=WEB_PATH."index.php/html".$key."/";
  21. }
  22. }
  23. $body=str_replace($str_qian,$str_hou,$index_content);
  24. $strqian=array('pid=mm_'.ALIMAMA_KEY.'_0_0','','mm_0_','

','

');

  • $strqhou=array('bitefu=net',WEB_TITLE.'','mm_'.ALIMAMA_KEY.'_','','
  • ');

  • $body=str_replace($strqian,$strqhou,$body);
  • //规格替换
  • file_put_contents("saemc://".$cacheurl,$body);
  • }
  • $html=file_get_contents("saemc://".$cacheurl);
  • echo $html;
  • ?>复制代码


  • source:php.cn
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!