equal
deleted
inserted
replaced
212 else |
212 else |
213 die(__CLASS__ . ': Invalid request method'); |
213 die(__CLASS__ . ': Invalid request method'); |
214 |
214 |
215 $newline = "\r\n"; |
215 $newline = "\r\n"; |
216 $php_ver = PHP_VERSION; |
216 $php_ver = PHP_VERSION; |
217 $this->add_header('User-Agent', "PHP/$php_ver (Server: {$_SERVER['SERVER_SOFTWARE']}; automated bot request)"); |
217 $server = ( isset($_SERVER['SERVER_SOFTWARE']) ) ? "Server: {$_SERVER['SERVER_SOFTWARE']}" : "CLI"; |
|
218 $this->add_header('User-Agent', "PHP/$php_ver ({$server}; automated bot request)"); |
218 } |
219 } |
219 |
220 |
220 /** |
221 /** |
221 * Sets one or more cookies to be sent to the server. |
222 * Sets one or more cookies to be sent to the server. |
222 * @param string or array If a string, the cookie name. If an array, associative array in the form of cookiename => cookievalue |
223 * @param string or array If a string, the cookie name. If an array, associative array in the form of cookiename => cookievalue |