473,386 Members | 1,812 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,386 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 4112
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.