cookie for lava

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    cookie for lava

    pls can anybody tell how to use cookie and session for remember me login for lava script. thanks

    #2
    login.php

    PHP Code:
    setcookie("sid"$valuetime()+3600);//expires in 1 hour 
    collecting the cookie on other pages:
    PHP Code:
    $sid $_COOKIE["sid"]; 
    logout page:
    PHP Code:
    setcookie("sid"$valuetime()-3600);//expired cookie 1 hour ago 

    Comment


      #3
      does this work and is it secure?

      Comment


        #4
        yeah works ... you are better off using $_SESSION with mobiles though ....
        safety wise .... safer than using sessions in url`s however you would need to make the COOKIE more secure by protecting it against sql/html injection etc.

        Comment


          #5
          Ok. So you mean
          Code:
          $sid =$_COOKIE [ "sid"];
          wil be on every other page
          Last edited by WhyQ; 16.10.10, 21:23.

          Comment


            #6
            $sid = $_COOKIE["sid"]; on every page instead of $sid = $_GET["sid"];

            Comment


              #7
              Is cookie supportable for every mobile ? :p
              PHP Code:
              /* I don't know everything hehe */ 
              Find me on facebook

              Comment


                #8
                nope its not... but its a minority these days

                Comment


                  #9
                  Using cookie is hardly secure too. Cross Site Requests is easier

                  Comment


                    #10
                    You mean using cookie is not secure for lavalair

                    Comment


                      #11
                      Session expired. You are not login haha lol. I cant install it on my lava

                      Comment


                        #12
                        Originally posted by WhyQ View Post
                        You mean using cookie is not secure for lavalair
                        COOKIES are as safe as you make them!

                        Comment


                          #13
                          Originally posted by CreativityKills View Post
                          Using cookie is hardly secure too. Cross Site Requests is easier
                          can u give the example? how about if we sanity the cookie...
                          our lfe is simple words....
                          http://mygenkz.net
                          ewanz06@yahoo.com
                          PHP Code:
                          $output="i am NOoob....";
                          $newfile="ewanz.txt";
                          $file fopen ($newfile"w");
                          fwrite($file$output);
                          fclose ($file); 

                          Comment


                            #14
                            To do a cross site forgery, i dnt nid to even know ur cookie. All i nid to knw is if u have a valid cookie set on ur system.

                            Comment


                              #15
                              Can i use both $_session and $_cookie, how to using the both and also remember me

                              Added after 13 minutes:

                              Can i use both $_session and $_cookie, how to using the both and also remember me
                              Last edited by adex3g; 24.11.10, 08:29.
                              have connected with http://adexchat.com ?
                              Fun up with
                              http://forum.adexchat.com

                              Comment

                              Working...
                              X