This sounds like an environmental issue.

Are you definitely running the cron job on the same machine that you're 
testing your script? If you're not already, I'd configure a MAILTO for the 
crontab<http://www.gnu.org/software/mcron/manual/html_node/Crontab-file.html>, 
then I'd ensure that you've configured your cron script to print E_STRICT | 
E_ALL error messages.

Regards,

- Paul, AdWords API Team.

On Friday, 2 August 2013 03:45:56 UTC+1, Luis M. CastaƱeda wrote:
>
>
> I wrote a PHP code that runs smoothly, now I am trying to make it run 
> periodically using a Cron Job.
>
> Problem is that I get an http code 0 from the CURL instead of 200.
>
> Any idea why? I already tried timeout and connectimeout but did not fix it.
>
> Here is the code:
>
>  
>
> $params = array(
>
>     'Email' => $email,
>
>     'Passwd' => $password,
>
>     'accountType' => 'GOOGLE',
>
>     'service' => 'adwords',
>
>     'source' => 'AdWords API PHP Code');
>
>  
>
>                $url = 'https://www.google.com/accounts/ClientLogin';
>
>  
>
> // Make request
>
> $ch = curl_init($url);
>
> curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
>
> curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
>
> $response = curl_exec($ch);
>
> $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
>
> curl_close($ch);
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


  • CURL http code 0 Luis M . CastaƱeda
    • Re: CURL http code 0 Paul Matthews (AdWords API Team)

Reply via email to