You can use a cookie for that, but the problem is that some users block all cookies in their browser. So the safest way to do this is by using a combination of both cookies and IP's.
Of course for those users that have a dynamic IP, you will not be able to keep track of them using their IP, since their IP changes everytime they connect to their ISP.
Here is how to set the cookie:
$cookie = setcookie('cookie_name','Your text goes in here! ',time() + (3600));
And this is how you detect to see if the user has already visited your site or not (to see if the cookie is set or not):
if (isset($_COOKIE['cookie_name']))
{
$cookieval = $_COOKIE['entry'];
echo $cookieval;
}