check if a cookie exists nginx code example
Example 1: check if session variable exists php
if (isset($_SESSION['errors']))
{
//Do stuff
}
Example 2: php check if file exists
if (!file_exists('http://mysite.com/images/thumbnail_1286954822.jpg')) {
$filefound = '0';
}