View Full Version : Write cookie with URL

10-20-2009, 05:41 PM
Not sure if its possible, but I need to write a cookie with a url.

So this would write 2232 as the value for a cookie named ID.


Ultimately, I'm working on a pixel tracking script for an incentive website. If you can help, I'll be eternally grateful lol.

10-20-2009, 05:46 PM
If you send your ID via GET, then it would be in $_GET['ID']. You could simply use setcookie() (http://php.net/setcookie) at redirect.php to set the cookie ...

If I have not understood the question properly, could you explain it a little bit please ...

10-20-2009, 06:01 PM
Do you really mean that you might want to place a 1 X 1 .gif pixel graphic on
a page, and whenever that graphic is displayed (page refresh) it processes
something using a PHP script?

So there would not be a URL or "link" ... it all happens without the user knowing about it?

In fact, you could write cookies, log things in a database, emails, etc. automatically,
whenever the page was displayed or refreshed.

Like SK, I'm thinking that we might not understand what you really want to do.

10-20-2009, 07:36 PM
What I'm trying to do is create a pixel tracking script for website where users complete offers for cash.

10-20-2009, 08:45 PM
I guess I don't know what that is ... sorry.
Maybe someone else has a good solution for you.