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 addresshttp://xiaogg.ctdisk.com/u/349707/437278
-
include('common.php');
- include('function.php');
- $urlhead=file("urlhead.txt");
- if(URL_END){
- $cacheurl ='cache/'.md5(URL_END).".txt";
- $nowtype=substr(URL_END,5,1);
- $newheader=explode("|",trim($urlhead[$nowtype]));
- $mailurl=$newheader[0].str_replace("bitefu=net","&pid=mm_".ALIMAMA_KEY."_0_0",str_replace('/html'.$nowtype."/",'',URL_END)) ;
- }else{
- $cacheurl='cache/'.md5("index").".txt";
- $mailurl=INDEX_URL;
- }
- if(!file_exists($cacheurl) || (filemtime($cacheurl ) + CACHE_DATA) < time() ){
- $index_content=curl_file_get_contents($mailurl);
- //Specification replacement
- foreach($urlhead as $key =>$v)
- {
- $strarr=explode("| ",trim($v));
- $str_qian[]=$strarr[0];
- if($strarr[1]){$str_hou[]=WEB_PATH."u/?bitefutype=".$key." &";}else{
- $str_hou[]=WEB_PATH."index.php/html".$key."/";
- }
- }
- $body=str_replace($str_qian,$str_hou,$index_content);
- $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);
- //Specification replacement
- file_put_contents("saemc://".$cacheurl,$body);
- }
- $html=file_get_contents("saemc://" .$cacheurl);
- echo $html;
- ?>
Copy code
|