GFXVoid Graphic Design Forum

Remove Text Formatting
Loading...

» Online Users: 10,025

0 members and 10,025 guests
No Members online

» Site Navigation

 > FAQ

» Stats

Members: 35,442
Threads: 103,075
Posts: 826,688
Top Poster: cc.RadillacVIII (7,429)
Welcome to our newest member, Lekelindids
Results 1 to 3 of 3

Thread: Simple Cookies

  1. #1
    Join Date
    Dec 2004
    Location
    Buffalo Grove, Illinois
    Posts
    350

    Default

    The following tutorial gives a brief explanation of the overview of cookies.


    Code
    Code:
    <?php
    
    $ip = $_SERVER['REMOTE_ADDR']; //Gets Clients I.P Address
    if (!isset($_COOKIE['testcookie'])) { //Checks For Cookie On Clients Harddrive
    setcookie("testcookie", $ip); //Sets New Cookie With The Content of Clients I.P Address
    echo 'Your Cookie Has Been Set!';
    } else {
    echo 'Your Cookie is already set!';
    }
    
    ?>
    Example Here

    Brought To You By PHPMini

  2. #2
    Join Date
    Mar 2005
    Location
    Montreal
    Posts
    713

    Default

    what if a browser was set to block alll cookies ?

    but anyways thx 4 the info

  3. #3
    Join Date
    Dec 2004
    Location
    GFXVoid
    Posts
    4,412

    Default

    Originally posted by Mohammed@May 13 2005, 05:38 PM
    what if a browser was set to block alll cookies ?

    but anyways thx 4 the info
    [snapback]50297[/snapback]
    Then it would block the cookie from being downloaded, it wont bypass it or anything lol.

Similar Threads

  1. Introduction to PHP cookies
    By soniclnd in forum Other Tutorials
    Replies: 2
    Last Post: 09-15-2011, 11:58 PM
  2. Simple sig
    By Tyson in forum Sigs & Manips
    Replies: 8
    Last Post: 08-26-2005, 10:16 AM
  3. Simple Sig
    By *Peng* in forum Sigs & Manips
    Replies: 5
    Last Post: 07-15-2005, 02:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBadvanced CMPS v4.1.1