Skip to content

Instantly share code, notes, and snippets.

@linickx
Created July 24, 2013 20:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save linickx/6074260 to your computer and use it in GitHub Desktop.
Save linickx/6074260 to your computer and use it in GitHub Desktop.
example wordpress_logged_in for root-cookie
<?php
# Either load WordPress : http://codex.wordpress.org/Integrating_WordPress_with_Your_Website
# or Manually define your url like...
$siteurl = "http://www.linickx.com/wordpress";
define( 'COOKIEHASH', md5( $siteurl ) );
$cookiename = "wordpress_logged_in_" . COOKIEHASH;
if (isset($_COOKIE[$cookiename])) {
echo "# Set!";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment