Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2007
    Location
    Portland/dorset
    Posts
    1,568
    Tokens
    0

    Latest Awards:

    Default View a page once

    On some DJ Panels there is a script were users can only view a page once dose any one no it
    Lets make the map red again

    T4 on the beach 2009 woo
    Need help PM me Im always happy to help, more then the guys at Asda

  2. #2
    Join Date
    Sep 2006
    Location
    Doncaster, UK
    Posts
    4,081
    Tokens
    0

    Latest Awards:

    Default

    PHP is logical so it would be something like $user view="page.php" 1> echo = "page content" else $user view="page.php" 1< echo="lol no".
    Quote Originally Posted by Nain View Post
    i voted 'Not Sure' as im, not sure!

  3. #3

    Default

    I'm not good at thinking logically but the first thing that comes to my head is having a mysql db and inserting the users IP into it and checking if the user has viewed thepage using their IP if so tell them no if not let them view:
    PHP Code:
    <?php
    $dbuser 
    "username";
    $dbpass "pass";
    $dbname "databasename";
    $dbhost "localhost";
    //Change the values to your details for accessing the database..
    $connect mysql_connect($host$dbuser$dbpass);
    mysql_select_db($dbname$connect);
    //Connect to the database..
    $ip $_SERVER['REMOTE_ADDR'];
    //The users IP

    $get mysql_query("SELECT * FROM `tablename` WHERE `ip` = '" $ip "'");
    //Check the database for any maches..

    if(mysql_num_rows($get) > 0)
    {
        echo(
    "No access already been viewed by this person..");
    }
    else
    {
        echo(
    "Page content..");
        
    mysql_query("INSERT INTO `tablename` (`ip`) VALUES ('" $ip "')");
        
    //Add the users IP to the db to prevent them from accessing again..
    }
    ?>
    There might be a much easyer way to do this I just can't think atm. Hope it helps.
    Last edited by Jme; 02-01-2008 at 04:18 AM.

  4. #4
    Join Date
    May 2007
    Location
    Nebo, NC, USA
    Posts
    2,517
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Aflux View Post
    PHP is logical so it would be something like $user view="page.php" 1> echo = "page content" else $user view="page.php" 1< echo="lol no".
    Are you high? rofl.

    You could set a cookie, use a database, or do a session (once per session)

  5. #5

    Default

    Quote Originally Posted by Dentafrice, View Post
    Are you high? rofl.

    You could set a cookie, use a database, or do a session (once per session)
    See i thought about sessions/cookies but i'm not too sure how to go about so they never expire?

  6. #6
    Join Date
    Mar 2007
    Posts
    1,691
    Tokens
    1,025

    Latest Awards:

    Default

    Quote Originally Posted by Jme View Post
    See i thought about sessions/cookies but i'm not too sure how to go about so they never expire?
    You bake them out of lead.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •