curl을 사용하여 cookiedata (및 세션 항목)를 저장할 수도 있습니다. 그래서 기본적으로 mainsite를 방문한 다음 suburl로 이동하십시오. 예제 코드 :
$mainurl = "http://www.basket.ee/"
$ripurl = "http://www.basket.ee/index.php?mid=469&round=1&sid=2013&chid=001&tase=1"
//Put cookie file
$cookieFile = "cookie.txt";
//if file doesn't exist
if(!file_exists($cookieFile)) {
//fopen for writing
$fh = fopen($cookieFile, "w");
//write
fwrite($fh, "");
//close
fclose($fh);
}
//Start session for first login
$ch = curl_init();
//Load curl
curl_setopt($ch, CURLOPT_URL, $mainurl);
//Set cookie file
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookieFile);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookieFile);
//do not return data
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
//execute curl and close
curl_exec($ch);
curl_close ($ch);
//startup curl again
$ch = curl_init($urlxml);
//cookie stuff
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookieFile);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookieFile);
//store curl result in var
$rawdata=curl_exec($ch);
//Close curl
curl_close ($ch);
echo $rawdata;
이것을 사용하여 세션을 쿠키 var에 저장합니다. 어떤 사용자가 당신이 정상적인 사용자 탐색이라고 믿게합니다.
'Tamper Data'라는 Firefox 추가 기능이 있으며,이를 사용하여 세션 및 쿠키를 찾은 다음 CURL을 사용하여 페이지에 액세스하고 세션을 계속 활성화합니다. –