X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   How to submit a form to another website? (https://forum.x-cart.com/showthread.php?t=44676)

Vetrivel 01-08-2009 05:55 AM

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.

geckoday 01-08-2009 06:58 AM

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.

Vetrivel 01-08-2009 09:27 AM

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.


Holub 01-09-2009 12:41 AM

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.

Vetrivel 01-09-2009 01:19 AM

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).:D/:D/:D/
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.



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

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.