php - Getting header response code -
This is part of a PHP script that I am putting together. Actually a domain ($ domain1) is defined in a form and a different message is displayed based on the response code from the server. However, I'm having problems to work on this 3-point response code I am interested in.
Even I have so far:
function get_http_response_code ($ domain1) {$ headers = get_headers ($ domain1); Return substrate ($ header [0], 9, 3); Forex Currency ($ get_http_response_code $ as Hoyhead) {if ($ gethead == 200) {echo "OKAY!"; } Else {echo "no!"; }}}}
$ domain1 = 'http: // google Com '; Function get_http_response_code ($ domain1) {$ headers = get_headers ($ domain1); Return substrate ($ header [0], 9, 3); } $ Get_http_response_code = get_http_response_code ($ domain1); If ($ get_http_response_code == 200) {echo "OK!"; } Else {echo "no!"; }
Comments
Post a Comment