note 78746 added to function.curl-init
| From: | rossixx at gmx dot net | Date: | Thu, 25 Oct 2007 16:48:29 +0000 |
| Subject: | note 78746 added to function.curl-init | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-131732@lists.php.net to get a copy of this message | ||
e.g. you can check how many characters are on test_1.php
or you can it use for more, i have used this function for a nagios check.
<?PHP
echo "CURL - function test <br>" ;
if ($load == 1){
function webcheck ($url) {
$ch = curl_init ($url) ;
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1) ;
$res = curl_exec ($ch) ;
curl_close ($ch) ;
return ($res) ;
}
echo "url = $url <br>" ;
$erg = webcheck("my_page.php/test_1.php") ;
$zahl = strlen ($erg) ;
echo "length = $zahl " ;
?>
----
Server IP: 212.124.37.9
Probable Submitter: 85.183.246.73
----
Manual Page -- http://www.php.net/manual/en/function.curl-init.php
Edit -- https://master.php.net/note/edit/78746
Del: integrated -- https://master.php.net/note/delete/78746/integrated
Del: useless -- https://master.php.net/note/delete/78746/useless
Del: bad code -- https://master.php.net/note/delete/78746/bad+code
Del: spam -- https://master.php.net/note/delete/78746/spam
Del: non-english -- https://master.php.net/note/delete/78746/non-english
Del: in docs -- https://master.php.net/note/delete/78746/in+docs
Del: other reasons-- https://master.php.net/note/delete/78746
Reject -- https://master.php.net/note/reject/78746
Search -- https://master.php.net/manage/user-notes.php