Page 1 of 1

Logging into a Form using PHP

Posted: Tue Jun 20, 2006 4:04 pm
by Nashtrump
Hi there,

I was wanting to log into a website automaticallly (cause it annoys me having to type out my details everytime!)

I wastrying to use Javascript to fill the form:

myform.username = "MyUsername"
myform.password = "Mypassword"

But i kinda got a bit lost on the submit button!
My friend told me that PHP has a way of doing it, and though i have basic knowledge of PHP i couldnt for the life of me work out a way to access forms using php.

Does anyone have any suggestions of any websites that are handy to read up on this information?

Kind regards

Nash

Posted: Tue Jun 20, 2006 5:59 pm
by Robert Plank
myform.somebutton.click()

Posted: Wed Jun 21, 2006 12:32 pm
by Nashtrump
Thanks for that
Any idea how i call javascript through PHP or do you know of any way to submit/log into a form through PHP?

Posted: Wed Jun 21, 2006 2:23 pm
by feyd
cURL, Snoopy and some others can do form submissions.

Posted: Wed Jun 21, 2006 4:13 pm
by Nashtrump
Im actually looking to build a php page that when clicked will log into myspace.com...

Any ideas?

Using Curl and Snoopy doesnt really help me cause they are external packages.. i simply just want one page containing the code to do this..

I was thinking bout being able to display the page then calling a javascript function which will fill the username and password boxes then click the submit button.

Then go back to the php script and do the next part.. is this possible?