--- Paul <[EMAIL PROTECTED]> wrote: > Using a fairly simple fsockopen and POST I'm sending > form data to a script which populates fields in a > database. Everything works fine, however I've been > trying to figure out how to send a value set on the > other machine (database) back through the open socket > (note: not the return value usually retrieved by > fgets($fp etc...) which is then available to the > sending machine. Searching via Google hasn't given me > an answer. > > Is it possible? Can somebody help? Syntax would be very > nice, I'm not a PHP guru.
Anything that the receiving Web server outputs is sent back to you just as it would be a Web browser. So, you can read this data just as if from a file (which is why fsockopen is so convenient). Thus, just echo whatever you want to send back. You make a statement that is very conflicting: > I've been trying to figure out how to send a value set > on the other machine (database) back through the open > socket (note: not the return value usually retrieved > by fgets($fp etc...) So, you want to send data "back through the open socket", but you do not want read this data from the socket. I think you have a misunderstanding here somewhere that will make things difficult for you. What fgets() gives you *is* the data sent from the remote server. If you want to pass data back in a manageable way, you will probably want to output XML, because that is easier and more reliable to parse than HTML. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php