![]() |
yet another curl question....
ok, I have this code:
Code:
$ch = curl_init('http://www.google.co.uk'); // the targetTalkPHP - cURL Basics Any ideas why I would end up with a blank screen? with no errors? Do I need to configure something with the curl library or something? I'm using php 5 Thanks Jen |
Do you normally see errors on your development server? I imagine it is causing errors, but you're not displaying them, and possibly logging them. You need to enable the cURL module in order for it to work.
First you may wish to enable the displaying of errors. Find the following 2 lines and change them to what they are below. Those are the only 2 lines, or so I think. Code:
error_reporting = E_ALLCode:
extension=php_curl.dll |
Thanks for your reply. I've double checked the php.ini file and it is already loading the curl extention, I have also enabled logging, and still comes up with a blank screen.
It obviously recognises the curl function, just acts as if it doesnt know what to do with it. |
Try adding a trailing slash after the url. Curl acts funny with some server setups.
PHP Code:
|
still no avail :-(
is there another setting in the php ini file that could be preventing it? Safe Mode or something? |
I just tried
Code:
$exists = function_exists ('curl_init');I'm running out of ideas... |
Also when I do phpinfo();
it comes up with: Code:
curl |
HA! FOUND IT!!!!!
I didn't configure our networks Proxy Server in the options!! If anybody else has this problem here is the solution: Code:
$proxy="<proxy_ip>:<proxy_port_no>";Jen |
Quote:
PHP Code:
PHP: cURL - Manual |
| All times are GMT. The time now is 02:06 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0