最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

解析php通過(guò)cookies獲取遠(yuǎn)程網(wǎng)頁(yè)的指定代碼

 更新時(shí)間:2013年06月25日 17:20:36   作者:  
本篇文章是對(duì)php通過(guò)cookies獲取遠(yuǎn)程網(wǎng)頁(yè)的指定代碼進(jìn)行了詳細(xì)的分析介紹,需要的朋友參考下
復(fù)制代碼 代碼如下:

function Steal($url, $post_data = ""){
//$header[] = "Accept: text/vnd.wap.wml,*.*";  
$user_agent = "Mozilla/4.0"; 
$follow_loc = 1; 
$cookie_file ="./tmp/cook.txt"; 
$ch = @curl_init(); 
@curl_setopt($ch, CURLOPT_URL, $url); 
@curl_setopt($ch, CURLOPT_USERAGENT, $user_agent); 
@curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file); 
@curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file); 
@curl_setopt($ch, CURLOPT_HEADER, $header); 
@curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
@curl_setopt($ch, CURLOPT_FOLLOWLOCATION, $follow_loc); 
@curl_setopt($ch, CURLOPT_TIMEOUT, 1000); 
if (trim($post_data)!= "") { 
@curl_setopt($ch, CURLOPT_POST, 1); 
@curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); 

$result = @curl_exec($ch); 
@curl_close($ch); 
return $result; 
}
//獲取網(wǎng)頁(yè)代碼的方法
function Cut($file,$from,$end){
$message=explode($from,$file);
  $message=explode($end,$message[1]);
if ($message[0] == "")
{
$message[0] = "<font color= '#ff0000'>無(wú)法獲取內(nèi)容</font>";
}
  return $message[0];
}
//截取代碼的方法

相關(guān)文章

最新評(píng)論

鱼台县| 阿克陶县| 木兰县| 精河县| 循化| 南江县| 上虞市| 昌图县| 尼玛县| 锡林郭勒盟| 原阳县| 临江市| 微山县| 昭苏县| 宣化县| 文成县| 蓝田县| 葫芦岛市| 阿图什市| 金华市| 平度市| 宁强县| 民勤县| 乌鲁木齐市| 开原市| 万安县| 贺州市| 沁阳市| 海盐县| 特克斯县| 玉溪市| 耒阳市| 绥芬河市| 金秀| 阿图什市| 奇台县| 巢湖市| 承德市| 吉水县| 固原市| 灯塔市|