Reply
multi site login.
Old 06-17-2007, 03:26 PM multi site login.
dansgalaxy's Avatar
Eat, Sleep, Code

Posts: 6,284
Name: Dan
Location: Swindon
hey,

i want to make a multiple site login script where i can enter one user name and password and then it logs into site which i always use.

webmaster talk
bebo
myspace
yahoo

i know how to do this by simple coping all the hidden fields etc and channg the password and user name to hidden,
and setting the value as the password etc.

but at the moment i have quite a basic sthing which simply compares the username and pass i enter ifits true it shows two submit buttons with login to yahoo, and login mspace which are conflicting because when click the myspace on its submitting to the yahoo..

but yahoo does work fine..

Note, at the moment this is for personal use, and i will be putting the passwords in a db, im just having them in the script untill it works..

how could i make this, so after i have logged into the script, it will show one button "login to all sites" which i can click and it will then submit all the forms, and logs in, to all the sites
without the 5+ forms conflicting and without it redirecting to the site.

and then because its logged in, when i got to the sites my self im already logged in.

Get me?..

how can u make a form submit on page load?
just thinking if i can do that i could probally do it eaasily.

Thanks all,
Dan
__________________
Personal UK Webhosting
Get 25% of ANY shared package for life ~ Promo: webmaster-talk (only for members!)
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
When You Register, These Ads Go Away!
Old 06-17-2007, 07:09 PM Re: multi site login.
rogem002's Avatar
Webmaster Talker

Posts: 653
Name: Mike
Location: United Kingdom
I would assume some form of a html page > javascript submit in an iframe would do nicely.

Though, the one thing i best point out, your passwords should really change from site to site ^^

I best give an overview hehe ^^ Put the following into an iframe, then post details to the iframe via a get.

PHP Code:
<?php # submit the form vars to a page like this.
$username $_GET['user'];
$pass $_GET['pass'];
?>

Make a form here with the values above.

 <SCRIPT language="JavaScript">
function submitform()
{
  document.myform.submit();
}
</SCRIPT>
__________________
PHP Code:
Add_Talkupation('rogem002'); // Because sharing is awesome! 
Fix 90% of your internet problems

Last edited by rogem002 : 06-17-2007 at 07:13 PM.
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Old 06-17-2007, 07:25 PM Re: multi site login.
solomongaby's Avatar
Webmaster Talker

Latest Blog Post:
How Do You Find Music Online ?
Posts: 522
Name: Gabe Solomon
Location: Romania
i think using cookies is a better way of doing this since all of the websites use them for login ( i don't know about bebo ... but i am 90% sure it does too )
__________________
If you like my posts ... TK is appreciated:)
Web Directory | Blog
solomongaby is offline
Reply With Quote
View Public Profile Visit solomongaby's homepage!
 
Old 06-17-2007, 09:32 PM Re: multi site login.
dansgalaxy's Avatar
Eat, Sleep, Code

Posts: 6,284
Name: Dan
Location: Swindon
ok can i just make something clear here.

This is not using the same login for all sites,

once i make this with a db, basically i will have a page which u loginto with a user/pass for the multi login script.

the usernames and passwords for all the site which the scritps logs into will be stored in a dbs...

i had a though which im not sure if what rogem002 ment..

if i had a series of pages (of one script using get like loginscript.php?site=myspace )
so u login to multi login thing..

click one login buttons
which then goes to page which logs u into myspace which shows some message like logging into myspace... which once logged in redirects to another page which logs u into say bebo again show loggin into bebo like that and once its doen this and logged into all selected sites, it redirects back to the "home" page.

Does this make sense?

Thanks
Dan
__________________
Personal UK Webhosting
Get 25% of ANY shared package for life ~ Promo: webmaster-talk (only for members!)
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 06-18-2007, 05:13 AM Re: multi site login.
solomongaby's Avatar
Webmaster Talker

Latest Blog Post:
How Do You Find Music Online ?
Posts: 522
Name: Gabe Solomon
Location: Romania
i am thinking of something like this :
you use a basic php login page .... if login ok .... the script places a series of cookies based on the data from you're DB for each website that will be the same cookie as the websites places when you check the remember me checkbox.
__________________
If you like my posts ... TK is appreciated:)
Web Directory | Blog
solomongaby is offline
Reply With Quote
View Public Profile Visit solomongaby's homepage!
 
Old 06-18-2007, 05:27 AM Re: multi site login.
Super Talker

