POST data from one domain to another ?

Reply

Join Date: Apr 2008
Posts: 496
Reputation: veledrom is an unknown quantity at this point 
Solved Threads: 0
veledrom veledrom is offline Offline
Posting Pro in Training

POST data from one domain to another ?

 
0
  #1
Mar 27th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 94
Reputation: sikka_varun is an unknown quantity at this point 
Solved Threads: 11
sikka_varun's Avatar
sikka_varun sikka_varun is offline Offline
Junior Poster in Training

Re: POST data from one domain to another ?

 
0
  #2
Mar 27th, 2009
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.
VâRûN
---Happy to Help---
sikka_varun@yahoo.com
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 496
Reputation: veledrom is an unknown quantity at this point 
Solved Threads: 0
veledrom veledrom is offline Offline
Posting Pro in Training

Re: POST data from one domain to another ?

 
0
  #3
Mar 27th, 2009
Is there any POST example for me?

I'll also read about CURL while waiting.

Thanks
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 1,227
Reputation: kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about 
Solved Threads: 167
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Nearly a Posting Virtuoso

Re: POST data from one domain to another ?

 
0
  #4
Mar 27th, 2009
Form on www.111.com/form.html
  1. <form action="http://www.222.com/process.php" method="post">
  2. <!-- rest of form here -->
  3. </form>
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 496
Reputation: veledrom is an unknown quantity at this point 
Solved Threads: 0
veledrom veledrom is offline Offline
Posting Pro in Training

Re: POST data from one domain to another ?

 
0
  #5
Mar 28th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 94
Reputation: sikka_varun is an unknown quantity at this point 
Solved Threads: 11
sikka_varun's Avatar
sikka_varun sikka_varun is offline Offline
Junior Poster in Training

Re: POST data from one domain to another ?

 
0
  #6
Mar 30th, 2009
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/
VâRûN
---Happy to Help---
sikka_varun@yahoo.com
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 496
Reputation: veledrom is an unknown quantity at this point 
Solved Threads: 0
veledrom veledrom is offline Offline
Posting Pro in Training

Re: POST data from one domain to another ?

 
0
  #7
Mar 30th, 2009
For example: how do i check if username=1 and password=2 in check.php page and return TRUE or FALSE?
  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. ?>
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC