473,240 Members | 1,839 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,240 software developers and data experts.

Send data to another server

Hi, I need to send some data through php, does anyone know how to do this? I just need to send a request to a server for credit card processing. I'm new to php. Also another thing I could do is to use XML through php. I already have the XML code. Thanks for all your help,
Mikael
Sep 11 '05 #1
3 4105
pbmods
5,821 Expert 4TB
To send data to another server, you have several options, but the most basic is to use file_get_contents():

Expand|Select|Wrap|Line Numbers
  1. $response = file_get_contents('http://servername.tld/path/to/file.ext?option=value...');
  2.  
In order for this to work, you must have the allow_url_fopen directive enabled in your php.ini file.
Aug 29 '07 #2
Atli
5,058 Expert 4TB
Alternatively, if you do not have allow_url_fopen enabled, you can use the get_headers() function.

Note that this will only return the headers of the requested page.
Aug 29 '07 #3
gregerly
192 Expert 100+
Hi, I need to send some data through php, does anyone know how to do this? I just need to send a request to a server for credit card processing. I'm new to php. Also another thing I could do is to use XML through php. I already have the XML code. Thanks for all your help,
Mikael
One of the other options you have is CURL

http://www.php.net/curl

The link above will get you started using CURL.

Greg
Aug 29 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: ij | last post by:
Hi, I'm trying to submit an image object, along with some other text fields to another web server from within an ASP page but am stuck on getting the image to be submitted with the form. In a...
3
by: Kassam | last post by:
Hi MVPs out there. I have constructed an order form and the users will enter the informtion. I now need to send the filled out form as an e-mail (body being the HTML with the fille din data) to...
2
by: SWJust | last post by:
Hi... is it possible to send data from a socket to at physical address (MAC) on f.x another PC or Router ??? I have a IP header with information about another client, and this cannot be altered,...
3
by: Simon | last post by:
Hi, I have webpage (sql.aspx) in asp.net with a big textbox. In this box, I generate SQL queries. Some of the queries can takes more than 2000 characters lenght. I want to send the content of the...
1
by: zPaul | last post by:
Maybe, I am asking to wrong group but, here is what I need to do. If you can direct to right direction, I will appreciated it. I will have a web site that the user will interact. Every once in a...
5
by: zorhel | last post by:
Hi. My clients will be IE, Mozilla and Opera in a Windows and *nix OS. So, my web app need to, from a server, send messages to a specific client (browser), send messages for all clients,...
9
by: eswanson | last post by:
I have a web page I need to post a file plus some other fields to it. How can I do this from a asp.net page. I know I can send individual fields to the other page, but how do I send a file to the...
14
by: eliss.carmine | last post by:
I'm using TCP/IP to send a Bitmap object over Sockets. This is my first time using C# at all so I don't know if this is the "right" way to do it. I've already found out several times the way I was...
5
by: Markgoldin | last post by:
I am searching for a solution of sending messages from not .Net process into a .Net process written in C#. I have gone already thru sockets solution and have porblems with it. I am not a C# coder...
0
by: Xionbox | last post by:
Hello everybody, The error I have seems very easy to solve, but for some odd reason I can't seem to solve it. Anyways, here's my "setup". I created a server running on localhost:1200 (telnet...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.