jeudi 1 janvier 2015

How to fetch values in a url using curl?


Vote count:

0




I want to fetch values from a url along with some parameters.I use the following code



$ch = curl_init("http://ift.tt/1ximgXA");
$fp = fopen("collected.txt", "w");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_FILE, $fp);

curl_setopt($ch, CURLOPT_HEADER, 0);

curl_exec($ch);
curl_close($ch);
fclose($fp);


while using this code '405 - HTTP verb used to access this page is not allowed.' is shown.Is this due to the .svc file format or mistake in parameters passing? Anybody please help me!!



asked 1 min ago







How to fetch values in a url using curl?

Aucun commentaire:

Enregistrer un commentaire