note 65554 deleted from function.fopen by danbrown

From: Date: Mon, 08 Jun 2009 23:37:13 +0000
Subject: note 65554 deleted from function.fopen by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-156554@lists.php.net to get a copy of this message
Note Submitter: puneet at puneetarora dot com ---- Refering to the note by [info at b1g dot de] on (24-Oct-2005 11:54) sometimes you may also want HTTP error code returned from the server. The code of the HTTPRequest class can be modified as followed to do so .. 1. Add another member variable to the class var $_error; // HTTP Error code 2. After the lines . . // parse headers $headers = array(); $lines = explode($crlf, $header); . . add list($proto, $this->_error, $reply) = explode(" ", $lines[0]); $proto and $reply can be treated as junk variables. once DownloadToString() is called, the HTTP error code will be contained in the _error property of the object.

« previous php.notes (#156554) next »