little help with curl
Posted by: TheMasters (93.91.206.---)
Date: March 05, 2011 08:09PM

Hi all,
i simply want to pass some data to another page using curl i use this code

$ch = curl_init("http:// domain.com /dllink.php?dl=data" );
curl_exec ($ch);
curl_close ($ch);

its supposed to work but nothing happens. any idea??

curl is enabled on my windows server 2003



Edited 2 time(s). Last edit at 03/05/2011 08:16PM by TheMasters.

Options: ReplyQuote
Re: little help with curl
Posted by: toivo (---.facz1.ken.bigpond.net.au)
Date: March 05, 2011 09:41PM

After you get a curl handle from curl_init(), you need to set the options, one of which is the POST data, before you run curl_exec(). You may also have to configure a proxy address if your server is behind a corporate firewall.

Here is an example:

[boards.developerforce.com]

toivo
Sydney, Australia

Options: ReplyQuote
Re: little help with curl
Posted by: TheMasters (93.91.206.---)
Date: March 05, 2011 10:19PM

i even tried that code but its not working, don't know whats wrong

Options: ReplyQuote
Re: little help with curl
Posted by: toivo (---.facz1.ken.bigpond.net.au)
Date: March 05, 2011 11:02PM

The code from the 2008 thread in developerforce works all right. You need to modify it if you do not have to use a proxy - the proxy setting is optional, as indicated in the comments. Make sure you test and report errors in your code.

Have you selected php_curl from WAMPSERVER - PHP - PHP Extensions? It needs to have a tick against it.



Edited 1 time(s). Last edit at 03/05/2011 11:04PM by toivo.

Options: ReplyQuote
Re: little help with curl
Posted by: TheMasters (93.91.207.---)
Date: March 06, 2011 09:46AM

yes i uncommented it.

i don't know, maybe the problem is from the other page code. it tries to download from another page. its a bit complicated

i used an alternative method, try it if u want
www.downmasters.com

Options: ReplyQuote


Sorry, only registered users may post in this forum.