Welcome to WebmasterWorld Guest from 54.145.208.160

Forum Moderators: incrediBILL

Message Too Old, No Replies

Auto Log-in & Redirect Challenge

HMTL, JavaScript, Form, Redirect

     
1:04 am on Mar 9, 2012 (gmt 0)

New User

5+ Year Member

joined:Mar 9, 2012
posts: 2
votes: 0


Hi Everyone.

I am a new member to WebmasterWorld so this is officially my first post!

I am attempting to login to a website automatically using login credentials which I have done successfully as here:

<html>
<head>
<title>Auto-Login to www.mysite.com</title>
</head>
<body onLoad="document.frmlogin.submit();">
<form name="frmlogin" id="frmloginid" method="POST"
action="https://www.mysite.com/login.asp" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="username" value="MYUSERNAMEHERE">
<input type="hidden" name="password" value="MYPASSWORDHERE">
</form>
</body>
</html>


Now comes the tricky part I can't figure out - what I need to do is go from this successful login > Auto-Navigate to another page within my Account Area > Then Auto Submit another form. I should note... I am not trying to do anything dodgy here - I just want to automate an action I must take everyday so I dont have to worry about it.

I don't know where to start or even if the above is the correct first step - If anyone can offer any suggestions or solutions that would be fantastic!

Look forward to hearing thoughts.

KeyIndividual.
2:42 am on Mar 9, 2012 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Sept 4, 2001
posts:2194
votes: 25


Hi KeyIndividual and welcome to WebmasterWorld.

Is it safe to assume that you are running .asp on the site? And dare I ask, why the onload submit/

Marshall
2:54 am on Mar 9, 2012 (gmt 0)

New User

5+ Year Member

joined:Mar 9, 2012
posts: 2
votes: 0


It's not my site, but rather a business I am a member of and have my user/pw to login to my account area. I am required everyday to login, and submit a form, confirming I have taken an action (which is posting an ad). What I want to do is automate this - so "AutoLogin>NavigateToFormPage>SubmitForm".

The POST ACTION for the login form is .ASP as that is what they use on their site.

Haha, Dare I answer? Simple, I'm no expert and that did the auto-login for me which is my first step. As I mentioned Im not 100% sure If I am going about this the right way - so open to suggestions. I was thinking maybe I need to look at cURL to accomplish this? But again, any suggestions/examples on how I do that would be great.

Cheers!
KeyIndividual
3:25 pm on Mar 9, 2012 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Sept 4, 2001
posts:2194
votes: 25


If the page you want to auto navigate to after login is constant, you could use a meta refresh, javascript, or .asp script to auto redirect you to the intended page.

Marshall
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members