http status codes

by prettyscripts on 2008-01-15 14:41:32 • Leave a comment »

bookmarkhtml

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 »

Tags: header, http, status

php: stream download

by prettyscripts on 2007-11-27 22:42:37 • Leave a comment »

php

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 »

Tags: download, header, php