summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
+ }
+?>