|
-
Sep 13th, 2003, 02:56 AM
#1
Thread Starter
Hyperactive Member
HTTP NAvigation
hi guys, i have this problem. i have a script which adds a user to a DB, but before the user can be added, the user has to go to a seperate site, create account there, and come back to my script page and sign up with me. the idea is i need them to have the same names in both the sites. is there any way to automate the process,
for example if someone with the user name 'jack' comes to signup in my site i need to check if the user name 'jack' exists in the DB.. over in the other site and if it doesnt add the user jack to both the sites, with practically the same information. the second site actually is an MSN group, so i do not have DB acess there. so the only way go aobut is, internally navigate to the MSN group sign up page, and sign up the user,and catch the error messeges if there are any, or else add the user to both the sites. i know there is some HTTP navigation stuff out there, but is what im trying to do possiblle?
-
Sep 13th, 2003, 04:41 AM
#2
through PHP.. I don't think that's possible. If you had access to the database it would be possible, but you don't. I don't think you can execute a script within PHP that will go out to a site, try to sign up through a form, and then give an error back if the name already exists or whatever else. I could be wrong, but that just seems like a little too much to do.
-
Sep 14th, 2003, 02:03 PM
#3
Frenzied Member
if both sites are on the same domain (same server) then yes it is possible. if not then no you cannot.
-
Sep 15th, 2003, 07:22 AM
#4
Thread Starter
Hyperactive Member
how is it possible if its in the same domain?
-
Sep 15th, 2003, 10:26 AM
#5
Frenzied Member
all you have to do is connect to the database which is the same for the whole domain. just don't think they are different sites. being that they are in the same domain you might be able to use the same cookie as well. but a little tricky as you have to use p3p technology.
the only difference might be is that the username/password of the database will be different so make sure you know it?
but I just have to say, your logic is all messed up,. why do they have to go to another site to signup, just do it all at the one site? makes things a lot more easier.
-
Sep 15th, 2003, 11:28 AM
#6
Thread Starter
Hyperactive Member
no actually.. we are building the new site.. for a established MSN group.. with obver 1000 members.. they just dont want to start over. and we want to use the Back end as the msn group and what we are building is merely a front end.. with lots of more features.. this requires signing in from the .net passport etc.. i donno if its achivable in PHP
-
Sep 15th, 2003, 12:52 PM
#7
Frenzied Member
that shouldn't make a difference. you can have the same database on both sites. just make a new table and backup the old one and insert it into the new one. that way you can query the table on the new site. but if you must it is still possible as they are on the same domain.
when you connect to mysql you can choose more than one connection.
$conn = mysql_connect("localhost", $username, $password);
mysql_select_db($dbname, $conn);
that $conn can be any domain. localhost can also be an IP. if you were just doing 1 connection on 1 site it would be
$conn = mysql_connect("localhost", $username, $password);
mysql_select_db($dbname);
which would do the default one at the site.
but in each and every query you will have to specify the $conn along with the query.
-
Sep 15th, 2003, 10:59 PM
#8
It's going to be quite a task to get a back up of MSN's database for the MSN Group thing. MS would probably never let you get a copy of their database for any reason. Also, I'm fairly sure that the majority of MS sites are based off of ASP, not PHP, and do not even use MySQL, but probably MSSQL. You'd have to go through a lot to get that all set up correctly.
Good luck, because so far it looks like you're screwed over.
-
Sep 16th, 2003, 12:19 PM
#9
Thread Starter
Hyperactive Member
yeah phpman i dont think i can even remotely get close to acessing the MSN Db, and kows is right they probably have the MS technologies running there, check out MSN groups, http://groups.msn.com/srilankanteencentral
thats the particular group i am working on. acessing the DB is out of the question i was thinking more in the lines of getting the HTML Code in the sign up pages in the group and passing the vals to the MSN Script. if there is a way i can sign into the .net passport with the users email and password i can at least present him with the MSN group sign up page. but the whole proces is really unprofessional i know. users can sign up in the site and not sign up in the msn one. as a last resort either we have to leave msn groups or find away to sign into the .net passport in php and find out if the user is a member of the group. perhaps i should post a different thread for the .net passport thingy.
thanks
-
Sep 16th, 2003, 06:51 PM
#10
Frenzied Member
I don't believe this. I told you
if both sites are on the same domain ( same server) then yes it is possible. if not then no you cannot.
and then you asked
how is it possible if its in the same domain?
and now it is the MSN server? that is way not in your domain. all this could have been solved in 3 posts. not me explaining how to do it. if I knew it was actually the MSN webpage I would have said no. I don't use MSN so I am not aware what you were talking about when you said MSN groups.
so yes it is impossible to get what you want.
and what the heck is a .net passport?
-
Sep 16th, 2003, 08:21 PM
#11
The .NET passport.. Although I don't use it, I'm aware of what it is. It's Microsoft's broad way of standardizing the internet; their various sites (Microsoft, MSN, Hotmail, "The Zone," etc) all use .NET passports to login. It's basically like this: you sign up for a .NET passport (.NET made sites already sign you up for one if you have an email at that domain) and you use that login to login at all the different .NET sites. I don't know how well I explained that, and if I didn't very well, well, I blame it on my lack of knowledge and understanding of the .NET idea.
-
Sep 16th, 2003, 11:21 PM
#12
Frenzied Member
ahh that is what it is. you kind of explained it enough to understand what it is. as far as php doing it I have no idea.
thanks for explaining it.
-
Sep 18th, 2003, 07:55 PM
#13
Thread Starter
Hyperactive Member
-
Sep 20th, 2003, 02:29 PM
#14
Addicted Member
If I understand your question...CURL
It sounds like you are looking for CURL, Client URL Library Functions.
http://www.php.net/manual/en/ref.curl.php
I have used this to POST to a script on a different server.
I didn't need the result from the POST, but it looks like in your case, you would also need ob_get_contents spoken of at
http://www.php.net/manual/en/function.curl-exec.php in the comments "$retrievedhtml = ob_get_contents();"
If you only need results from the GET method, then use:
$lines = file ('http://www.example.com/get_method?stuff=whatever&otherstuff=blahblah');
I assume you understand the difference between POST and GET methods.
It could get tricky if you have to set and retrieve cookies and intermediary scripts are involved at the remote site. But I would not be quick to say that your task is imposssible.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|