Results 1 to 14 of 14

Thread: HTTP NAvigation

  1. #1

    Thread Starter
    Hyperactive Member deane034's Avatar
    Join Date
    May 2001
    Location
    Sri Lanka
    Posts
    485

    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?
    me.life = VB

  2. #2
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629
    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.
    Like Archer? Check out some Sterling Archer quotes.

  3. #3
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    if both sites are on the same domain (same server) then yes it is possible. if not then no you cannot.

  4. #4

    Thread Starter
    Hyperactive Member deane034's Avatar
    Join Date
    May 2001
    Location
    Sri Lanka
    Posts
    485
    how is it possible if its in the same domain?
    me.life = VB

  5. #5
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    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.

  6. #6

    Thread Starter
    Hyperactive Member deane034's Avatar
    Join Date
    May 2001
    Location
    Sri Lanka
    Posts
    485
    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
    me.life = VB

  7. #7
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    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.

  8. #8
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629
    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.
    Like Archer? Check out some Sterling Archer quotes.

  9. #9

    Thread Starter
    Hyperactive Member deane034's Avatar
    Join Date
    May 2001
    Location
    Sri Lanka
    Posts
    485
    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
    me.life = VB

  10. #10
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    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?

  11. #11
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629
    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.
    Like Archer? Check out some Sterling Archer quotes.

  12. #12
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    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.

  13. #13

    Thread Starter
    Hyperactive Member deane034's Avatar
    Join Date
    May 2001
    Location
    Sri Lanka
    Posts
    485
    ok thanks. anyway
    me.life = VB

  14. #14
    Addicted Member Phenix's Avatar
    Join Date
    Sep 2002
    Location
    Near A Cube
    Posts
    228

    Thumbs up 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
  •  



Click Here to Expand Forum to Full Width