leptoon Posted October 20, 2009 Share Posted October 20, 2009 Not sure if its possible, but I need to write a cookie with a url. So this would write 2232 as the cookie for ID. http://www.example.com/redirect.php?ID=2232 Ultimately, I'm working on a pixel tracking script for an incentive website. If you can help, I'll be eternally grateful lol. Quote Link to comment Share on other sites More sharing options...
Dorky Posted October 20, 2009 Share Posted October 20, 2009 Not sure if its possible, but I need to write a cookie with a url. So this would write 2232 as the cookie for ID. http://www.example.com/redirect.php?ID=2232 Ultimately, I'm working on a pixel tracking script for an incentive website. If you can help, I'll be eternally grateful lol. so you want to store the url in the cookie? Quote Link to comment Share on other sites More sharing options...
janusmccarthy Posted October 20, 2009 Share Posted October 20, 2009 Not sure if its possible, but I need to write a cookie with a url. So this would write 2232 as the cookie for ID. http://www.example.com/redirect.php?ID=2232 Ultimately, I'm working on a pixel tracking script for an incentive website. If you can help, I'll be eternally grateful lol. I would personally use a session. However, if you want to manage cookies yourself then you want to use setcookie: http://php.net/manual/en/function.setcookie.php Quote Link to comment Share on other sites More sharing options...
leptoon Posted October 20, 2009 Author Share Posted October 20, 2009 Not sure if its possible, but I need to write a cookie with a url. So this would write 2232 as the cookie for ID. http://www.example.com/redirect.php?ID=2232 Ultimately, I'm working on a pixel tracking script for an incentive website. If you can help, I'll be eternally grateful lol. so you want to store the url in the cookie? No, I want to use the URL to create a cookie. Quote Link to comment Share on other sites More sharing options...
thebadbad Posted October 20, 2009 Share Posted October 20, 2009 Simple. $_GET['ID'] will contain the id, and janusmccarthy already pointed you to the manual page for the setcookie() function. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.