Created
June 5, 2017 21:25
-
-
Save phpfiddle/0432199b6d7ae3fcf169697d0e5851ff to your computer and use it in GitHub Desktop.
[ Posted by Antonio Osorio ] prueba crumbstore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
setcookie("test_cookie", "test", time() + 3600, '/'); | |
?> | |
<html> | |
<body> | |
<?php | |
$seedUrl = "https://finance.yahoo.com/quote/%5EGSPC/history?period1=1496548800&period2=1496635200&interval=1d&filter=history&frequency=1d"; | |
$f = file_get_contents($seedUrl); | |
$f = htmlentities($f); | |
$f = utf8_encode($f); | |
$cs = strpos($f,"CrumbStore"); | |
$cr = strpos($f,"crumb",$cs+10); | |
$cl = strpos($f,':', $cr + 5); | |
$q1 = strpos($f,'"', $cl+1); | |
$q2 = strpos($f,'"', $q1 + 1); | |
$crumb = substr($f, $q1 + 6, $q2-$q1-6); | |
echo "crumb= " . $crumb ."<br><br>"; | |
print_r($_COOKIE); | |
echo "<br><br><br>" . $f; | |
/* | |
echo "<script>console.log( 'Debug Objects: " . $f . "' );</script>"; | |
if(count($_COOKIE) > 0) { | |
echo "Cookies are enabled."; | |
} else { | |
echo "Cookies are disabled."; | |
} | |
*/ | |
?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment