Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Curl cookies date

Posted on 2008-10-23
3
441 Views
Last Modified: 2012-05-05
Hi experts,
i use this:
      $LOGINURL = "https://www.o2online.ie/amserver/UI/Login";
      $POSTFIELDS = 'IDToken1=username&IDToken2=pass&Go=Go&org=o2ext&gx_charset=UTF-8';
    $reffer = "https://www.o2online.ie/amserver/UI/Login";
    $cookie_file_path='cookie.txt';

      $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,$LOGINURL);
      curl_setopt($ch, CURLOPT_USERAGENT, $agent);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS,$POSTFIELDS);
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
      curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
      curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
      curl_setopt($ch, CURLOPT_REFERER, $reffer);
      curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
      curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);
  curl_exec ($ch);
  curl_close ($ch);

is possible get cookie expiration date from cookie.txt...
Thanks..

0
Comment
Question by:popolusiak
  • 2
3 Comments
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 22804171
Please run the script and then print out cookie.txt and post the contents here.  We may be able to help you decode it. ~Ray
0
 

Author Comment

by:popolusiak
ID: 22808448
Thanks for answer.
The contents of cookie.txt:

.o2online.ie      TRUE      /      FALSE      0      o2onlinewebserver      blaecrmiwsp02-bUhHdAqJwBUAACG75xgAAAGi
.o2online.ie      TRUE      /      FALSE      0      LtpaToken      rRhohlliyTPetYuPT9Zpj7CQMOHc5EcLu3+Dm711M97NFDpLe8GndbOFxMhq2Pu0DYUamBjZzKgS2tw0vFn748G13RUVWroc+3KXKILybr8oZynvUxPYnGgMaqMLIN4BeZKS0Xbg+sHwVR8cW8HYEe7QKYrJ7RJW7ET+rhZM8j1OGKz6FpRROhb5eSr3uf935ANc6qnGz8lUBp5BFnwwioO7hIP1bTrNXmoEZh8LmriSG3KAaZ6oKViwK4f/Z5EjX2L1Sb86DgiHyTBEqiFQUJ6iLC29Ml3sNyVb1UNmDaLUAomT5wFWQoEjbk6P838Q5miGT4gu5PNb+kerXXaQ2DhZYuAtlE18p92Fg9utticYNWMnD9whxg==
.o2online.ie      TRUE      /      FALSE      0      IMDataGivenName      0864003186
.o2online.ie      TRUE      /      FALSE      0      IMDataCtn      0864003186
.o2online.ie      TRUE      /      FALSE      0      IMDataEmailAddress      
.o2online.ie      TRUE      /      FALSE      0      iPlanetDirectoryPro      AQIC5wM2LY4SfczjRqg93uQETIIAiMy35jxxXdpWl0z5buQ%3D%40AAJTSwAKLTUyODI3OTE0MQACU0kAAjAzAAJTMQACMDE%3D%23
.o2online.ie      TRUE      /      FALSE      10      AMAuthCookie      LOGOUT
0
 
LVL 109

Accepted Solution

by:
Ray Paseur earned 250 total points
ID: 22811984
Hi.  It does not appear to be present in cookie.txt.  I have looked at the cookies via Firefox prior to login and they appear to expire at the end of the browser session.  Sorry I could not help more. ~Ray
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
What does this formatting equate to? 7 18
How to obtain the string from a PHP StdObject ? 6 32
issue with DB import 1 17
Reference key in foreach loop 4 14
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question