Prettyscripts

HTTP Status Codes

Some common status returned by HTTP/1.1 (taken from this document). 200 OK The request has succeeded. 301 Moved Permanently The requested resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs. 304 Not Modified No new data. 400 Bad Request The request could…

Continue Reading »

PHP: Stream Download

A general php code to download any type of file: content-type defines the type of file being sent. application/octet-stream is used for any kind of files. content-length indicates the size of information. this is to let browser know how much data to download in advance and ensure content-disposition is used to suggest the file name…

Continue Reading »