is there a way to open an http connection to another page using php? I want to send form headers to a different page. and read the response....
Interestingly, I've been researching the same thing. Here y'are, from http://php.net/fsockopen:


Code:
$fp = fsockopen("www.example.com", 80, $errno, $errstr, 30);
if (!$fp) {
   echo "$errstr ($errno)<br />\n";
} else {
   $out = "GET / HTTP/1.1\r\n";
   $out .= "Host: www.example.com\r\n";
   $out .= "Connection: Close\r\n\r\n";

   fwrite($fp, $out);
   while (!feof($fp)) {
       echo fgets($fp, 128);
   }
   fclose($fp);
}
awesome. with this I will be able to send a mass email, post to the blog and post an announcement simulataneously from the Mass Email section of the ACP.
Good stuff. You shall see what I want it for. ^_^
Smile Cool I added the email address for my blog to the CC list in the mass emailer Very Happy

now I want it to also send the POST data with the subject and content to posting.php Very Happy
Very easy. I'll give you my code when I figure it out; I'm working on the same thing.
nah, I think Ill stick this one out on my own.
I just got mine to work btw. Smile
awesome.
...the comm routines, anyway. I'm still working on the rest of it. Smile
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement