Redirect to external page and type in a text in textbox

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
HuGo.B
Forum Newbie
Posts: 4
Joined: Tue May 17, 2005 5:02 am

Redirect to external page and type in a text in textbox

Post by HuGo.B »

Hello!

I'm very new to PHP, but I'm a skille asp.net programmer.

I wonder if this is possible:
I redirect the browser to a external page where there is only a form with one textbox and a submit button. I want to enter a text in this textbox, PROGRAMMATICALLY, andpress the submit button to "login" to the page.

Thereafter I want to get the source of the page...

The rest, I can handle.

Thank you for a very fast answer, though it is a little bit urgent.

/HuGo.B
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

Code: Select all

<input type="text" name="text1" value="something" />
<input type="submit" name="sub1" value="Submit">
Thereafter I want to get the source of the page...
Next page :
echo $_SERVER['HTTP_REFERER'];
This doesnt seem to work always it seems.
HuGo.B
Forum Newbie
Posts: 4
Joined: Tue May 17, 2005 5:02 am

Post by HuGo.B »

Thanks for your answer..

But I need to write the text and gpress the submit button programatically.
The user don't havve to do anything. Everything should be in the program.

Thank you
/HuGo.B
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

Is it going to be a GET or POST method ?
HuGo.B
Forum Newbie
Posts: 4
Joined: Tue May 17, 2005 5:02 am

Post by HuGo.B »

It is a post method.

The sitename is: http://www.sanav.com/eric/gprs_read.aspx
and the value I want to write in the textbox is: 351277000546068

And thereafter I want to post this value...

Thank you
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

This was just discussed.
I dont know the complete solution - did not try it yet but will give you a start of where to go.
viewtopic.php?t=33369
HuGo.B
Forum Newbie
Posts: 4
Joined: Tue May 17, 2005 5:02 am

Post by HuGo.B »

I have already checked that post...
But it didn't help me much...

Any other help would be gratfully accepted..

Best regards
/HuGo.B
Post Reply