I wrote a class that determines if cURL is available if it does GET, POST, DELETE using cURL. In the cURL version, I use curl_getinfo($curl, CURLINFO_HTTP_CODE);to get the HTTP code. If cURL is not available, it uses fopen () to read the contents of the file. How to get HTTP header code without cURL?
source
share