Home > Backend Development > PHP Tutorial > php+txt Taobao super streamlined version sina_SAE special edition

php+txt Taobao super streamlined version sina_SAE special edition

WBOY
Release: 2016-07-25 09:08:01
Original
1461 people have browsed it
The latest version of v2 is released, please download: http://www.yimuhe.com/file-629333.html

php+txt Taobao super streamlined version sina_SAE special edition
Demo: http://bitefu.sinaapp.com/
Mainly modified the file_put_contents and the specific methods provided by the cul function for SAE to adapt to the sina_SAE environment
Another step is to replace all Alibaba APIs with strings, and then add them in the final turn!
Due to the hasty writing, if there is any problem, please correct it in time.
Complete code download http://www.ctdisk.com/file/5496334

Version update:
Update content
1. Added some replacement links mainly for women’s clothing pages
2. Modify u directory redirection rules
Sina free php space application complete guide

If you don’t use Sina sae space, please download the universal version
Download address: http://xiaogg.ctdisk.com/u/349707/437278

Tip: I will update the code from time to time. Update address 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) < time() ){
  14. $index_content=curl_file_get_contents($mailurl);
  15. //Specification replacement
  16. foreach($urlhead as $key =>$v)
  17. {
  18. $strarr=explode("| ",trim($v));
  19. $str_qian[]=$strarr[0];
  20. if($strarr[1]){$str_hou[]=WEB_PATH."u/?bitefutype=".$key." &";}else{
  21. $str_hou[]=WEB_PATH."index.php/html".$key."/";
  22. }
  23. }
  24. $body=str_replace($str_qian,$str_hou,$index_content);
  25. $strqian=array('pid=mm_'.ALIMAMA_KEY.'_0_0','','mm_0_','','');
  26. $strqhou= array('bitefu=net',WEB_TITLE.'','mm_'.ALIMAMA_KEY.'_','','
    ');
  27. $ body=str_replace($strqian,$strqhou,$body);
  28. //Specification replacement
  29. file_put_contents("saemc://".$cacheurl,$body);
  30. }
  31. $html=file_get_contents("saemc://" .$cacheurl);
  32. echo $html;
  33. ?>
Copy code


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