SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
-
Apr 29, 2006, 22:48 #1
- Join Date
- Apr 2006
- Posts
- 2
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Wrong parameter count for curl_exec()
Hi folks,
I'm using the following code to retrieve an external RSS file on a webhost that doesn't support fopen().
Code:$ch = curl_init(); curl_setopt ($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE); curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); curl_setopt ($ch, CURLOPT_PROXY, 'http://64.202.165.130:3128'); curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt ($ch, CURLOPT_URL, 'http://www.rollingstone.com/rssxml/music_news.xml'); $data = curl_exec(); curl_close($ch);
Code:Warning: Wrong parameter count for curl_exec() in ... on line 62
Code:$data = curl_exec();
You will need to use our proxy server in order to grab data from an
external website, and only if that site uses port 80 or 443. If you are
using cURL, here's the script to do so:
curl_setopt ($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE);
curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
curl_setopt ($ch, CURLOPT_PROXY, http://64.202.165.130:3128);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
Code:curl_setopt ($ch, CURLOPT_URL, 'http://www.rollingstone.com/rssxml/music_news.xml');
I can't find mention of "Wrong parameter count for curl_exec" using a Google search.
Any advice?
Thanks in advance.
Steve
-
Apr 29, 2006, 22:52 #2
- Join Date
- Mar 2001
- Posts
- 3,537
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
How many arguments does curl_exec() expect?
-
Apr 29, 2006, 22:58 #3
- Join Date
- Apr 2006
- Posts
- 2
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
PHP site http://au3.php.net/curl doesn't say.
-
Apr 29, 2006, 23:05 #4
- Join Date
- Mar 2006
- Posts
- 6,132
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
look at the example in the manual.
the problem is with curl_exec(), so you would look at the page for that function to learn more about how to use it.
http://au3.php.net/manual/en/function.curl-exec.php
Bookmarks