Logging in from diffrent site

  • Hacker007
  • Proficient
  • Proficient
  • User avatar
  • Posts: 371
  • Loc: Riverside, CA

Post 3+ Months Ago

OK i was wondering if you could log into a board system from a diffrent site. So if i can log into my hosted boards from my website? errr, im afraid im not making much scence. I just want to know if i could put a log in form on a main site, but it will log you into a board system then take you to that board.

Hopfully you understand what i asked lol :roll:
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

Depending on the security policies of the server hosting the boards, you should be able to set the 'form action=' on the new login pages form to the page that handles logins on the board server, if the board server accepts posted data from outside sources it should login and proceed just as if you logged in from that server.

I've done stuff like this on windows servers with ASP processing the posted data and never had a problem. I've never tried it with anything else though.
  • Hacker007
  • Proficient
  • Proficient
  • User avatar
  • Posts: 371
  • Loc: Riverside, CA

Post 3+ Months Ago

OK, can you gimme an exapmle.

Here is the web site(we are waiting to get the domain up)
http://www.geocities.com/robslair/main.htm
(dont worry about geocitys secruity, we are getting a domain before using the log in thing)

and this is the boards i want to log into:

http://s4.invisionfree.com/Robslair/index.php?act=idx

thanx for your help :)
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23455
  • Loc: Woodbridge VA

Post 3+ Months Ago

I don't think that it's impossible. My best guess is that it would probably take modifying some of the security features of the program for the board to allow an external referer (your soon to be new domain) to query the database and execute the login script.

I'm not familiar with the code for that forum script, but I'm going to take an educated guess that it's not unlike the one used here.

The answer is beyond my current knowledge, but for certain this post belongs in our programming/scripting board, because that's what it's going to take to do it. Some sort of script modification - so I'm moving this post there.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

This iss the form the board is using for logins,
Code: [ Select ]
<!--// Form declaration that i was talking about earlier, Allready set for where it needs to be //-->
<form action="http://s4.invisionfree.com/Robslair/index.php?act=Login&amp;CODE=01" method="post" name='LOGIN'>

<!--// Login script is using this to validate referer //-->
<input type='hidden' name='referer' value="http://s4.invisionfree.com/Robslair/index.php?act=idx" />

<!--// Username textbox //-->
<input type='text' size='20' maxlength='64' name='UserName' class='forminput' />

<!--// Password textbox //-->
<input type='password' size='20' name='PassWord' class='forminput' />

<!--// Remember me option 1 //-->
<input type="radio" name="CookieDate" value="1" checked="checked" />Yes

<!--// Remember me option 2 //-->
<input type="radio" name="CookieDate" value="0" />No

<!--// Privacy checkbox //-->
<input type="checkbox" name="Privacy" value="1" />Don't add me to the active users list

<!--// Submit Button//-->
<input type="submit" name='submit' value="Log me in" class='forminput' />

<!--// Close of form objects //-->
</form>
  1. <!--// Form declaration that i was talking about earlier, Allready set for where it needs to be //-->
  2. <form action="http://s4.invisionfree.com/Robslair/index.php?act=Login&amp;CODE=01" method="post" name='LOGIN'>
  3. <!--// Login script is using this to validate referer //-->
  4. <input type='hidden' name='referer' value="http://s4.invisionfree.com/Robslair/index.php?act=idx" />
  5. <!--// Username textbox //-->
  6. <input type='text' size='20' maxlength='64' name='UserName' class='forminput' />
  7. <!--// Password textbox //-->
  8. <input type='password' size='20' name='PassWord' class='forminput' />
  9. <!--// Remember me option 1 //-->
  10. <input type="radio" name="CookieDate" value="1" checked="checked" />Yes
  11. <!--// Remember me option 2 //-->
  12. <input type="radio" name="CookieDate" value="0" />No
  13. <!--// Privacy checkbox //-->
  14. <input type="checkbox" name="Privacy" value="1" />Don't add me to the active users list
  15. <!--// Submit Button//-->
  16. <input type="submit" name='submit' value="Log me in" class='forminput' />
  17. <!--// Close of form objects //-->
  18. </form>


The HIDDEN element is where your login script is getting its referer, so security should be no problem.
As long as you have everything in the above codebox (minus the comments of course) on the page you want to login from you should have no problems.

NOTE: I stripped the validate function with the onsubmit handler so i diddnt have to dig all of the javascript out too, if you want client side validation back you have to make sure that the javascript is somewhere to be found and add the onsubmit= handler back to the form decloration.

I registered in the forums to get an id and pw,
then I tested this from my site (ASP BTW) and from my desktop with success both times.
  • Hacker007
  • Proficient
  • Proficient
  • User avatar
  • Posts: 371
  • Loc: Riverside, CA

Post 3+ Months Ago

Thanx joebert! :D
I really needed that help. Thanx sooo much!
A moderator can lock this now. :wink:
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23455
  • Loc: Woodbridge VA

Post 3+ Months Ago

No need to lock it. We're happy you got the answer you needed.

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 83 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.