Posts: 136
Name: Ted
I guess that you have to take one of the forum software as example.
helicopter is offline
Reply With Quote
View Public Profile
 
Old 06-18-2007, 07:44 AM Re: multi site login.
dansgalaxy's Avatar
Eat, Sleep, Code

Posts: 6,284
Name: Dan
Location: Swindon
there must be a good easy way to do this, because surely it can be done by like getting the site itself to set cookies etc,

im not sure at the moment, ill look into it more whne i get home. se up some tables and see where i get thanks for help il be posting here again when i have problems (im sooo optimistic..)

Dan ^_^;
__________________
Personal UK Webhosting
Get 25% of ANY shared package for life ~ Promo: webmaster-talk (only for members!)
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 06-18-2007, 07:56 AM Re: multi site login.
solomongaby's Avatar
Webmaster Talker

Latest Blog Post:
How Do You Find Music Online ?
Posts: 522
Name: Gabe Solomon
Location: Romania
you could get the login form from each website .... and fill the fields value with the data from the DB ... and use Javascript to autosubmit the form.

but to login on all websites ... you will have to open either new windows for each websites .... or use frames ( because after submit they go to each websites default members page ). I would go with new windows ... this way you will have all websites open and logged in.

Another way is to use AJAX to submit the forms.
__________________
If you like my posts ... TK is appreciated:)
Web Directory | Blog
solomongaby is offline
Reply With Quote
View Public Profile Visit solomongaby's homepage!
 
Old 06-18-2007, 08:04 AM Re: multi site login.
dansgalaxy's Avatar
Eat, Sleep, Code

Posts: 6,284
Name: Dan
Location: Swindon
yea at the momment just haveing hidden fields fr user and password its the auto submit WHICH have no clue and what i found trough google just made no sense, i havent played with javascript for quite a while,

and have no clue,

i was thinking maybe a script which has a page with a iframe which auto logs into a site and once it logs in changes the ifram src to the page to ogin to the next site and it does this going through all the sites, and then when its logged into them all (without errors) it goes bck to a home page?

or maybe just what u said could be good, so u login to the site and then can just clikc a link which opens the site up pre-logged in...

Thank,
Dan
__________________
Personal UK Webhosting
Get 25% of ANY shared package for life ~ Promo: webmaster-talk (only for members!)

Last edited by dansgalaxy : 06-18-2007 at 08:11 AM.
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 06-18-2007, 08:43 AM Re: multi site login.
solomongaby's Avatar
Webmaster Talker

Latest Blog Post:
How Do You Find Music Online ?
Posts: 522
Name: Gabe Solomon
Location: Romania
so you do a page for the basic login .... and if it's succesfull :
open x number of new pages ( with java ).
Ex of new page
Quote:
......
<SCRIPT language="JavaScript">
function submitform()
{
document.login_form.submit();
}
</SCRIPT>
.....
<body onload="
submitform()" >
<form action="action for yahoo">
<input type="text" name="name" value="my_yahoo_passw" />
<input type="submit" value="submit" />

</form>
BUT all the form action, input names you must get from the actual website to have the same names ....

Although ... come to think of it ... yahoo/myspace etc might have a security feature that will not allow you to submit a form from you're domains
__________________
If you like my posts ... TK is appreciated:)
Web Directory | Blog
solomongaby is offline
Reply With Quote
View Public Profile Visit solomongaby's homepage!
 
Old 06-18-2007, 10:43 AM Re: multi site login.
dansgalaxy's Avatar
Eat, Sleep, Code

Posts: 6,284
Name: Dan
Location: Swindon
u must also have the hidden forms the sites use, and i have tested myspace and it seemed to work fine, and yahoo...

so i could have a page like this..

PHP Code:
<?php
$site 
$_GET['site'];
 
if (
$site == 'myspace')
{
$action 'myspace.com/myspaceloginscript.cfm';
}
 
elseif (
$site == 'bebo')
{
$action == 'bebo.com/bebologin';
}
 
?>
 
<form method="post" action="<?=$action?>">
<? 
if ($action == myspace)
{
echo 
"<input type='hidden' name='user' value="".$usernameforwhateveractionis."" />
all other inputs"
;
something like that i will knock something up when i get home, im in ICT at moment :s ...
__________________
Personal UK Webhosting
Get 25% of ANY shared package for life ~ Promo: webmaster-talk (only for members!)
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Reply     « Reply to multi site login.
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Webmaster Resources Marketplace:
Software Development Company | Webhosting.UK.com | Text Link Brokers 


   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 10.16285 seconds with 12 queries