伪静态转换

Title:伪静态转换  --2013-05-24 08:55

<?php  
    //test.php?id=13 伪静态转换  
    //xxxx-.$id.html  
    $id=$_GET["id"];    
    $id=str_replace(" ","%20",$id);   
    $id=str_replace("=","%3D",$id);  
    $url ="http://www.xxxxxx.net/Search-".$id."--.html";  
    $ch = curl_init();  
    curl_setopt($ch, CURLOPT_URL, "$url");  
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);   
    curl_setopt($ch, CURLOPT_HEADER, 0);    
    $output = curl_exec($ch);   
    curl_close($ch);   
    //echo $url."\r\n";  
    print_r($output);  
?>

  

posted on 2015-03-07 17:32  Tea_Ing  阅读(302)  评论(0编辑  收藏  举报

导航