curl functions problems
| From: | Dezider Góra | Date: | Wed, 28 Feb 2001 08:28:25 +0000 |
| Subject: | curl functions problems | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-41966@lists.php.net to get a copy of this message | ||
Hi,
I have problem when using curl function to redirect to page. I use it
when I need to check for valid informations on the and because there are
passwords, I don't want to send it via GET in url. So I use curl to
redirect to the originating page. The script's name is saveplacer.php. I
use this code:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"$HTTP_REFERER");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $poststring = "placerid=$placerid"
.. "&" . "pwd=$pwd" );
curl_exec ($ch);
curl_close ($ch);
Redirecting works, desired page shows up, but in browser's urlbar I get
http://mydomain/mysite/saveplacer.php and not
http://mydomain/mysite/add1.php as expected. I have
checked the script
for empty spaces, headers, but nothing there. It shows the add1.php
script and url is different.
Has anyone experienced this?
I use Apache 1.3.17/PHP 4.0.4Pl1 on Windoze 2000 Pro. Even I don't think
it's anything to do with the problem.