RSS
Home
|
Link Us
|
Contact
Categories
-- All --
Perl
PHP
MySQL
Windows
JavaScript
HTML
Apache
CVS
Linux
SEO
Perl (9)
PHP (35)
MySQL (5)
Windows (7)
JavaScript (5)
HTML (6)
Apache (6)
CVS (4)
Linux (13)
SEO (11)
The registration is temporarily disabled.
However you can post your comments without registration.
Authentication
Username:
Password:
Register
|
Lost password
-->
Make curl HEAD request
Home
»
PHP
»
Make curl HEAD request
Date: 2006-01-16
Make curl HEAD request
Download
|
Printer Friendly
Add to Google
Add to Del.icio.us
Add to Digg
Add to Technorati
Add to Yahoo!
Add to Blinklist
Add to Furl
Add to reddit
/** * @return boolean false on error, content otherwise * @param string $url * @desc makes a HEAD request using cURL * @author Svetoslav Marinov * @link http://devquickref.com/ */ function http_head_curl($url) { if (!extension_loaded('curl_init') || !function_exists('curl_init')) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_TIMEOUT, 30); // times out after 30s curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_NOBODY, 1); curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($ch); curl_close($ch); return $result; } return false; }
Comments
No comments yet.
Post a comment
Your Name
Your Email
(won't be published)
Site
(e.g. http://)
*
Title
*
Comment
*
Required fields.
Copyright © 2005-2008
Execution time: 0.05962
hosted by
1and1