Logging into a Form using PHP

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
Nashtrump
Forum Newbie
Posts: 13
Joined: Wed May 03, 2006 1:56 pm

Logging into a Form using PHP

Post 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
Robert Plank
Forum Contributor
Posts: 110
Joined: Sun Dec 26, 2004 9:04 pm
Contact:

Post by Robert Plank »

myform.somebutton.click()
Nashtrump
Forum Newbie
Posts: 13
Joined: Wed May 03, 2006 1:56 pm

Post 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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

cURL, Snoopy and some others can do form submissions.
Nashtrump
Forum Newbie
Posts: 13
Joined: Wed May 03, 2006 1:56 pm

Post 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?
Post Reply