Need help with get function

Discussion in 'PHP' started by surfnearnzone, Apr 18, 2010.

  1. #1
    I want to collect form data from another server but I don't want that anyone else to be able to post data to my data collection script. Data would be sent in the form of "URL.com/getdata.php?data1=xxx&data2=xxx&data3=xxx&data4=xxx&data5=xxx"

    how can I secure this?
     
    surfnearnzone, Apr 18, 2010 IP
  2. aTo

    aTo Active Member

    Messages:
    473
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    78
    #2
    change ur $_GET['something'] to a $_POST['something'] variable, maybe we can see what u really need, can u post script?
     
    aTo, Apr 18, 2010 IP
  3. viron86

    viron86 Active Member

    Messages:
    426
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    60
    #3
    ya change form action to post and send the data
     
    viron86, Apr 18, 2010 IP
  4. guardian999

    guardian999 Well-Known Member

    Messages:
    376
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #4
    add session checking
    "URL.com/getdata.php?data1=xxx&data2=xxx&data3=xxx&data4=xxx&data5=xxx&session=233dasd32e3"
     
    guardian999, Apr 18, 2010 IP
  5. CYBERAY

    CYBERAY Well-Known Member

    Messages:
    1,478
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    180
    #5
    it is the truw way to change
     
    CYBERAY, Apr 18, 2010 IP
  6. surfnearnzone

    surfnearnzone Well-Known Member

    Messages:
    1,492
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    165
    #6
    The script is mine but the get data is being sent by an advertising company. I cannot change that. My script can accept data at this moment but I am only worried that someone may hack the script to know the data fields and fill it with false data.

    I just want to validate that when the data comes from advertising company's IP only then the data is processed else nothing is saved.

    Somebody suggested to me to set referrer variable but he did not explain more so I don't know how to use it.

     
    surfnearnzone, Apr 19, 2010 IP
  7. frank100

    frank100 Peon

    Messages:
    65
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    lol ..even post is not safe as their are many browser plugin which allows u to play with post data in runtime
    even referral checking is not enought as it can changed...

    so may be u should come up with other security system in combination of 2-3 techniques....
    base url checking can be one way as well...
     
    frank100, Apr 19, 2010 IP