CURL

Hi

I think I have got this right but need to check as I have now got really
confused.

I am trying to call a PHP script on a different server to mine, I do not
need
any data returned but do need to know that the script was run..

I'm going to set up a CRON on my server to call my script everyday.
My script would use CURL to call the scripts on the other server, I
have read up on CURL and it the CURLOPT_XXX option I am lost on
as all I want to know id the script of the other server did run. What
options
should I be using?


$c = curl_init('http://other_server.com/other_script.php');
curl_setopt($c, XXXX, 1);
$http_return = curl_exec($c);
curl_close($c);


Brian
Brian [ Mo, 09 Juli 2007 01:53 ] [ ID #1763593 ]

Re: CURL

Brian wrote:
> Hi

Hi,

> I'm going to set up a CRON on my server to call my script everyday.
> My script would use CURL to call the scripts on the other server, I
> have read up on CURL and it the CURLOPT_XXX option I am lost on
> as all I want to know id the script of the other server did run. What
> options
> should I be using?

There isn't any option to know if a "script has run" or not. The only
easy way, would be to simply get the script to return (or in this case,
echo) "0" and "1", or whatever symbol would go for you. Then just
compare what you retrieved with cURL, and thus see if the script
executed all right...

HTH,

S.
crashanddie+usenet [ Mo, 09 Juli 2007 02:55 ] [ ID #1763594 ]
PHP » alt.php » CURL

Vorheriges Thema: session timeout ?
Nächstes Thema: object array rewrite in simple mode