473,387 Members | 3,684 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,387 software developers and data experts.

sending a post to another php script


I knew the GET way ('called.php?para1=aaa&para2=xxxx'),
but how about the POST way?

--
iTech Consulting Services Limited
Expert of ePOS solutions
Website: http://www.itech.com.hk (IE only)
Tel: (852)2325 3883 Fax: (852)2325 8288
Mar 30 '07 #1
4 1480
"Man-wai Chang" <to***********@gmail.comwrote in message
news:46******@127.0.0.1...
>
I knew the GET way ('called.php?para1=aaa&para2=xxxx'),
but how about the POST way?

You must learn the ways of the cURL if you're to post a request to another
file.

http://fi.php.net/manual/en/ref.curl.php

--
"Ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" - lpk
http://outolempi.net/ahdistus/ - Satunnaisesti päivittyvä nettisarjis
sp**@outolempi.net | rot13(xv***@bhgbyrzcv.arg)
Mar 30 '07 #2
Man-wai Chang schrieb:
>
I knew the GET way ('called.php?para1=aaa&para2=xxxx'),
but how about the POST way?
Hi,

the PEAR package HTTP_Client does it.
http://pear.php.net/package/HTTP_Client

Mar 30 '07 #3
Hello,

on 03/30/2007 02:21 AM Man-wai Chang said the following:
>
I knew the GET way ('called.php?para1=aaa&para2=xxxx'),
but how about the POST way?
You may want to take a look at this popular HTTP client class. It
supports cookie handling, authentication, redirection, SSL, etc..

http://www.phpclasses.org/httpclient
--

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
Mar 31 '07 #4
You can do as various others have suggested but there is a built in
php way:

$vars = array("id" =$_REQUEST['id'],
"header" =$_REQUEST['header'],
"abstract" =$_REQUEST['abstract'],
"body" =$_REQUEST['body']
);
http_post($server, $port, $url, $vars);

It's perhaps self-explanatory, I'm getting four posted attribute/value
pairs from the request stream which I'm storing with the same names
(you could change them if you wanted) into an array called $vars. I
then call http_post passing the server, port and url of where I'm
connecting to with the posted array as the last parameter.

Rob

On Fri, 30 Mar 2007 13:21:33 +0800, Man-wai Chang
<to***********@gmail.comwrote:
>
I knew the GET way ('called.php?para1=aaa&para2=xxxx'),
but how about the POST way?
Apr 3 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: pablo | last post by:
Dear News Groupers, I'am trying to send a php array with a hidden input field from a form to another script. The array is NOT made directly by way of <input name="arrayname" />. The array is...
2
by: yawnmoth | last post by:
i'm trying to send an http post request and see if the server got it correctly. i'm sending the http post request with this script: <? $address = 'domain.tld'; $port = 80; $proxy =...
3
by: J’Gius³ vs ::NRG::ius | last post by:
Hi all. I have a script with a form <form action="a.php" ... method="post"> <input name="field" ...> </form> a.php gets the variable with
4
by: Francois Keyeux | last post by:
hello everyone: i have a web site built using vbasic active server scripting running on iis (it works on either iis 50 and 60, but is designed for iis 50) i know how to create a plain text...
5
by: fochie | last post by:
Greetings, I'm trying to send data to my server using xmlhttp POST. The data being sent is actually an HTML page that is built with javascript in the browser. The HTML code contains a small...
2
by: Marcelo | last post by:
Hi guys, I'm using the following code to send values from one page to another, but seems to me, that the event Page_Load in the receiving page never fires. Why? This is the code: Thanks ...
3
by: Sydney | last post by:
Hi, I am trying to construct a WSE 2.0 security SOAP request in VBScript on an HTML page to send off to a webservice. I think I've almost got it but I'm having an issue generating the nonce...
1
by: empiresolutions | last post by:
im using the script.aculo.us drag n drop script. i am having an issue getting a checkbox to POST its value if checked, once the row the checkbox is in is moved. I believe that once i change the...
2
by: lstanikmas | last post by:
Hi, I'm validating a form with this ASP but receiving some blank email responses; does anyone see anything wrong with it?: function isFormVarExcluded(thisForm, strToCheck) { var strExcludeVars...
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...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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.