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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.