je suis aller chercher la page unsite ..comment puis-je mettre cookie boucle
mais rien afficher et changement d'adresse url.
exemple, j'ai tapé
http://localhost/sushant/EXAMPLE_ROUGH/curl.php
à la page boucle mon codage est =
$fp = fopen("cookie.txt", "w");
fclose($fp);
$agent= 'Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9) Gecko/2008052906 Firefox/3.0';
$ch = curl_init();
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
// 2. set the options, including the url
curl_setopt($ch, CURLOPT_URL, "http://www.fnacspectacles.com/place-spectacle/manifestation/Grand-spectacle-LE-ROI-LION-ROI4.htm");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt");
// 3. execute and fetch the resulting HTML output
if(curl_exec($ch) === false)
{
echo 'Curl error: ' . curl_error($ch);
}
else
echo $output = curl_exec($ch);
// 4. free up the curl handle
curl_close($ch);
mais CANEGE url comme ça ..
http://localhost/aide.do?sht=_aide_cookies_
objetpas a trouvé.
comment résoudre ces problèmes me aider
Je ne comprends pas ce que fait "cookie.txt". Faites apparaître les erreurs avec: 'error_reporting (E_ALL);' –
Quelle est exactement votre question? Qu'est-ce qui ne fonctionne pas? –
Je ne sais pas pourquoi VolkerK a annulé mon édition ... –