RE: [PHP] remote call - no return
| From: | Van Andel, Robbert | Date: | Wed, 21 May 2003 20:09:06 +0000 |
| Subject: | RE: [PHP] remote call - no return | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-148438@lists.php.net to get a copy of this message | ||
You are returning ID found on the last line of the file since you loop
through the entire file and then once the file's EOF has been reached, you
return id. Perhaps the last line is blank.
Robbert van Andel
-----Original Message-----
From: Thomas Hochstetter [mailto:fisherofmen@gmx.net]
Sent: Wednesday, May 21, 2003 1:02 PM
To: php-general@lists.php.net
Subject: [PHP] remote call - no return
Hi guys.
Yuip! It is i again!
For those that see this the first time: i am calling a remote script, feed
it a bunch variables and need to catch a returning ID variable (a tracking
ID).
I am not getting squat back! Why?
there is the function that does the call:
[php]
function call_remote($remote_path)
{
if ($f = fopen($remote_path,'r')) //call to the gateway script,
passing
vars
{
while(!feof($f))
{
$line = fgets($f,100); //supposed to get the id
back?
$id = $line;
}
}
return $id;
fclose($f);
}
[php]
Please! someone tell me how to do that! it can't be that difficult?!
peace
Thomas
--
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php