I have problem in using curl. The initialisation (curl_init()) runs fine and I can get the result from curl_exec() when I execute the script through web browser. But because I need to run the script as a cron, I need to run it on command line. And strangely I get an empty string when I execute curl_exec().
Any idea? Thank you.
Using curl on command line PHP
Moderator: General Moderators
Re: Using curl on command line PHP
Look at the difference between the php.ini files. It most likely isn't enabled for cli, but you should be getting some errors if you have error reporting on.
Code: Select all
/etc/php5/cli/php.ini