cookies

Complex retrieval of a web document

I need to retrieve a document from a website, and parse it. Problem is that: The site uses both http and https protocol You need to log in the site (I have a regular account) From the login page, there are at least 2 redirect just to log in yourself I managed an HTTPS connection and posted my login and pass, but I'm having troubles w...

ASP.NET MVC Default View Model Binding of cookies to custom objects

Does the ASP.NET MVC 2 Default View Model Binding support binding a multi-value cookie to a custom object? Before I write a custom Value Provider, I would like to be sure that the functionality didn't already exist. So given an action like: public ActionResult SomeAction(CustomObject foo) where CustomObject is something like: public...

Rails 3 Cookie Based Sessions Question

With Rails 3, the default session storage mechanism is cookie_store. I assume that this means that the contents within the session hash are serialized, encoded and stored within a cookie in the browser? Does this mean that nothing (or very little) of the session is stored in the server? I've had a few issues where I had a cookie overflo...

Cookie of different domains in PHP

is it possible to access cookie of a domain foo.com in another domain like example.com using php? ...

Can not write permanent cookies

I experimented the permanent cookies shortcut with Rails 3.0 (and Ruby 1.9.2) but I can't write in this hash. I try with the following code : cookies.permanent[:last_used_expiration_delay] = @snippet.expiration_delay But the hash remains empty (here is the YAML dump) : --- !map:ActionDispatch::Cookies::PermanentCookieJar {} Basic ...

help with PHP, POST, COOKIE, JQUERY

Hello, I'm developing an application for a client's website. Here's the story, this company uses an application/HDD called synology that is basically an HDD box connected to the internet and gives access to files to clients with pre-created accounts. This interface is written in CGI and I have no access to the box (different network and ...

Cookies and javascript navigation (tabs)

I have a navigation tabs and when user clicks a tab the div changes with ajax. I would like to it to remember on what tab user was when user changes page. I havent done the tab navigation and im totally new to javascript/jquery. Here is the javascript for the tabs: jQuery('#contentContainer #tabNavi .nav-item').each(function(i, item) {...

Pagination page saves page in to cookie

I have a pagination which is done like this: this.pagination = function(limit, length){ //number of pages var nrpages = Math.ceil(length/limit); var currPage = this.pagingcurrPage; console.log('l- '+length); console.log('p- '+nrpages); console.log('c- '+currPage); $.cookie('presss...

Php Cookie Authentication + htacess on old website upgrade

I'm updating my dad's old website. 99% complete. He has an online learning course that was done using frames and 1500+ images/pages. I created a cookie based login script that uses mysql to track users and the validity of the cookie. On each "protected" page my script appears, the cookie is rewritten with a special "code" and the code is...

Using jQuery cookie.js to remember hide/show element?

Hi guys, I have found a great tutorial on how to show and hide a certain div on a page. I got the code working fine, but I would like to extend is to that the show/hide is remembered on page loads. I've looked for a solution jQuery cookie was the answer.. if I'd knew how to write the actual code that is.. Here's the current snippet: <s...

How to clear cookies in WebKit?

Hello ;) i'm currently working with PyWebKitGtk in python (http://live.gnome.org/PyWebKitGtk). I would like to clear all cookies in my own little browser. I found interesting method webkit.HTTPResponse.clearCookies() but I have no idea how to lay my hands on instance of HTTPResponse object :/ I wouldn't like to use java script for that...

Rails: Set cookie only on www subdomain?

I have set up an asset host at assets.domain.com but it appears that cookies are being sent with requests to assets.domain.com. I read somewhere that if you have cookies set to domain.com then this will happen. So I guess I'm trying to set cookies only to www.domain.com so that requests to assets.domain.com will not send cookies. (I als...

Get Cookie values with Zend Framework

Warning: Non-static method Zend_Controller_Request_Http::getCookie() should not be called statically in.. Iam trying the following to get Cookie values: $cookieData = Zend_Controller_Request_Http::getCookie($key, $default); is there an better way to this? ...

phonegap: cookie based authentication (PHP) not working [webview]

I'm working on a mobile web-app using sencha touch, HTML5 and phonegap as a wrapper. I'm using PHP-Authentication (Cookie) and ajax-requests. Everything works fine on safari or chrome, but after the deployment with phonegap (webview) it does't work anymore... Any help would be appreciated :) Some more details: All data for my app is...

ASP.NET MVC Forms Authentication Remember Me

I have an ASP.NET MVC2 application, and I'm using FormsAuthentication to manage the Auth Cookie. When the cookie expires and the page is access, I need to display the Username in the field and the Remember Me checked. How can I do this once the cookie expired and I don't have access to it? ...

Browser Blocking?

We have a site that the client can no longer log into. IE7/8 says 'Internet Explorer cannot display the webpage' and Firefox says something similar. However, I have tried from multiple machines at my office and on my iPhone (3G connection, not Wifi) and can log into the site fine. Is there some kind of browser or network setting that wo...

CookieContainer handling of paths (Who ate my cookie?)

Hi, I'm working on a project that involves some basic web crawling. I've been using HttpWebRequest and HttpWebResponse quite successfully. For cookie handling I just have one CookieContainer that I assign to HttpWebRequest.CookieContainer each time. I automatically gets populated with the new cookies each time and requires no additional...

CURL not sending cookies with POST request

I have enabled cookie engine in curl using curl_easy_setopt on CURLOPT_COOKIEFILE and CURLOPT_COOKIEJAR. In the response from server, the cookies are set. In subsequent requests, CURL is not sending cookies along with the request only if it is a POST request. For GET requests CURL is sending cookies along. Should I indicate CURL in s...

How to handle the expiration of a "remember me" option?

For a cookie based "remember me" function on a web app the user can choose to stay logged in for X days: What do you think is better: a) set the expiration time of the "remember me" only at first login, so the cookie expires after X days after the first login? or b) re-set the expiration time each time the user logs in, so the cookie...

how to exchange session or cookie variables between two webmethods in asp.net webservices

I have two webmethod i have used session variable to exchange the username variable between two webmethods but its displaying null in second webmethod ,can we use cookie as alternate to session to store and retrieve username [WebMethod(EnableSession = true)] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public bool Submi...