Skip to main content
Inspiring
April 13, 2011
Answered

is there a way to check if page request was made by specifc URL ?

  • April 13, 2011
  • 2 replies
  • 1024 views

I need to lock-down a page so it only responds to when a form is sent from our payment gateway

Is there a way to check WHO is sending the page request

ie. if page request from was payment provider then process the form

I'm already checking if the form fields are valid by xreffing them with our own details

I'm checking if the request was for the HTTPS version of our page

I'd now like to check if the request was from our payment gateway's URL

    This topic has been closed for replies.
    Correct answer Owainnorth

    I'd use cgi.remote_addr and check the IP address, the only other thing you could use is the referrer but that can be easily spoofed.

    2 replies

    Inspiring
    April 13, 2011

    OK, thanks guys.

    Got the info I need.

    Owainnorth
    OwainnorthCorrect answer
    Inspiring
    April 13, 2011

    I'd use cgi.remote_addr and check the IP address, the only other thing you could use is the referrer but that can be easily spoofed.

    Inspiring
    April 13, 2011

    Thanks Owain

    Perhaps I'm barking up the wrong tree checking the specific IP address, especially when that IP address can be subject to change ?

    Is there a better way to check if a page request came from my payment gateway ?

    Participating Frequently
    April 13, 2011

    What is your payment gateway?  A CFC?  Not sure I understand, maybe you could be more specific (what template is calling what template and from what domain(s)).  Dump the CGI scope - it's got a lot of "stuff" in it that might help (as the other poster mentioned).