關於 PHP, Linux, Open Source 及個人生活記載的網誌。
RSS icon
  • 預防 PHP Header Spam

    Posted on November 20th, 2006 Sam Tang No comments

    很多網站也有用到 form to mail 的功能,用 php 只需用 mail() 就可以簡單完成,但如果編寫 form to mail 時忽略了安全性,很可能被 spammers 利用你的 form to mail 程式發送垃圾郵件。

    在 PHPBuilder 有一篇文章 "Preventing spam when using PHP's mail function" 介紹了補救方法,大致上也是對用戶所輸入的資料做過濾。修復問題只要幾分鐘,不然自己的網站被 ban 就麻煩了。


    Leave a reply

    *
    To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
    Click to hear an audio file of the anti-spam word