Search Results

Search found 1926 results on 78 pages for 'cookie monster'.

Page 29/78 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • Why isn't this simple PHP Forloop working?

    - by Jake
    First here's the code: <?php $qty = $_GET['qty']; for($i=0; $i < $qty; $i++) { setcookie('animals', $_COOKIE['animals'].'(lion)', time()+3600); } ?> Here's what I'm trying to do: I want to set the value of the "animals" cookie to "(lion)". The number of instances of "(lion)" that should be in the cookie is determined by the "qty" GET parameter's value. So for example if the pages url is: http://site.com/script.php?qty=10 then the value of the cookie should be: (lion)(lion)(lion)(lion)(lion)(lion)(lion)(lion)(lion)(lion) but now it just sets the value once despite the setcookie function being inside the loop, why isn't it working?

    Read the article

  • Run php in Drupal template uncached

    - by lokust
    Hi. I need to run a php code snippet in a Drupal template and not have it cached. The php snippet sniffs for a cookie and if found returns one of messages according to the cookie value. ie: if(isset($_GET['key'])) { $cookievalue = $_GET['key']; } if(isset($_COOKIE['cookname'])) { $cookievalue = $_COOKIE['cookname']; } switch ($cookievalue) { case hmm01: echo "abc"; break; case hmm02: echo "def"; break; case hmm03: echo "ghi"; break; default: echo "hello"; } Right now, Drupal displays the messages randomly according to when the page was first caches and with which cookie - no good at all! I can't see a great deal of info on how I might go about this - it seems that you have to turn the cache off for the page rather than run php code uncached.

    Read the article

  • JQuery using cookies

    - by ChrisMJ
    Hi all, in my js file i want to be able to load a "splash screen" in a new air app im developing. At present when i call the splash screen it opens and closes fine, but its when i make it set a cookie it doesnt run at all. Please help... cookieSplash(); function cookieSplash(){ var cookieSplash = $.cookie('loadSplash'); if (cookieSplash == "true") { splash(); }; if (cookieSplash == "false") { loadApplication(); }; } function splash(){ $("#viewport").append('<div id="splash"><img id="splash-close" src="/images/splash-logo.png" alt="click to close"></div>'); $("#splash").click(function() { // Act on the event $("#splash").fadeOut("slow"); $("#jettison").fadeIn("fast"); $.cookie("loadSplash", "false"); }); } function loadApplication(){ $("#jettison").fadeIn("fast"); } Please help me out

    Read the article

  • How to save search, choose a recent search and then populate the form using jQuery and/or asp.net

    - by user187870
    I want to do something similar to what priceline does. It saves the recent searches in a dropdown menu. When you pick one from the recent search. The form will be populated accordingly. (See screen shot http://yfrog.com/5fscreenshot20100501at105p) This is what I am thinking. (1) Save the searches into an array in a cookie (2), when a recent search item is chosen, retrive the corresponding array element from the cookie and then populate the form. What do you think is the best way to implement this? I especially want to know how to save the form entries into the cookie and how to populate the form.

    Read the article

  • Use jquery cookies in showing/hiding elements (jQuery)

    - by Aakash Chakravarthy
    Hello, How to use jquery cookies in showing/hiding elements in a page ? I got the plugin from here Tried some method but i am not successful. I used slideUp() and slideDown() functions to show/hide elements. When a element is slided up a cookie should be set. when the page is refreshed, the element should be in slided up position How to apply cookie when slided up and how to get the cookie when page is refreshed ? I need help !

    Read the article

  • Recreating Cookies on another Domain

    - by Bill
    Hi, I have a site on A.com and an iframe on B.com which reads info from A.com. I realize that there is some problems with third party cookies, iframes and P3P - particularly in Safari [my problem] Is it possible to instead, use AJAX or a hidden iFrame to pass the cookie information from A.com to B.com which will then "recreate" another cookie with the same information on the iframe in B.com. I am trying to do this for authenication - i.e. a user is logged in on A.com and then goes to b.com and the iframe is also logged in ? I was hoping to perhaps pass the data in a hidden iframe and "recreate" the cookie in the iframe on B.com using JavaScript?

    Read the article

  • IsAuthenticated is false!

    - by Naor
    This is how I login ('user' holds the data of the user): HttpResponse Response = HttpContext.Current.Response; HttpRequest Request = HttpContext.Current.Request; FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, user.UserId.ToString(), DateTime.Now, DateTime.Now.AddHours(12), false, UserResolver.Serialize(user)); HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName, FormsAuthentication.Encrypt(ticket)); cookie.Path = FormsAuthentication.FormsCookiePath; Response.Cookies.Add(cookie); string redirectUrl = user.HomePage; Response.Redirect(redirectUrl); After this login I get IsAuthenticated == false. Why?? It worked for me before an hour but I don't know what is wrong now.

    Read the article

  • unsetting application role in classic ASP

    - by user303526
    Hi, I'm trying to unset an application role but have been failing miserably. I was able to get the cookie value after setting (sp_setapprole) the application role. But I haven't been able to use that cookie (type varbinary / byte array) in my query to unset using sp_unsetapprole. If it was any other stored procedure it wouldn't have been a problem. I was able to use Command object and create a parameter which takes data type input of adVarBinary (204) and execute the command line.. but to the Server the query goes as below. exec sp_executesql N'sp_unsetapprole @P1 ',N'@P1 varbinary(36)',0x01000000CD11697F8F0ED3627BC1DAD25FB9CEB3A2EC5B289C658235E510CD9F29230000 Since sp_setapprole and sp_unsetapprole have to be run ad hoc, the sql server is failing to run this line. And I'm finding it hard to append varbinary cookie value to a simple query such as 'sp_unsetapprole ' & varKookie so it runs "directly" on to the server. Any kind of suggestions are welcome. Thanks, Nandagopal

    Read the article

  • iFrames and Cookies

    - by Tom
    I have a site on A.com and an iframe on B.com which reads info from A.com. I realize that there is some problems with third party cookies, iframes and P3P - particularly in Safari [my problem] Is it possible to instead, use AJAX or a hidden iFrame to pass the cookie information from A.com to B.com which will then "recreate" another cookie with the same information on the iframe in B.com. I am trying to do this for authenication - i.e. a user is logged in on A.com and then goes to b.com and the iframe is also logged in ? I was hoping to perhaps pass the data in a hidden iframe and "recreate" the cookie in the iframe on B.com using JavaScript? Is this possible ? Security issues ? What about HTTPS?

    Read the article

  • Incrmenting a Cookies with PHP (Beginner Question)

    - by BandonRandon
    Hello, I have used sessions before but never cookies. I would like to use cookies for two reasons: 1) it's something new to learn 2) I would like to have the cookie expire in an hour or so (i know in the code example it expires in 40 sec) I am trying to write a basic if statement that if($counter=="1") { //do this second } elseif ($counter >="2") { //do this every time after the first and second } else {// this is the first action as counter is zero } Here is the code I'm using to set the cookie: // if cookie doesnt exsist, set the default if(!isset($_COOKIE["counter_cookie"])) { $counter = setcookie("counter_cookie", 0 ,time()+40); } // increment it $counter++; // save it setcookie("counter_cookie", $counter,time()+40); $counter = $_COOKIE["counter_cookie"]; The problem is that the counter will be set from 0 to 1 but won't be set from 1 to 2 and so on. Any help would be great I know this is a really simple stupid question :| Thanks!

    Read the article

  • Reason to use more cookies than just a session hash for authentication?

    - by dierre
    I usually hang out in a community using vBulletin as its bulletin board. I was looking at what this software saves as cookie in my browser. As you can see it saves 6 cookies. Amongst them, what I consider to be important for authentification are: ngivbsessionhash: hash of the current session ngivbpassword: hash of the password ngivbuserid: user's id Those are my assumptions of course. I don't know for sure if ngilastactivity and ngilastvisit are used for the same reason. My question is: why use all these cookie for authentication? My guess would be that maybe generating a session hash would be to easy so using the hashedpassword and userid adds security but what about cookie spoofing? I'm basically leaving on the client all fundamental informations. What do you think?

    Read the article

  • httpCookie cause the page not to load

    - by jvcoach23
    I'm using VS 2010, vb.net and asp 3.5. I have a simple default.aspx page that has Dim ctx As HttpContext = HttpContext.Current Dim cookie As HttpCookie = ctx.Request.Cookies("SessionGUID") Me.lbl1.Text = cookie.Value.ToString the page loads fine when running it from within VS, but when i build the site and run the page, it doesn't load.. it doesn't give me an error, but nothing shows up. This is what the view source looks like HTMLHEAD META content="text/html; charset=windows-1252" http-equiv=Content-Type/HEAD BODY/BODY/HTML I took out the < in the tags so that it would display here... If i take out the Me.lbl1.Text = cookie.Value.ToString the page loads fine.. All i'm putting to the page is some text and the label control. anyone have any ideas

    Read the article

  • How can I print the cookie_jar values in Perl's WWW::Mechanize?

    - by Phill Pafford
    How can I print the values of the cookie/cookie_jar being set? Trying: ##my $cookie_jar=HTTP::Cookies->new(file => "cookie.jar",autosave=>1,ignore_discard=>1); my $cookie_jar=HTTP::Cookies->new(); ## Would like it to be in memory my $agent = WWW::Mechanize->new(cookie_jar => $cookie_jar); ##my $agent = WWW::Mechanize->new(); ##my $agent = WWW::Mechanize->new(autocheck => 1); ##$agent->cookie_jar( {} ); # we need cookies ##$agent->cookie_jar(HTTP::Cookies->new); print "Set Cookie Jar?\n"; print $agent->cookie_jar->as_string(); print "\n"; $agent->get($url); // url is a https site Not too much luck with any of these, what am I doing wrong?

    Read the article

  • Storing Instances of Classes in Flex Shared Objects

    - by babyangel86
    Is it possible to store instances of a class in a cookie or in shared objects. Basically in my application I have an object "Diagram" that the user can create. If they hit save, I want to store the current instance as a cookie and allows them to reload it later. Alternatively, I could see about getting them to store the saved version on the hard disk. But even then, all I want to save and retreive is my actionscript object. Is this possible? I've tried storing the object to SharedObject.data.diag, but when I try to retrieve the object from the cookie doing SharedObject.data.diag as Diag returns null.

    Read the article

  • Click to make body text larger | JavaScript

    - by Wayne
    Please note this is just an example: <img src="img/normal-font.png" onclick="javascript:document.body.style.fontSize = '13px';" /> &nbsp; <img src="img/medium-font.png" onclick="javascript:document.body.style.fontSize = '14px';" /> &nbsp; <img src="img/large-font.png"onclick="javascript:document.body.style.fontSize = '15px';" /> The body text does indeed enlarge if I choose one of them, but what I like to include is remembering what option you've chosen by reading cookies. In fact, I have no experience in creating cookies in JS, only in PHP. Could someone come up with an example of how to make cookies the simpliest way remembering my option, but whenever someone clicks another one, it should get rid of the cookie that was last set, e.g. Cookie value has 15px, then should update it or remove it with a new cookie with a new value of 13px and so on. Thanks :)

    Read the article

  • jMeter not able to login to wordpress

    - by Manish Sapariya
    I am trying to create a jMeter test to login to wordpress and post a new blog on a local installation of wordpress. Recorded wordpress login sequence using the recorder. Added cookie manager to the test plan. However I am not able to login to wordpress. I tried all the possible of combination of Cookie policy and Implementation settings for Cookie manager, but it did not help. When I recorded against the publicly hosted wordpress, the login did not succeed, but the response had an error saying that your browser have not enabled cookies. I am using jMeter 2.11 on Windows 7.

    Read the article

  • Automatic open Colorbox modal window

    - by user1631168
    I'm using the Colorbox module in Drupal 7. I'm opening an external website. I can make it work with a link. Click here, then click the "colorbox popup" link at the bottom, middle column. The client would like this to open automatically when the page opens. I've created a block and added the following code (from the colorbox site). <script type="text/javascript"> // Display a welcome message on first visit, and set a cookie that expires in 30 days: if (document.cookie.indexOf('visited=true') === -1) { var expires = new Date(); expires.setDate(expires.getDate()+30); document.cookie = "visited=true; expires="+expires.toUTCString(); jQuery.colorbox({html:"http://join.raretearepublic.com/popup/", width:887, height:638}); } </script> But it does not work. Any help would be greatly appreciated.

    Read the article

  • What are the best security measures to take for making certain directories private?

    - by Sattvic
    I have a directory on my server that I do not want Search Engines to crawl and I already set this rule in robots.txt I do want people that have logged in to be able to have access to this directory without having to enter a password or anything. I am thinking that a cookie is the best thing to put on users computers after they login, and if they have a cookie, they can access the directory. Is this possible, or is there a better way? I want people without this cookie to not have access to this directory - access for members only Any suggestions on the best design for this?

    Read the article

  • Recognizing the source of Facebook application user

    - by Joel
    Hello, When serving an iframe application in Facebook, is there anyway I can know when a user visits my site through Facebook as an application or if he reached the site directly (typed my domain URL in the browser)? I know I can check if the user has a cookie (named "u") which tells me that the user used facebook to get an access_token. However, if the user visited the application one minute ago and got the access_token cookie, but then typed the URL in the browser, checking for the existence of the cookie will return TRUE, although the visitor arrived to the site directly. Thanks, Joel

    Read the article

  • Javascript push Object to cookies using JSON

    - by Hunkeone
    Hi All on click button I need to add object to array and then write array to cookies. From the start this array can be not empty so I parse cookie first. function addToBasket(){ var basket = $.parseJSON($.cookie("basket")) if (basket.length==0||!basket){ var basket=[]; basket.push( { 'number' : this.getAttribute('number'), 'type' : this.getAttribute('product') } ); } else{ basket.push( { 'number' : this.getAttribute('number'), 'type' : this.getAttribute('product') } ); } $.cookie("basket", JSON.stringify(basket)); } And HTML <button type="button" class="btn btn-success btn-lg" number="12" product="accs" onclick="addToBasket()">Add</button> Unfortunately I'm getting Uncaught ReferenceError: addToBasket is not defined onclick. Can't understand what am I doing wrong? Thanks!

    Read the article

  • What to do with twitter oauth token once retreived?

    - by mcintyre321
    I'm writing a web app that will use twitter as its primary log on method. I've written code which gets the oauth token back from Twitter. My plan is now to Find the entry in my Users table for the twitter username retreived using the token, or create the entry if necessary Update the Users.TwitterOAuthToken column with the new OAuth token Create a permanent cookie with a random guid on the site and insert a record into my UserCookies table matching Cookie to User when a request comes in I will look for the browser cookie id in the UserCookies table, then use that to figure out the user, and make twitter requests on their behalf Write the oauth token into some pages as a js variable so that javascript can make requests on behalf of the user If the user clears his/her cookies the user will have to log in again to twitter Is this the correct process? Have I created any massive security holes? thanks!

    Read the article

  • Show/hide using jQuery cookies

    - by Dilwin
    So I've created a simple tip box that fades in on page load, with an option to close the box. I'm trying to make the box hidden if the visitor clicks the close link. I'm fairly new to cookies, so I'm probably doing it all wrong, but this is what I have: $('#close').click(function(e) { jQuery.cookie('tip', 'hide', cookieOpts); $(this).parent('div.tip').fadeOut(1000); e.preventDefault(); }); jQuery.cookie('tip', 'show', cookieOpts); $('.tip').delay(500).fadeIn(1000); var shouldShow = jQuery.cookie('tip') == 'show'; var cookieOpts = {expires: 7, path: '/'}; if( shouldShow ) { $('.tip').delay(500).fadeIn(1000); } else { $('.tip').css('display', 'none'); }

    Read the article

  • How do cookies work when browsing websites

    - by Phenom
    On websites where you have to enter a user name and password, I notice that I can browse the site with one browser and it will know who I am no matter where I go on the site. But if I open a different browser it doesn't know who I am in that browser unless I log on in that browser. After I log in to a website, does it store some kind of cookie in my browser, and every time I navigate to a different page on that site, it checks the cookie for my identity? What would happen if I logged in, and then before browsing to a different page on the site, deleted the cookie?

    Read the article

  • Does submit() function has a callback?

    - by ecu
    Hi, I have this code: setMyCookie('name','value_1'); $('.myform').submit(); setMyCookie('name','value_2'); Problem: Webkit browsers seem to update 'MyCookie' with 'value_2' before the form gets submited, or in the exact moment it is being submited, so wrong cookie value is sent with it. I want to change cookie value to 'value_2' immediately after the form is submited so the cookie is ready for another request. The following code works fine, but I don't think using timeout() is the best solution. Maybe there is another way to solve this problem? setMyCookie('name','value_1'); $('.myform').submit(); setTimeout(function(){setMyCookie('name',value_2);},100); Thanks.

    Read the article

  • PHP and Javascript cookies

    - by shummel7845
    Can I access a cookie written with jQuery's cookie plug-in with PHP? I know you can't set Javascript equal to PHP or vice versa, but IN ESSENCE is: $.cookie('var') = $_COOKIE['var']? Again, I know you can't set them equal to each other, but if I set it in jQuery and then go to another page, can PHP access it? I've read lots of posts about this, but I can't seem to find an answer to this part. Note, if I look in Firefox's preferences, I can see the cookies are there, so I know they're set.

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >