Bonjour,
je cherche à parser une page html d'un autre site
j'utilise la librairie curl
cela fonctionne très bien avec un site lambda tel google.com
mais pas dans ce cas :
cela me renvoie une erreur 404
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 $requestUrl = "http://site.com/agent.dll?var1=toto&var2=tata"; $cUrl = curl_init(); curl_setopt($cUrl, CURLOPT_URL, $requestUrl); curl_setopt($cUrl, CURLOPT_FOLLOWLOCATION, 0); curl_setopt($cUrl, CURLOPT_HEADER, 0); curl_setopt($cUrl, CURLOPT_RETURNTRANSFER, 0); $pageContent = trim(curl_exec($cUrl)); curl_close($cUrl); echo $pageContent;
avec dans la barre d'url :
http://localhost/agent.dll?var1=toto&var2=tata
Quelqu'un pourrait m'aider ?
Merci d'avance
Céline
Partager