0

So a client has asked me if I could build an interface where they would have their account and from there be able to link and see all there other accounts on other sites, like sportsbook.com, etc...

I would create this in php and got somewhat of an idea. If you know a great way that I could go off this please let me know!

David Biga
  • 2,763
  • 8
  • 38
  • 61

2 Answers2

0

In principle this is possible by simulating the form post of the login screen for the other sites. For example, if you wanted to login to mysite.com, you would first look at the login page for that site. It will probably have something like this:

<form action="mysite.com/logincheck.aspx">
    .. stuff here
    Username: <input type="text" name="theusername" />
    .. more stuff here
    Password: <input type="password" name="secretpassword" />
</form>

The key pieces of information here are:

  1. the action tag (mysite.com/logincheck.aspx), which is the page handling the login request
  2. the name of the user input field (theusername)
  3. the name of the password input field (secretpassword)

Simulating a form request is relatively easy. You can build your own copy of the form that posts directly to the site with the client's correct credentials pre-filled in (behind their initial password login), or use the concepts from this question, for example. You could do it as a tabbed interface with iframes or something to that effect.

Community
  • 1
  • 1
mellamokb
  • 56,094
  • 12
  • 110
  • 136
0

Lets say you 3 sites that are hosted on Server A, Server B, Server C.

You will be having databases for three of those sites hosted on the 3 servers i have just mentioned. Now when you create an account in Server A you should have a file lets call it account_check.php that talks to the Server B and Server C and ask the user to verify if it found an account with the same user name. So this way if you create account on Server B and you have accounts already created on Server A you should ask the user to use the account on Server B, in doing this our account_check.php file should ask the user to verify the account on Server A and if the validation is passed it will create an account on Server B with the same details as in Server A.

You can do this by API. API means you will communicate with the file in a different server with parameters like username etc.

Deepak
  • 6,684
  • 18
  • 69
  • 121