[thelist] PHP output capture

Alex Binesh a_binesh at yahoo.com
Tue Apr 25 20:43:20 CDT 2006

This is what I am getting:
  Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/clicktod/public_html/vxml/ContactCity/test.php on line 2

Warning: fsockopen(): unable to connect to http://session.voxeo.net/CCXML.start?tokenid=c99d638fd566fd49b3d1d3d44e3704e3b97335a468443b12b1252b519e5a6100d25d8350f6be1ccd0307d96f:80 in /home/clicktod/public_html/vxml/ContactCity/test.php on line 2
Permission denied (13)

And this is the code:
$fp = fsockopen("http://session.voxeo.net/CCXML.start?tokenid=c99d638fd566fd49b3d1d3d44e3704e3b97335a468443b12b1252b519e5a6100d25d8350f6be1ccd0307d96f",80, $errno, $errstr, 30);
if (!$fp) {
   echo "$errstr ($errno)<br />\n";
} else {
   $out = "GET / HTTP/1.1\r\n";
   $out .= "Host: http://session.voxeo.net/CCXML.start?tokenid=c99d638fd566fd49b3d1d3d44e3704e3b97335a468443b12b1252b519e5a6100d25d8350f6be1ccd0307d96f\r\n";
   $out .= "Connection: Close\r\n\r\n";
     fwrite($fp, $out);
   while (!feof($fp)) {
       echo fgets($fp, 128);

  Matt Warden <mwarden at gmail.com> wrote:
Hash: SHA1

Alex Binesh wrote:
> This is definitely not server to server.

Actually, this is definitely a server-to-server problem. Your
application might be an interaction between a client and your server,
but you must use a connection between your server and the server in
question in order to solve your problem, unless you want to use frame
hacks which will likely not work under a normal browser security policy.

Instead of using a redirection, use your PHP script to issue a GET
request and then read the response. For the purpose here, your server is
acting as a client and requesting a page from the voxeo server.

It shoudl then read the response, verify that its response body content
is 'success' and then continue re-output (or redirect to) the
originating page (the one that called your ccxml app).

This is what Ian and Paul were trying to explain to you. Refer to their
posts for more info:


Good luck,

- --
Matt Warden
Miami University
Oxford, OH, USA

This email proudly and graciously contributes to entropy.
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org


* * Please support the community that supports you. * *

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 

More information about the thelist mailing list