views:

23

answers:

0

hu giys,

I am trying to pass some information of a server in which the script is running to next url or server.

I tried using curl. i have following two disadvantages:

1.) if cannot locate file it will tell file not found

2.) it waits till the remote file execution is completed.

How can i overcome both of the things either by using curl or other commands?

Edit:

1.) Now I would like to supress the file not found message error message being displayed by curl even if the file really doesn't exists.

2.) I do not want output from destination page so i don't want to wait till the execution of the destination page is finished. I just want to trigger the code and continue with another scripts remaining

Example:

I am trying to build a log system which will have its everything in next webserver. The client website which implements the log system will be sending some of the data required for the system by calling a file in my webserver.

Code I am using:

// create a new cURL resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://xyz.com/log.php?data=data");
curl_setopt($ch, CURLOPT_HEADER, 0);
// grab URL and pass it to the browser
curl_exec($ch);
// close cURL resource, and free up system resources
curl_close($ch);