Prevent php regex, someone using myphpfile.php maybe using they bot spammer script

Discussion in 'PHP' started by basketmen, Jul 13, 2011.

  1. #1
    Hi guys,

    few days ago my host says in one of my website are sending large mail, that come from senegal country ip


    here are my host says


    myphpfile.php are file for sending private message (member got email notification too for each private message) to another member in my site, you must be login to use that page



    is there a way to prevent myphpfile.php page by accessing from other server, so only real user that can accessing the page? maybe like prevent hotlinking image





    please share your knowledge guys
     
    basketmen, Jul 13, 2011 IP
  2. AdsMakeSense

    AdsMakeSense Active Member

    Messages:
    389
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    70
    #2
    If only you want to access it, you should just add an IP allow only to the script and only allow PHP Remote Host (Your IP) to use the script.
     
    AdsMakeSense, Jul 13, 2011 IP
  3. basketmen

    basketmen Well-Known Member

    Messages:
    837
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    130
    #3
    maybe this is what i need, what is the methode for this so i can search in google, or tutorial link please
     
    basketmen, Jul 13, 2011 IP
  4. BRUm

    BRUm Well-Known Member

    Messages:
    3,086
    Likes Received:
    61
    Best Answers:
    1
    Trophy Points:
    100
    #4
    Use PHP's global variables, such as $_SERVER to get a user's IP address.
     
    BRUm, Jul 14, 2011 IP