Search Results

Search found 1449 results on 58 pages for 'rice flour cookies'.

Page 23/58 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • Reading the Set-Cookie instructions in an HTTP Response header

    - by Eduardo León
    Is there any standard means in PHP to read the Set-Cookie instructions in an HTTP Response header, without manually parsing it? More specifically, I want to read the value of the ASP.NET_SessionId cookie returned by an ASP.NET Web Service I am consuming. EDIT: I am consuming the Web Service using PHP's native SoapClient class. I can use the __getLastResponseHeaders() method to retrieve the whole of the HTTP response header returned by the Web Service: HTTP/1.1 200 OK Cache-Control: private, max-age=0 Content-Type: text/xml; charset=utf-8 Server: Microsoft-IIS/7.5 Set-Cookie: ASP.NET_SessionId=ku501l55o300ik3sa2gu3vzj; path=/; HttpOnly X-AspNet-Version: 2.0.50727 X-Powered-By: ASP.NET Date: Tue, 11 Jan 2011 23:34:02 GMT Content-Length: 368 But I want to extract the value of the ASP.NET_SessionID cookie: ku501l55o300ik3sa2gu3vzj And, of course, I don't want to do it manually.

    Read the article

  • Reading cookie problem across directories

    - by Etienne
    This is my JavaScript code I use to create my cookie............ document.cookie = "Name=" + Name + ";expires=Friday, 31-Dec-2011 12:00:00 GMT; path/"; I create it in www.example.com/folder/file.html and it works. But I cant read the cookie from www.example.com/index.html or www.example.com/folder2/file2.html. What is wrong with my code? Thanks in advanced

    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

  • Javascript Cookie problems IE

    - by blakey87
    Hi guys, been bagging my head over some Javascript, please help, I cant see why it simply wont find my cookie in IE 7 or 8 I am setting the cookie true through another event, but I just want to see IE pick up the cookie which I initially set. Works in firefox too, thanks in advance. var t=setTimeout("doAlert()",8000); var doAlertVar = true; document.cookie = "closed=0;expires=0;path="; function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie; alert(ca); ca = ca.replace(/^\s*|\s*$/g,''); ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } function doAlert(){ if(readCookie('closed')==1){ doAlertVar = false; } if(readCookie('closed')==0){ alert("unlicensed demo version\nbuy online at"); } t=setTimeout("doAlert()",5000); }

    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

  • ASP MVC: Keeping track of logged in users.

    - by user323395
    I'm creating a ASP MVC application. And because of the complex authorization i'm trying to build my own login system. (So i'm not using asp membership providers, and related classes). Now i'm able to create new accounts in the database with hashed passwords. But how do i keep track that a user is logged in. Is generating a long random number and putting this with the userID in the database and cookie enough? Sorry for my rather bad english! Ty in advance :)

    Read the article

  • In Varnish, how can I read the Set-Cookie response header?

    - by Adam Friedman
    I am trying to detect if my application has set a cookie that holds an "alert message" for the user on the next page, where the Javascript displays it if detected. In my vcl_fetch(), I need to detect if the specific cookie value "alert_message" appears anywhere in the Set-Cookie header (presumably in the VCL variable beresp.http.Set-Cookie). If detected, then I do not want to cache that next page (since Varnish strips the Set-Cookie header by default, which would obliterate the alert message before it makes it back to the browser). So here is my simple test: if(beresp.http.Set-Cookie ~ "alert_message") { set req.http.no_cache = 1; } Strangely, it fails to evaluate to true. So I throw the variable into the Server header to see what it looks like: set beresp.http.Server = " MyApp Varnish implementation - test reading set-cookie: "+beresp.http.Set-Cookie; But for some reason this only displays the FIRST Set-Cookie line in the response headers. Here are the relevant response headers: Server: MyApp Varnish implementation - test reading cookie: elstats_session=7d7279kjmsnkel31lre3s0vu24; expires=Wed, 10-Oct-2012 00:03:32 GMT; path=/; HttpOnly Set-Cookie:app_session=7d7279kjmsnkel31lre3s0vu24; expires=Wed, 10-Oct-2012 00:03:32 GMT; path=/; HttpOnly Set-Cookie:alert_message=Too+many+results.; expires=Tue, 09-Oct-2012 20:13:32 GMT; path=/; domain=.my.app.com Set-Cookie:alert_key=flash_error; expires=Tue, 09-Oct-2012 20:13:32 GMT; path=/; domain=.my.app.com Vary:Accept-Encoding How do I read and run string detection on ALL Set-Cookie header lines?

    Read the article

  • Anyone can explain to me document.cookie

    - by dramasea
    I founs this code in w3schoool javascript coookie section, which is to read the cookie: function getCookie(c_name) { if (document.cookie.length>0) { c_start=document.cookie.indexOf(c_name + "="); if (c_start!=-1) { c_start=c_start + c_name.length+1; c_end=document.cookie.indexOf(";",c_start); if (c_end==-1) c_end=document.cookie.length; return unescape(document.cookie.substring(c_start,c_end)); } } return ""; } In this line: if (document.cookie.length>0) what mean document.cookie.length? In this line: c_start=document.cookie.indexOf(c_name + "="); why i need to add '=' after the c_name(cookie name) In this line: c_start=c_start + c_name.length+1; why I need to add c_name.length+1 ? What the purpose? And what the meaning of this line: if (c_end==-1) c_end=document.cookie.length; Can Anyone answer my question?Thanks!!!

    Read the article

  • Java, let CookieHandler work on only one instance.

    - by user435657
    Hi all, I don't know how CookieHandler works system wide, I did view the source of CookieHandler but found no more information except the get/set methods. Where do TCP/HTTP connections use instance of CookieHandler, which I set by CookieHandler.setDefault(...) Which source file I should refer to? URLConnection & HttpURLConnection don't seem have things to do with it. Help, thanks in advance.

    Read the article

  • What's your favorite cross domain cookie sharing approach?

    - by Haoest
    I see iframe/p3p trick is the most popular one around, but I personally don't like it because javascript + hidden fields + frame really make it look like a hack job. I've also come across a master-slave approach using web service to communicate (http://www.15seconds.com/issue/971108.htm) and it seems better because it's transparent to the user and it's robust against different browsers. Is there any better approaches, and what are the pros and cons of each?

    Read the article

  • Setting Session/Cookie via ajax request made on other website

    - by user596805
    Hi, That's my problem: I have an website, example.com, in which index.html file a introduced a <script src="website.net/js.js"></script> You can see, that this is on other web server. In the js.js I have some data that I want to send to php. For that, I am using Ajax. So, I made a request to "website.net/data.php" using method get. In data.php file everything is ok,I received the value, but I want to set a cookie which value is what I received through ajax. Here is the problem. The setcookie function says that the cookie was set, but when I check in the browser, there's no cookie! It works fine if the index.html file where I use <script src="website.net/js.js"></script> is hosted on the same domain where I am making the request. If it is on another domain, it doesn't work anymore. I have read something about Ajax cross site, but I don't want to send something back to example.com. All I want is to send some data from example.com to website.net and then setting a cookie based on that value. Thank you very much, and sorry for my English! Later edit: I am not used with this website. From the example.net I take a single value. On website.net I receive that value, I check if it's not already a cookie set, if it's not, I set it. On the same page, website.net, I use this cookie too.

    Read the article

  • Cookie Value not available, why?

    - by Camran
    I have tested this on my development computer, but now I have uploaded everything to the production server and I cant read out the value of the cookie. I think the problem lies in the Serialization and Unserialization. if (isset($_COOKIE['watched_ads'])){ $expir = time()+1728000; //20 days $ad_arr = unserialize($_COOKIE['watched_ads']); // HERE IS THE PROBLEM $arr_elem = count($ad_arr); if (in_array($ad_id, $ad_arr) == FALSE){ if ($arr_elem>10){ array_shift($ad_arr); } $ad_arr[]=$ad_id; setcookie('watched_ads', serialize($ad_arr), $expir, '/'); } } When I echo this: count($ad_arr) I receive the expected nr, 1 in this case, so there is a value there. But when I echo the value: echo $ad_arr[0]; I get nothing. Completely blank. No text at all. Anybody have a clue? if you need more info about something let me know...

    Read the article

  • C# Sending cookie in an HttpWebRequest which is redirected

    - by Nir
    I'm looking for a way to work with an API which requires login, and then redirects to another URL. The thing is that so far I've only come up with a way to make 2 Http Requests for each action I want to do: first, get cookie with AllowRedirect=false, then get the actual URI and do a second request with the cookie: HttpWebRequest request = (HttpWebRequest)WebRequest.Create(sUrl); request.AllowAutoRedirect = false; HttpWebResponse response = (HttpWebResponse)request.GetResponse(); string redirectedUrl = response.Headers["Location"]; if (!String.IsNullOrEmpty(redirectedUrl)) { redirectedUrl = "http://www.ApiUrlComesHere.com/" + redirectedUrl; HttpWebRequest authenticatedRequest = (HttpWebRequest)WebRequest.Create(redirectedUrl); authenticatedRequest.Headers["Cookie"] = response.Headers["Set-Cookie"]; response = (HttpWebResponse)request.GetResponse(); } It seems terribly inefficient. Is there another way? Thanks!

    Read the article

  • Login to website and use cookie to get source for another page

    - by Stu
    I am trying to login to the TV Rage website and get the source code of the My Shows page. I am successfully logging in (I have checked the response from my post request) but then when I try to perform a get request on the My Shows page, I am re-directed to the login page. This is the code I am using to login: private string LoginToTvRage() { string loginUrl = "http://www.tvrage.com/login.php"; string formParams = string.Format("login_name={0}&login_pass={1}", "xxx", "xxxx"); string cookieHeader; WebRequest req = WebRequest.Create(loginUrl); req.ContentType = "application/x-www-form-urlencoded"; req.Method = "POST"; byte[] bytes = Encoding.ASCII.GetBytes(formParams); req.ContentLength = bytes.Length; using (Stream os = req.GetRequestStream()) { os.Write(bytes, 0, bytes.Length); } WebResponse resp = req.GetResponse(); cookieHeader = resp.Headers["Set-cookie"]; String responseStream; using (StreamReader sr = new StreamReader(resp.GetResponseStream())) { responseStream = sr.ReadToEnd(); } return cookieHeader; } I then pass the cookieHeader into this method which should be getting the source of the My Shows page: private string GetSourceForMyShowsPage(string cookieHeader) { string pageSource; string getUrl = "http://www.tvrage.com/mytvrage.php?page=myshows"; WebRequest getRequest = WebRequest.Create(getUrl); getRequest.Headers.Add("Cookie", cookieHeader); WebResponse getResponse = getRequest.GetResponse(); using (StreamReader sr = new StreamReader(getResponse.GetResponseStream())) { pageSource = sr.ReadToEnd(); } return pageSource; } I have been using this previous question as a guide but I'm at a loss as to why my code isn't working.

    Read the article

  • How do you set a cookie to be accessible across the entire domain in Javascript

    - by Tzarkov
    I suppose there should be a way to set a cookie to be accessible from the entire domain nevermind from which directory you are setting the cookie. Say in mypage.com/blue/index.php y set the cookie "colour=blue;" this way: document.cookie = "colour" + "=" + "blue" + "; expires=" + expireDate.toGMTString() + "; path=/"; Using this code, the cookie retrieval function in mypage.com/home.php can't access the content of the cookie. If it was just from first level directories that the cookie needs to be set, we would be ok by doing path=../ instead of path=/ But how do you go about writing generic code that sets a cookie that is accessible from any page in that domain not minding how deep in the file structure is the page the cookie is being set from?

    Read the article

  • [Python] Different work of the script in Windows and in FreeBSD

    - by www.yegorov-p.ru
    Hello. I'm writing some script, that works with web-servers. So, I have the following code: client = suds.client.Client(WSDLfile) client.service.Login('mylogin', 'mypass') print client.options.transport.cookiejar ####### sessnum = str(client.options.transport.cookiejar).split(' ')[1] client = suds.client.Client( WSDLfile, headers= { 'Set-Cookie' : sessnum } ) When running in FreeBSD, it returns <cookielib.CookieJar[<Cookie sessnum=9WAXQ25D37XY535F6SZ3GXKSCTZG8CVJ for .IP.IP.IP.IP/>]> but in Windows it returns <cookielib.CookieJar[]> How can I fix it?

    Read the article

  • PHP read a cookie that is on another domain

    - by pnm123
    Hello, I have two domains. One domain contains the login script. It creates a cookie when logged in. Another domain have a URL shortener. So, on the 2nd domain that have the URL Shortener script have a file called session.php. Usually I was using $_COOKIE['sessionid'] to get the session id and match it using database. How can I get the session id now? I have tried few ways but none of them have solve my problem. Thank you, pnm123

    Read the article

  • What is the pros and cons in using FormsAuthentication to persist login cookie?

    - by stacker
    What is the pros and cons in using FormsAuthentication to persist a login cookie? I see that StackOverflow ignore FormsAuthentication and instead implemented a different strategy to persist a login cookie. Pros Out of the box implementation for persistent login feature. Cons The login feature depends on the machine key which mean that I need to make sure that the machine key is the same on all the servers in the farm. The cookie contains wired encrypted values that don't really make sense to store in the cookie.

    Read the article

  • mysql_fetch_assoc data to COOKIE in user browser

    - by Gowtham Raj
    I had data in mysql, where it does not need any security. I had a sql query string to get the data out every time using mysql_fetch_assoc. So, I planed to store data in users browser.To reduce no of quires to sql. if (!isset($_COOKIE['countries'])){ $query = "SELECT iso,name FROM sel_country"; $countries = mysql_query($query); setcookie('countries', serialize($countries), time()+3600); }else{ $countries = $unserialize($_COOKIE['countries']); } while ($row = mysql_fetch_assoc($countries)) {echo $row['name']} But, When cookie is set it is showing following error Fatal error: Function name must be a string in /home/worlds/public_html/index/ctrl.php on line 15 My cookie in browser displaying content as i%3A0%3B Please help me out, how should i go?

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >