Jump to content
Larry Ullman's Book Forums

Fsockopen() Error Arguments


Recommended Posts

The virtual app's IPN listener opens a SSL connection using 'fsockopen()':
  $fp = fsockopen('ssl://www.sandbox.paypal.com', 443, $errno, $errstr, 30);

...the only thing I'm unclear of is where do the '$errno' and '$errstr' values come from?  Even the PHP Manual fsockopen() examples use the same apparently previously undeclared variables...does this function by default look for PHP errors and plugs in the values for these arguments if they exist?

 

Link to comment
Share on other sites

Good question. Those are variables passed by reference which allows fsockopen() to return error messages using those variables should a problem occur. This is kind of a technical and esoteric use of function parameters.

Link to comment
Share on other sites

 Share

×
×
  • Create New...