Jump to content

cURL & Cookies Problem


PunjabHaker

Recommended Posts

I have a script that post something on a site and then return me the next page results
The site i make the post is with ".cgi" extension.
I got this error:
Configuration Error:
Your browser is not cofigured to accept cookies or some third party privacy software running on your system is blocking cookies from our servers.
I have tried with:[code]
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookies.txt");
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookies.txt");[/code]
And the same
Is there any way to accept cookies in cURL ?
Link to comment
https://forums.phpfreaks.com/topic/32460-curl-cookies-problem/
Share on other sites

[b]Still doesn't work  :([/b]
I'm trying to register account through my web page:
[code]<?php
$agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)";
$LOGINURL = ""; //here is a web site, doesn't matter
$pstcfk = 'page=vsignup1';
$reffer = "$site";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$LOGINURL);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$pstcfk);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_REFERER, $reffer);
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt");
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt");
$result = curl_exec ($ch);
print $result
?>[/code]
I got the same error:
[b]Configuration Error:
Your browser is not cofigured to accept cookies or some third party privacy software running on your system is blocking cookies from our servers.[/b]
Link to comment
https://forums.phpfreaks.com/topic/32460-curl-cookies-problem/#findComment-150936
Share on other sites

I tried that:[code]
<form method="post" action="site that i post to">
<input type="hidden" name="page" value="vsignup1">
<input type="hidden" name="username" value="panjaby">
<input type="submit" value="submit">
</form>[/code]
When i push submit, it shows me the same error.
I can't understand why it doesn't accept cookies ?
It works only through oficial page, i tried with curl and with <form html and it doesn't work
:(
Any suggestion please ?
Link to comment
https://forums.phpfreaks.com/topic/32460-curl-cookies-problem/#findComment-150979
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.