05.05.2013 Views

Programming PHP

Programming PHP

Programming PHP

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

pfsockopen<br />

int pfsockopen(string host, int port[, int error[, string message<br />

[, double timeout]]])<br />

Opens a persistent TCP or UDP connection to a remote host on a specific port. By default,<br />

TCP is used; to connect via UDP, host must begin with udp://. If specified, timeout indicates<br />

the length of time in seconds to wait before timing out.<br />

If the connection is successful, the function returns a virtual file pointer that can be used<br />

with functions such as fgets( ) and fputs( ). If the connection fails, it returns false. If<br />

error and message are supplied, they are set to the error number and error string,<br />

respectively.<br />

Unlike fsockopen( ), the socket opened by this function does not close automatically after<br />

completing a read or write operation on it; you must close it explicitly with a call to<br />

fsclose( ).<br />

php_logo_guid<br />

string php_logo_guid( )<br />

Returns an ID that you can use to link to the <strong>PHP</strong> logo. For example:<br />

<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!