By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,304 Members | 1,254 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,304 IT Pros & Developers. It's quick & easy.

Sending POST data without Submit button or javascript.

P: n/a
Ok, say I have some data:

$name = "Some Name"
$email = "so**@email.com"
etc.

I'd like to send these to a page as POST data, as if they were coming
from a web form, but without having either a "submit" button or using
Javascript's submit() function.

Is there a way to do this?

--
Sugapablo - ru***********@stargate.net
http://www.sugapablo.com | ICQ: 902845

Jul 16 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Sugapablo wrote:
I'd like to send these to a page as POST data, as if they were coming
from a web form, but without having either a "submit" button or using
Javascript's submit() function.

Is there a way to do this?


Yes. The easiest is to use a library or class that someone else wrote
for the purpose. Check this search and see if there is anything you can
use:
http://www.phpclasses.org/search.htm...and&sort=score

Jochen

--
/**
* @author Jochen Buennagel <zang at buennagel dot com>
* @see http://www.sourceforge.net/projects/zang
*/

Jul 16 '05 #2

P: n/a
Jochen Buennagel wrote:
Yes. The easiest is to use a library or class that someone else wrote
for the purpose. Check this search and see if there is anything you can
use:
http://www.phpclasses.org/search.htm...and&sort=score


The cHTTP class worked wonderfully.

Thanks.

--
Sugapablo - ru***********@stargate.net
http://www.sugapablo.com | ICQ: 902845

Jul 16 '05 #3

P: 1
Jochen Buennagel wrote:
[color=blue]
> Yes. The easiest is to use a library or class that someone else wrote
> for the purpose. Check this search and see if there is anything you can
> use:
> http://www.phpclasses.org/search.htm...and&sort=score[/color]

The cHTTP class worked wonderfully.

Thanks.

--
Sugapablo - russpghREMOVE@stargate.net
http://www.sugapablo.com | ICQ: 902845
Hi, I just tryed also the cHTTP class, but didn't worked as expected for me:
When I execute my code, nothing happens. I was expecting to be redirected to the URL where I want to send data in POST.
here is my code:
<?
include("cHTTP.php");
//create instance of the class
$http = new cHTTP();
// to make posts
// clear all fields
$http->clearFields();

$http->addField ( 'email' , 'post1' );
$http->addField ( 'password' , 'post2' );

$http->postPage("http://www.sxmone.com/aroundme/testReader.php");
?>

Did you do it different? How can I be redirected to "testReader.php" with my info posted?
Apr 27 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.