複製程式碼 程式碼如下:
function geturl($url)
{
$ch = curl_init();
$ $ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
//在需要使用者偵測的網頁中需要增加下面兩行
//curl_setopt($a), CURSVTBC_NY/ESg/E /curl_setopt($ch, CURLOPT_USERPWD, US_NAME.」:”.US_PWD);
$contents = curl_exec($ch);
curl_close($ch);
$contents = str_replace(""um."w" ,$contents);
$contents = str_replace("');","",$contents);
$contents = str_replace("\n","",$contents);
$contents = str_replace("\ ","",$contents);
echo $contents;
}
以上就介紹了underneath your clothes PHP取得url的函數程式碼,包括了underneath your clothes方面的內容,希望對PHP教學有興趣的朋友有所幫助。