how to call an external PHP file asynchonously WITHOUT shelling out to the system?

0 views
Skip to first unread message

johny why

unread,
Dec 9, 2007, 3:06:19 PM12/9/07
to php
here's the php info page for my host:
http://picnictoimpeach.us/check_info.php5

i don't have shell access on my shared hosting service, so i cannot
use "popen". at least, popen is not working for me here. am i doing
something wrong?


PHP Code:
<?php

$myhandle = pclose(popen("http://picnictoimpeach.us/remote.php5"));

?>

johny why

unread,
Dec 9, 2007, 10:26:50 PM12/9/07
to php
how can i exit this script before execution of the remote script is
finished?

cUrl executes the external php ok, but this script waits until
execution of the external script

php Code:

<?php

print file_get_contents("http://picnictoimpeach.us/videos/
playlist.xml");


$curl = curl_init();
curl_setopt ($curl, CURLOPT_URL, "http://picnictoimpeach.us/
remote.php5");
curl_exec ($curl);
curl_close ($curl);

?>

johny why

unread,
Dec 15, 2007, 1:13:54 PM12/15/07
to php
somebody gave me the answer:

<?php

header ("content-type: text/xml");
print file_get_contents('http://picnictoimpeach.us/videos/
playlist.xml');

$fp = stream_socket_client("tcp://www.picnictoimpeach.us:80", $errno,
$errstr, 30);

fwrite($fp, "GET /remote.php5 HTTP/1.0\r\nHost: picnictoimpeach.us\r
\nAccept: */*\r\n\r\n");
fclose($fp);

?>
Reply all
Reply to author
Forward
0 new messages