943,987 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 2595
  • PHP RSS
Mar 27th, 2009
0

POST data from one domain to another ?

Expand Post »
Hi,

Let's say i have a form in www.111.com/form.html where user can submit name and surname with POST action.

Can we send the POST data (name and surname) from www.111.com/form.html to www.222.com/process.php to be processed?

Thanks
Similar Threads
Reputation Points: 38
Solved Threads: 0
Master Poster
veledrom is offline Offline
724 posts
since Apr 2008
Mar 27th, 2009
0

Re: POST data from one domain to another ?

Hi.

Yes this thing works... Infact, the most famous payment gateway PAYPAL works on this principle...

If you want to make your transaction more secure, use CURL. Using this, you can get your data processed from other server.

Otherwise, this simple POST also works good.
Reputation Points: 11
Solved Threads: 12
Junior Poster in Training
sikka_varun is offline Offline
94 posts
since Dec 2008
Mar 27th, 2009
0

Re: POST data from one domain to another ?

Is there any POST example for me?

I'll also read about CURL while waiting.

Thanks
Reputation Points: 38
Solved Threads: 0
Master Poster
veledrom is offline Offline
724 posts
since Apr 2008
Mar 27th, 2009
0

Re: POST data from one domain to another ?

Form on www.111.com/form.html
PHP Syntax (Toggle Plain Text)
  1. <form action="http://www.222.com/process.php" method="post">
  2. <!-- rest of form here -->
  3. </form>
Reputation Points: 235
Solved Threads: 193
Nearly a Posting Virtuoso
kkeith29 is offline Offline
1,315 posts
since Jun 2007
Mar 28th, 2009
0

Re: POST data from one domain to another ?

I have downloaded curl and ream the installation for win and ubuntu. However, i didn't get it. Is there any source where it is explained step by step?

thanks
Reputation Points: 38
Solved Threads: 0
Master Poster
veledrom is offline Offline
724 posts
since Apr 2008
Mar 30th, 2009
0

Re: POST data from one domain to another ?

Hi,

Why to get the CURL Library individually and install it.. You can use XAMPP/WAMP type integrated environment apps, that gives you almost everythng.. They have built in curl extensions for windows (you might have to enable it from php.ini file).

And for the CURL learning/tutorial, check out the links below.. they are good for beginners. You can switch to advanced version later on.

http://www.higherpass.com/php/Tutori...emote-Servers/

http://blog.unitedheroes.net/curl/
Reputation Points: 11
Solved Threads: 12
Junior Poster in Training
sikka_varun is offline Offline
94 posts
since Dec 2008
Mar 30th, 2009
0

Re: POST data from one domain to another ?

For example: how do i check if username=1 and password=2 in check.php page and return TRUE or FALSE?
PHP Syntax (Toggle Plain Text)
  1. <?
  2. $ch = curl_init();
  3. curl_setopt($ch, CURLOPT_URL, 'http://www.mysite.com/check.php');
  4. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  5. curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
  6. curl_setopt(CURLOPT_USERPWD, '[username]:[password]')
  7.  
  8. $data = curl_exec();
  9. curl_close($ch);
  10. ?>
Reputation Points: 38
Solved Threads: 0
Master Poster
veledrom is offline Offline
724 posts
since Apr 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Photo pieces compiled in table
Next Thread in PHP Forum Timeline: PHP page redirection





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC