Solved

Curl cookies date

Posted on 2008-10-23
3
439 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Advice and best practice  SQLite3 Database using PHP 2 48
paypal ipn url 5 57
How to populate a dynamically created text input from ajax return 18 47
Decrypt string by php 7 31
Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
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…

777 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