Need help to limit to certain domains

Discussion in 'PHP' started by PHPKit, Jun 17, 2008.

  1. #1
    Hi all, I am very new to PHP.
    I am working on a PHP developed by someone else, that returns data with details sales products. I need to add on code to limit to accept requests from one domain (say, yahoo.com) and its subdomains ONLY. How can I do that?? Should I work on looking up IPs??

    Thank you for your help…
     
    PHPKit, Jun 17, 2008 IP
  2. it career

    it career Notable Member

    Messages:
    3,562
    Likes Received:
    155
    Best Answers:
    0
    Trophy Points:
    270
    #2
    Cookies can come handy , I guess you need to limit number of request that you want to accept per user.
     
    it career, Jun 17, 2008 IP
  3. rohan_shenoy

    rohan_shenoy Active Member

    Messages:
    441
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    60
    #3
    You can try $_SERVER['REMOTE_ADDR'] in a aconditional statement.
     
    rohan_shenoy, Jun 18, 2008 IP