whats this mean. i get this with the following code. $fp = fsockopen("toc.oscar.aol.com", 5190, $errno, $errstr, 30); print $fp; Code (markup):
Resource id# usually means it's an array. If you don't know what's in the array, use the following code: print_r($whatever_variable); Code (markup):
print_r($whatever_variable) - you will get the same 'Resource Id#'. fsockopen returns the special variable of data type 'Resource' which is used to hold a reference to an external resource. It is not an array/string/object. To get the type of $fp, you should use get_resource_type ( $fp )
It means you are trying to print a socket handle, which doesn't make much sense. You can read from it, and you can write to it, but you can't just print it. I assume you are trying to do something with AOL's instant messenger protocol. You'll have to read about the protocol and see what to send to the socket before you will receive anything useful. To see at least something happen (a 404 message from AOL's server), you can do this: $fp = fsockopen("toc.oscar.aol.com", 5190, $errno, $errstr, 30); fputs($fp, "GET /\n\n"); echo fgets($fp, 4000); Code (markup): That ought to at least give you a sense of how to communicate with it, once you have figured out what you want to say.