Click to See Complete Forum and Search --> : compile PHP --with-curl[=DIR]


imranlink
04-30-2003, 05:23 AM
Dear Sir,

I have a Windows 2000 Server and PHP version 4.2.3 running on IIS. I want to use the PHP "CURL functions". but the requirement of this is to use "To use PHP's CURL support you must also compile PHP --with-curl[=DIR]"


I have no idea how to compile PHP with curl support? from where i can download already compiled php with curl to install on windows 2000?


Regards,
Imran Khalid
imranlink@hotmail.com
wazirabad@yahoo.com

Mordecai
04-30-2003, 11:12 PM
In php.ini, add:
extension=php_curl.dll

php_curl.dll comes bundled with PHP, so you shouldn't have to download it.

imranlink
05-01-2003, 11:08 AM
Hi,

Thanks for your Help for CURL. I am now facing another problem in it. I want to login on another site. The other site redirect the page and use session for navigation. But my code does not redirect the page.

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://techbuys.com/adminsite/index.php");
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 3); //times out after 4s
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "txtLogin=login&txtNickName=test&txtPassword=test");
$result=curl_exec ($ch);
curl_close ($ch);
echo ($result);

Well i have written the above code on my www.mydomain.com and the site www.techbuys.com/adminsite/index.php call itself index page after form post and then after processing the form redirect the user to main.php page. Please let me know how can i overcome this problem.



Regards,
Imran Khalid
imranlink@hotmail.com
wazirabad@yahoo.com