Google Groups Home
Help | Sign in
php
how to call an external PHP file asynchonously WITHOUT shelling out to the system?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
johny why  
View profile
 More options Dec 9 2007, 3:06 pm
From: johny why <johny...@gmail.com>
Date: Sun, 9 Dec 2007 12:06:19 -0800 (PST)
Local: Sun, Dec 9 2007 3:06 pm
Subject: how to call an external PHP file asynchonously WITHOUT shelling out to the system?
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"));

?>


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
johny why  
View profile
(1 user)  More options Dec 9 2007, 10:26 pm
From: johny why <johny...@gmail.com>
Date: Sun, 9 Dec 2007 19:26:50 -0800 (PST)
Local: Sun, Dec 9 2007 10:26 pm
Subject: Re: how to call an external PHP file asynchonously WITHOUT shelling out to the system?
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);

?>


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
johny why  
View profile
(1 user)  More options Dec 15 2007, 1:13 pm
From: johny why <johny...@gmail.com>
Date: Sat, 15 Dec 2007 10:13:54 -0800 (PST)
Local: Sat, Dec 15 2007 1:13 pm
Subject: Re: how to call an external PHP file asynchonously WITHOUT shelling out to the system?
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 to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google