2
Bestand:
/.CodeBee/Helpers/Visitor.php
Regelnummer:
77
Melding:
file_get_contents(https://geoip.nekudo.com/api/216.73.216.12): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
array(6) {
["file"]=>
string(72) "/var/www/vhosts/nieuw.ledframes.nl/httpdocs/.CodeBee/Helpers/Failure.php"
["line"]=>
int(36)
["function"]=>
string(4) "show"
["class"]=>
string(7) "Failure"
["type"]=>
string(2) "::"
["args"]=>
array(5) {
[0]=>
int(2)
[1]=>
string(131) "file_get_contents(https://geoip.nekudo.com/api/216.73.216.12): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
"
[2]=>
string(72) "/var/www/vhosts/nieuw.ledframes.nl/httpdocs/.CodeBee/Helpers/Visitor.php"
[3]=>
int(77)
[4]=>
array(4) {
["link"]=>
string(42) "https://geoip.nekudo.com/api/216.73.216.12"
["curlInit"]=>
resource(15) of type (Unknown)
["response"]=>
string(535) "HTTP/1.1 301 Moved Permanently
Date: Tue, 21 Apr 2026 04:55:03 GMT
Connection: keep-alive
Location: https://geoip.nekudo.com/shutdown
Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=4WwjqukX8PK7cIZ9C%2BS3PrH06UJ%2FQCNxpLf9HRTz5GS%2FEN8cmV5X8TJUR307632Bjr72qStbOdQ3DnEEvE0%2FBYhhor12uI4r56RmR%2BKMqaFHCIY3siz4XhOc7wlDULgs%2Bwm9OqgAl7HKWHVFdTU%3D"}]}
Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
Server: cloudflare
CF-RAY: 9ef9cb597eddbd8d-AMS
"
["http_response_header"]=>
array(23) {
[0]=>
string(30) "HTTP/1.1 301 Moved Permanently"
[1]=>
string(35) "Date: Tue, 21 Apr 2026 04:55:03 GMT"
[2]=>
string(17) "Content-Length: 0"
[3]=>
string(17) "Connection: close"
[4]=>
string(43) "Location: https://geoip.nekudo.com/shutdown"
[5]=>
string(274) "Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=%2FrA%2F%2Bh%2FFyxQPYMGWoAK3wCBI8if2FwAW8hnNvdd9sI3ZfzVVJGg3sZcIOADn4c6bVA0PWXXWxrLkFj3X1VKiJGNs40aYHnNVSF2Pw5z7VBryYbvrOdGy5Ucus%2B%2F0Pt7LCE6VE3q8KveQuws7Uu8%3D"}]}"
[6]=>
string(67) "Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}"
[7]=>
string(18) "Server: cloudflare"
[8]=>
string(28) "CF-RAY: 9ef9cb59bfc4992f-AMS"
[9]=>
string(22) "HTTP/1.1 404 Not Found"
[10]=>
string(35) "Date: Tue, 21 Apr 2026 04:55:04 GMT"
[11]=>
string(38) "Content-Type: text/html; charset=utf-8"
[12]=>
string(19) "Content-Length: 383"
[13]=>
string(17) "Connection: close"
[14]=>
string(34) "x-amz-request-id: EQTQWE5G26W9YBG4"
[15]=>
string(108) "x-amz-id-2: 1dEyxn1T0VH+dxLnfBzqnFPm2uHTjhXGjaiPV8Sfunc/k2SFo4sWqMW/5RrlzEIg8zbPlEewTwTCNcpGLaXdwGnk4uiLY8vK"
[16]=>
string(18) "Server: cloudflare"
[17]=>
string(11) "Age: 601227"
[18]=>
string(31) "Cache-Control: max-age=31536000"
[19]=>
string(20) "cf-cache-status: HIT"
[20]=>
string(67) "Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}"
[21]=>
string(268) "Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=7qus8qJ7uTr%2FlgJ60Hvohy0U5kmCgvT11fkNFUPXQhhiyMytZH4Yn%2BakhfDfx4toeFdoyopeAkhnnOQKb7QCXwrEKSLZzMz24gh0SeaiF4PIvSzSxIdlYiu%2B80hUcZ4MvOBl4JFu25427lpPZPU%3D"}]}"
[22]=>
string(28) "CF-RAY: 9ef9cb5a28f8319d-AMS"
}
}
}
}
67 curl_setopt($curlInit,CURLOPT_HEADER,true);
68 curl_setopt($curlInit,CURLOPT_NOBODY,true);
69 curl_setopt($curlInit,CURLOPT_RETURNTRANSFER,true);
70
71 //get answer
72 $response = curl_exec($curlInit);
73
74 curl_close($curlInit);
75
76 if ($response){
77 $geo = file_get_contents($link);
78 $geo = json_decode($geo);
79 } else {
80 $geo = new \stdClass;
81 $geo->city = "";
82 $geo->country = new \stdClass;
83 $geo->country->code = "";
84 }
85
86 self::$location = $geo;