summaryrefslogtreecommitdiff
path: root/app.php
diff options
context:
space:
mode:
authorCorentin Breton <thibeauG@atc-it.fr>2016-06-15 12:17:14 +0200
committerCorentin Breton <thibeauG@atc-it.fr>2016-06-15 12:17:14 +0200
commit8083fce15bb737fd3fdd9a36762fae76ea5cd8bf (patch)
treef7ca93944e15af721fc1253730e7947a20ee94c2 /app.php
parent23b0de66d5572ae6708107ebf70ffb9c650199f1 (diff)
downloadmy_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.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/app.php b/app.php
new file mode 100644
index 0000000..87f9483
--- /dev/null
+++ b/app.php
@@ -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;
+ }
+?>