blob: 87f948380fcfe80a0c59f404e50a9a072c0343d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
<?php
$url = 'gogs.neodarz.ovh/img/favicon.png';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_exec($ch);
$retcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if (200==$retcode || 404==$retcode) {
echo "yep".$retcode;
} else {
echo "nope !".$retcode;
}
?>
|