Loading ...
Sorry, an error occurred while loading the content.

Re: [JavaScript] Re: auto login script ...

Expand Messages
  • Jan Martin
    I guess, that totally depends if the site in question provides an API do to so or not. Also on the protocol you want. For e.g. ftp most servers allow to login
    Message 1 of 5 , Nov 24, 2009
    • 0 Attachment
      I guess,
      that totally depends if the site in question provides an API do to so or
      not.
      Also on the protocol you want.

      For e.g. ftp most servers allow to login using this URL scheme:

      ftp://username:password@...

      One can call it from anywhere.

      What website and protocol (http?) are you looking for exactly?
      And what do you want to do then? E.g. scrape the site?

      Jan

      On Sat, Nov 21, 2009 at 6:21 AM, samikuti2001 <no_reply@yahoogroups.com>wrote:

      >
      >
      > Ok but do is it possible to log in to a website using my userName and
      > passWord to the autologin function without really going to the website? Any
      > script in js or PHP for auto login?
      >
      > thanks,
      >
      > --- In JavaScript_Official@yahoogroups.com<JavaScript_Official%40yahoogroups.com>,
      > Jon Stephens <jon@...> wrote:
      > >
      > >
      > > > auto login script ... Posted by: "samikuti2001"
      > > > no_reply@yahoogroups.com <no_reply%40yahoogroups.com> samikuti2001
      > Date: Mon Oct 26, 2009 10:32 am
      > > > ((PDT))
      > > >
      > > > Hello group,
      > > >
      > > > I am working on a class project and i couldn't figure out how to
      > > > write auto login function using java script. I want to pass user name
      > > > and password as a parameter for the autologin function and/or the
      > > > url(webpage) that i want to login and i want to login to the site by
      > > > runnning that function. By the way am not sure even if that is
      > > > possible. Example: function autologin( .... , ....)
      > > >
      > > > autoLogin(userName,password); or autologin(userName,password,url);
      > > >
      > > > like autoLogin(dave123,12345678,www.yahoo.com); in java script or
      > > > PHP.
      > > >
      > > > Thank you all,
      > >
      > > This is perfect opportunity for you to learn about the Form object.
      > >
      > > Find a good JavaScript/DOM reference (Google is your friend), and go for
      > it.
      > >
      > > hint: the Form object's submit() method will submit the form once you've
      > > set the values of the username and password fields in the form.
      > >
      > > cheers
      > >
      > > jon.
      > >
      > >
      > >
      > >
      > > --
      > > This message has not been scanned for viruses.
      > >
      > > Since I do not use a Microsoft operating
      > > system or software, and use only plaintext
      > > for email, there is little need for me to do so.
      > >
      >
      >
      >


      [Non-text portions of this message have been removed]
    • japaalekhin.llemos
      What you really want isn t really an auto login script (you still have to click login or any other button after entering details). I don t know exactly how we
      Message 2 of 5 , Nov 30, 2009
      • 0 Attachment
        What you really want isn't really an auto login script (you still have to click login or any other button after entering details). I don't know exactly how we should call it but there's a solution for that.

        AJAX

        Yes, asynchronous javascript and xml... Basically the idea is a javascript object (that you have to consider cross-browser INcomapatibilites when initializing) called XMLHTTPREQUEST. It allows you to send requests (POST, GET) to a website and it returns the response text in a property named obviously enough responseText.

        In a nutshell, XMLHttpRequest is a browser inside javascript.

        I'd like to recommend this method to beginners since it's the low-level style of ajax programming (i started with this too). But i would also like to recommend using javascript library/frameworks (like jQuery) once you get the grasp of things.

        Please message me if you want to learn more about it. I'd be happy to help. Also if i get a lot of feedback about this. I might as well write a tutorial on this in my blog.

        Cheers and peace to all mankind! xD
        Japa Alekhin Llemos
        japaalekhin.llemos@...


        --- In JavaScript_Official@yahoogroups.com, Jan Martin <janmartin3@...> wrote:
        >
        > I guess,
        > that totally depends if the site in question provides an API do to so or
        > not.
        > Also on the protocol you want.
        >
        > For e.g. ftp most servers allow to login using this URL scheme:
        >
        > ftp://username:password@...
        >
        > One can call it from anywhere.
        >
        > What website and protocol (http?) are you looking for exactly?
        > And what do you want to do then? E.g. scrape the site?
        >
        > Jan
        >
        > On Sat, Nov 21, 2009 at 6:21 AM, samikuti2001 <no_reply@yahoogroups.com>wrote:
        >
        > >
        > >
        > > Ok but do is it possible to log in to a website using my userName and
        > > passWord to the autologin function without really going to the website? Any
        > > script in js or PHP for auto login?
        > >
        > > thanks,
        > >
        > > --- In JavaScript_Official@yahoogroups.com<JavaScript_Official%40yahoogroups.com>,
        > > Jon Stephens <jon@> wrote:
        > > >
        > > >
        > > > > auto login script ... Posted by: "samikuti2001"
        > > > > no_reply@yahoogroups.com <no_reply%40yahoogroups.com> samikuti2001
        > > Date: Mon Oct 26, 2009 10:32 am
        > > > > ((PDT))
        > > > >
        > > > > Hello group,
        > > > >
        > > > > I am working on a class project and i couldn't figure out how to
        > > > > write auto login function using java script. I want to pass user name
        > > > > and password as a parameter for the autologin function and/or the
        > > > > url(webpage) that i want to login and i want to login to the site by
        > > > > runnning that function. By the way am not sure even if that is
        > > > > possible. Example: function autologin( .... , ....)
        > > > >
        > > > > autoLogin(userName,password); or autologin(userName,password,url);
        > > > >
        > > > > like autoLogin(dave123,12345678,www.yahoo.com); in java script or
        > > > > PHP.
        > > > >
        > > > > Thank you all,
        > > >
        > > > This is perfect opportunity for you to learn about the Form object.
        > > >
        > > > Find a good JavaScript/DOM reference (Google is your friend), and go for
        > > it.
        > > >
        > > > hint: the Form object's submit() method will submit the form once you've
        > > > set the values of the username and password fields in the form.
        > > >
        > > > cheers
        > > >
        > > > jon.
        > > >
        > > >
        > > >
        > > >
        > > > --
        > > > This message has not been scanned for viruses.
        > > >
        > > > Since I do not use a Microsoft operating
        > > > system or software, and use only plaintext
        > > > for email, there is little need for me to do so.
        > > >
        > >
        > >
        > >
        >
        >
        > [Non-text portions of this message have been removed]
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.