Method POST - not work in cURL.
Posted by:
maxito
(---.broadband.corbina.ru)
Hello
I have php(with cURL) script - it work on WAMP 2c and dont work with WAMP 2I
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
curl_setopt($ch, CURLOPT_REFERER, $referer);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); // allow redirects
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_NOBODY, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, "coockies.txt"
;
curl_setopt($ch, CURLOPT_COOKIEFILE, "coockies.txt"
;
$result = curl_exec($ch);
curl_close($ch);
Such sensation that a method POST does not work. How fix this problem?
(sorry for my english)