scriptygoddess

Archive for the ‘PHP Related’ Category

09 Feb, 2007

Force File Download

Posted by: Jennifer In: Bookmarks|PHP Related|Script snippet|Scripts

How to force a file to download (without having to zip it up). $filename = "secure/writeToFile.doc"; header("Content-Length: " . filesize($filename)); header('Content-Type: application/msword'); header('Content-Disposition: attachment; filename=writeToFile.doc'); readfile($filename); a few other content types – lots more at the above link… "pdf": "application/pdf" "zip": "application/zip" "xls": "application/vnd.ms-excel" "ppt": "application/vnd.ms-powerpoint" "gif": "image/gif" "png": "image/png" "jpg": "image/jpg" "mp3": "audio/mpeg" "mp3": […]

04 Jan, 2007

Captcha

Posted by: Jennifer In: Bookmarks|PHP Related

Just installed this captcha code on a form and it was extremely simple to do and so far seems to work great. Just thought I'd share.

Comments Off on Captcha

Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements