Page 1 of 1

Redirect to external page and type in a text in textbox

Posted: Tue May 17, 2005 5:07 am
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

Posted: Tue May 17, 2005 7:11 am
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.

Posted: Tue May 17, 2005 7:20 am
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

Posted: Tue May 17, 2005 7:46 am
by anjanesh
Is it going to be a GET or POST method ?

Posted: Tue May 17, 2005 7:48 am
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

Posted: Tue May 17, 2005 8:29 am
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

Posted: Tue May 17, 2005 8:35 am
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