Commits

Anonymous committed 51a8ad7

shuffling bits

Comments (0)

Files changed (5)

-Visit: http://cookietest-pixel.leve.co?val=somevaluehere
+Visit: http://cookietest.leve.co?val=somevaluehere
     
 You'll be redirected to http://cookietest-host.wurdig.com ... 
 which will load an iframe for cookietest-iframe.jasonleveille.com ... 
-which will request the pixel http://cookietest-pixel.leve.co/pixel.php ...
-which should get the cookie value set during the initial request (which you can see in the request headers to pixel.php)
+which will request the pixel http://cookietest-pixel.leve.co/ ...
+which should get the cookie value set during the initial request (which you can see in the request headers to http://cookietest-pixel.leve.co)
+<?php
+    $value = 'foobar';
+    if(isset($_GET['val'])) {
+        $value = $_GET['val'];
+    }
+    setcookie("TestCookie", $value, time()+3600);
+    header('Location: http://cookietest-host.wurdig.com');
   <title>Cookie Test - iframe</title>
 </head>
 <body>
-    <img src='http://cookietest-pixel.leve.co/pixel.php'>
+    <img src='http://cookietest-pixel.leve.co/'>
 </body>
 </html>
 <?php
-    $value = 'foobar';
-    if(isset($_GET['val'])) {
-        $value = $_GET['val'];
+    $value = 'no cookie';
+    if(isset($_COOKIE['TestCookie'])) {
+        $value = $_COOKIE['TestCookie'];
     }
-    setcookie("TestCookie", $value, time()+3600);
-    header('Location: http://cookietest-host.wurdig.com');
+    file_put_contents('log', $value, FILE_APPEND);
+    header('Content-Type: image/gif');
+    echo base64_decode('R0lGODlhAQABAJAAAP8AAAAAACH5BAUQAAAALAAAAAABAAEAAAICBAEAOw==');

pixel/pixel.php

-<?php
-    $value = 'no cookie';
-    if(isset($_COOKIE['TestCookie'])) {
-        $value = $_COOKIE['TestCookie'];
-    }
-    file_put_contents('log', $value, FILE_APPEND);
-    header('Content-Type: image/gif');
-    echo base64_decode('R0lGODlhAQABAJAAAP8AAAAAACH5BAUQAAAALAAAAAABAAEAAAICBAEAOw==');