Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24

Thread: Emails harvested through PHP code?

  1. #11
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Viruses don't play nice. They don't let you block them. That assumption is naïve and wrong.
    (Is it the double dots over the i in naive? I always forget...)
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  2. #12
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It is

    We're not technically talking "viruses" here. But yes, same concept applies. These aren't "nice" bots. They're not going to tell you what they are or what they're going to do, and they will try everything they can to look like a normal user.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #13
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Acey99 View Post
    Attached is a great browser class that'll help.
    No server-side user agent detection code could ever be called "great"; it's even less reliable than attempting it client-side.

    Mike

  4. #14
    Join Date
    Nov 2006
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    the other alternative is to have a "validation" image
    Thus needing a db (MySQL)
    and the GD Library (installed/compiled) ?

    & ok, so it's a decent browser detection class.

  5. #15
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Again, read my post on effective CAPTCHAs.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #16
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Acey, CAPTCHAs are totally irrelevant here.
    We're talking about a document containing email address. It would be accessed by a bot. No user would be supposed to see it either, so no need to include a CAPTCHA that would then allow them to see it.
    The question is just how to store the emails on the server and have them available for his needs but not allow spam bots to collect them (or malicious users, for that matter).
    The probelm was solved in the first post; he was simply asking if what he did was correct. And it was.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  7. #17
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Aye, and I felt pretty secure storing the file with the email addys outside the /root/ but I wanted to verify this was indeed inaccessable (without server admin passwords of course)
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  8. #18
    Join Date
    Nov 2006
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ah, I understand
    try html encoding them
    or they some encoding method of your own I use this :

    function EncryptText($iVal,$hex=""){
    $out = "";
    $sl = strlen($iVal)-1;
    for($i=0;$i<=$sl;$i++){
    $ch = substr($iVal,$i,1);
    if ($hex) $out .= "&#x".dechex(ord($ch)).";";
    else $out .= "&#".ord($ch).";";
    }
    return $out;
    }


    bot's don't understand &#xNN; or &#NN;
    or what to do with them - yet;

    you could also write your own encoder/decoder that would accomplish the same thing.

  9. #19
    Join Date
    Nov 2006
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    other things you can try:

    if using a linux/unix box, hide the emails in a . file (like .htaccess)
    don't use a file called emails (or have email in the filename)

    also hide the file somewhere bot's can't get to (like /var/ or /etc), those are bad, but you get the idea.

    use base64_encode() / base64_decode() on the text file.
    use a database to store the emails, also encrypted with base64_encode() / base64_decode()

    I have tons of other Ideas.

  10. #20
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Many bots DO understand that.

    Anything you do that you then undo can also be undone by bots.

    The problem is solved.

    Directories above 'public_html' cannot be accessed.

    Easy answer too.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •