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
    Aug 2004
    Location
    Over there. ^_^
    Posts
    1,100
    Tokens
    0

    Latest Awards:

    Default Refferers Script error? >:-|

    right i keep getting this error on my refferers page and i dont know wats wrong, i get this error message:

    Warning: preg_match(): Unknown modifier '/' in /path/to/refferers/refferers.php on line 7

    Warning: preg_match(): Unknown modifier ']' in /path/to/refferers/refferers.php on line 10
    this is the php code :s ive commented next to line 7 & 10

    PHP Code:
    <?php
    include ("config.php");


    $ref $_SERVER['HTTP_REFERER']; //gets the reffering url
    preg_match("/^(http://)?([^/]+)/i",
    "$ref"$matches);    // LINE 7
    $host $matches[2];

    preg_match("/[^./]+.[^./]+$/"$host$matches);   // LINE 10
    $test1 mysql_query("SELECT * from ref where domain = '$matches[0]'");

    $test mysql_num_rows($test1);
    if (
    $test == 0)
    {

    $refinsert mysql_query("INSERT INTO `ref` ( `domain` , `total`)VALUES ('$matches[0]',
    '1')"
    );

    }
    else
    {

    $update mysql_query("UPDATE ref set total = total +1 where domain = '$matches[0]'");
    }
    ?>
    Last edited by xEnigmA; 22-07-2005 at 03:42 PM.
    *Image Removed


    Ahemm.. How exactly was my sig innapropriate?
    Goddamit i hate this forum :@
    I RESIGN FROM GRAPHICS DESIGNER :@ :@ :@

  2. #2
    Join Date
    Jun 2005
    Location
    Manchester
    Posts
    3,187
    Tokens
    0

    Latest Awards:

    Default

    Have You Created Your MYSQL Database?

  3. #3
    Join Date
    Aug 2004
    Location
    Over there. ^_^
    Posts
    1,100
    Tokens
    0

    Latest Awards:

    Default

    do you really think im that stupid :@ im insulted by that comment and you dont seem to have a clue wat im talkin about :rolleyes: there is a problem on the lines i stated and your talking about mysql
    *Image Removed


    Ahemm.. How exactly was my sig innapropriate?
    Goddamit i hate this forum :@
    I RESIGN FROM GRAPHICS DESIGNER :@ :@ :@

  4. #4
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    i havent slept in almost 3 days so my responce probly will make little sence, anyway, you need to slash out some of the stuff in the preg match to stop it genirating before it should ect, the currant problem is i cant currantly rember exsactly what needs to be slashed out and what doesnt lol "/

    anyway, i think thats the problem

  5. #5
    Join Date
    Jun 2005
    Location
    Manchester
    Posts
    3,187
    Tokens
    0

    Latest Awards:

    Default

    o.O Sorry Didn't Read All The Problem I Saw MYSQl Problems Soz Dude Lol.

  6. #6
    Join Date
    Nov 2004
    Location
    Daventry, Northants
    Posts
    1,510
    Tokens
    0

    Latest Awards:

    Default

    No mysql errors there
    :/

Posting Permissions

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