Skip navigation
Currently Being Moderated

sending values to a page, without user input

Apr 8, 2012 7:52 AM

My webpage receives a "callback" from a payment gateway,

 

My webpage checks its validity and processes the information.

 

I'd like to then automatically send some of these variables on to a different website URL, where I have another page which can process those values,

 

How can I do this ? I suppose it's like sending form data but all automated eg. without needing a user to press submit.

 
Replies
  • Currently Being Moderated
    Apr 8, 2012 8:55 AM   in reply to Dax Trajero

    Very simple.

     

    Your CFM page has presumably been posted to, or perhaps passed these variables through the URL scope; you therefore have this information in your hand which you process however you like.

     

    You can therefore use those variables in a CFHTTP request to another page to pass the data over. Take a look at the CFHTTP docs on doing a POST request, everything you need will be in there. Exactly like a user sending a POST request, but without the user

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 10, 2012 2:59 AM   in reply to Dax Trajero

    Dump out the CGI scope in your CF page, you'll have an element called CGI.HTTP_REFERRER - this is the header which the client's browser *might* send you as additional information, you can pass this around as any other variable.

     

    Bear in mind however it's purely informational; some browsers might not send it at all, others it might be wrong, and some it's just plain spoofed, so don't rely on it.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points