for beinners, please check this example on how to use curl library.
to include headers in response, setĀ CURLOPT_HEADER to 1 in curl options. ie,
curl_setopt_array($ch, array(
...
CURLOPT_HEADER => 1,
...
);
to include headers o… more »
some common status returned by http/1.1 (taken from this document).200 OKThe request has succeeded. 301 Moved PermanentlyThe requested resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the retur… more »
a general php code to download any type of file: header("Content-Type: application/octet-stream"); header("Content-Length: " . filesize($filename)); header("Content-Disposition: attachment; filename=\"$filename\""); readfile($filename); co… more »
notes and references on web development and various things.
disclaimers
this site does not guarantee accuracy of information provided. codes may not be tested, are provided as is and are free to to use. use at your own risk. limited or no support will be provided.
under no circumstances shall this site be responsible or liable for any damages or consequences as a result of direct or indirect usage of any information from this website.