• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

sending values to a page, without user input

Participant ,
Apr 08, 2012 Apr 08, 2012

Copy link to clipboard

Copied

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.

TOPICS
Getting started

Views

833

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guide , Apr 08, 2012 Apr 08, 2012

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

Votes

Translate

Translate
Guide ,
Apr 08, 2012 Apr 08, 2012

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 09, 2012 Apr 09, 2012

Copy link to clipboard

Copied

Thank you owain, this sounds perfect.

I'll check it out.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 10, 2012 Apr 10, 2012

Copy link to clipboard

Copied

Owain, that did the trick. Many thanks.

Do you know, if there's a way on the target server, to check the originating website name that sent the cfhttp ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Apr 10, 2012 Apr 10, 2012

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation