php - Stop cookies being set
This is a bit of a strange one. I have a request that a page on a clients site not set any cookies. The problem is that the site runs on Drupal, which relies quite heavily on cookies. I had an idea to create a standalone PHP script, and pull the contents of the Drupal page into a variable and then echo the variable in the hope it wouldn't create the cookie.
However, the same Cookies are still set.
My code is as simple as it can get in the standalone script;
<?php $content = file_get_contents('http://drupalsite.com'); echo $content;
I've also tried experimenting and adding
ini_set('session.use_cookies', '0'); to the standalone script and even creating a subdirectory and adding the following to a .htaccess file
Header unset Cookie Header unset Set-Cookie
No matter what I do, cookies are still being set.