Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

How to submit a form to another website?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-08-2009, 05:55 AM
  Vetrivel's Avatar 
Vetrivel Vetrivel is offline
 

eXpert
  
Join Date: Apr 2008
Posts: 398
 

Default How to submit a form to another website?

Hi ,
When customer made an order i need to submit some order data to other website .I can use both get and post method to do that.and without redirect the page like what we do for payment method.
Is there a funtion in xcart to do that .I need to do it in func.order.php file.So i cant use js to do that.
Thanks in advance.
Reply With Quote
  #2  
Old 01-08-2009, 06:58 AM
 
geckoday geckoday is offline
 

X-Wizard
  
Join Date: Aug 2005
Posts: 1,073
 

Default Re: How to submit a form to another website?

You can use func_https_request to do this. See payment/cc_authorizenet.php for an example.
__________________
Manuka Bay Company
X-Cart Version 4.0.19 [Linux]

UGG Boots and other fine sheepskin products
http://www.snowriver.com
Reply With Quote
  #3  
Old 01-08-2009, 09:27 AM
  Vetrivel's Avatar 
Vetrivel Vetrivel is offline
 

eXpert
  
Join Date: Apr 2008
Posts: 398
 

Default Re: How to submit a form to another website?

it is using https but i need just http...
Quote:
Originally Posted by geckoday
You can use func_https_request to do this. See payment/cc_authorizenet.php for an example.
Reply With Quote
  #4  
Old 01-09-2009, 12:41 AM
  Holub's Avatar 
Holub Holub is offline
 

X-Adept
  
Join Date: Jan 2008
Posts: 432
 

Default Re: How to submit a form to another website?

If your server has enabled "allow_urls_fopen" you can use simple fopen("http://domain.com/dir/file?var1=value1&var2=value2"); This is for GET method. For POST method you should use CURL module (see manual) or func_http_request function from x-cart.
__________________
Regards,
Anthony Holub

X-Cart Skins Store
- twenty two different skins available;
- both 4.1.x and 4.2.x versions compatible;
- refresh you store now!

Smart menu X-Cart add-on
Featured Products Slide Show X-Cart add-on
"What's New?" FREE X-Cart add-on
Reply With Quote
  #5  
Old 01-09-2009, 01:19 AM
  Vetrivel's Avatar 
Vetrivel Vetrivel is offline
 

eXpert
  
Join Date: Apr 2008
Posts: 398
 

Default Re: How to submit a form to another website?

thnks Holub.
I dont know how i missed fopen ..
I think this will work for me and i will test it and get back to you.
NOTE: you forgot to mention the mode(second argument for fopen).
Quote:
Originally Posted by Holub
If your server has enabled "allow_urls_fopen" you can use simple fopen("http://domain.com/dir/file?var1=value1&var2=value2"); This is for GET method. For POST method you should use CURL module (see manual) or func_http_request function from x-cart.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:14 PM.

   

 
X-Cart forums © 2001-2020