diff options
author | Corentin Breton <thibeauG@atc-it.fr> | 2016-06-15 12:17:14 +0200 |
---|---|---|
committer | Corentin Breton <thibeauG@atc-it.fr> | 2016-06-15 12:17:14 +0200 |
commit | 8083fce15bb737fd3fdd9a36762fae76ea5cd8bf (patch) | |
tree | f7ca93944e15af721fc1253730e7947a20ee94c2 /app.php | |
parent | 23b0de66d5572ae6708107ebf70ffb9c650199f1 (diff) | |
download | my_old_personal_website-8083fce15bb737fd3fdd9a36762fae76ea5cd8bf.tar.xz my_old_personal_website-8083fce15bb737fd3fdd9a36762fae76ea5cd8bf.zip |
Mise en place de la récupération des codes d'erreurs de sites disponibles
Diffstat (limited to 'app.php')
-rw-r--r-- | app.php | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -0,0 +1,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; + } +?> |