Jump to content

Will This Work?


MrFish
 Share

Recommended Posts

In php you have to put create cookies before the html tags but could you create a file that makes cookies before the html tags and include it into you actual code somewhere?

Link to comment
Share on other sites

Yes, but the file won't be able to actually make the cookies until it's executed. There's a difference between creating a file and executing it after all. And you can only execute the created file after the current PHP script is over. eval()-ing it isn't going to make any difference. Executing it from the command line (while possible) won't make a difference either, as the new file will need to return the cookie as an HTTP header, which can only happen upon an HTTP request from the user agent that would receive the cookie.

Edited by boen_robot
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...