SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Nov 2004
    Location
    essex, england
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to capture the visiting website URL

    I'm building a shop site and have it integrated with a payment processor using callbacks just fine. When the payment processor finishes the payment it hits a url on my site and posts me the data so that i can confirm the data. I want to validate that only the payment processor can hit this url and do anything.

    I know this is a simple question but what code (global variable i think) is it to identify the payment processor web address that is hitting my url?

    Cheers!!

  2. #2
    SitePoint Enthusiast the-webber's Avatar
    Join Date
    Mar 2009
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    $_SERVER['HTTP_REFERER'] gives you the full url that sent user our way, though this can be faked.

  3. #3
    SitePoint Zealot
    Join Date
    Nov 2004
    Location
    essex, england
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i did look at that but for some reason i didn't think it was the right one (hence my asking on here!)

    Thanks a lot!!

    I know it can be faked, i have another 2 levels of validation beyond that that can't be faked luckily, i just thought that i should throw in another level of validation on top. No harm in being super paranoid!!

    Thanks again!!


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
  •