Okay, some clarification. I do indeed want to read what I get back from the socket. Using fgets($fp, 1024) on the sending side (where the socket is opened and the data sent) and return = $variable on the other end (oh yes, the variable has a value as of the return), all I ever get back is 'HTTP 1.1' exactly, or nothing at all in the return value. Can you fill me in on the syntax here? How would you write the fgets statement and how would you define and populate the return value on the other end?
Chris wrote: --- 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. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php