468,247 Members | 1,302 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,247 developers. It's quick & easy.

Sending POST data without Submit button or javascript.

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
3 22934
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
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
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.

Similar topics

2 posts views Thread by Person | last post: by
4 posts views Thread by Dodo | last post: by
7 posts views Thread by Matt | last post: by
2 posts views Thread by sunilthk | last post: by
2 posts views Thread by rynato | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.