+ Reply to Thread
Results 1 to 4 of 4

Thread: Page double executuon

  1. #1
    kotofei is offline x10Hosting Member kotofei is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    11

    Page double executuon

    I have wierd problem - seems like page executes twice.

    I have simple php code to insert ip, referer and browser info in mysql db. When i load my page and then look into db, i am seeing:

    85.141.154.237 Opera/9.24 (Windows NT 5.1; U; en) 2007-10-31 08:13:30
    85.141.154.237 Opera/9.24 (Windows NT 5.1; U; en) 2007-10-31 08:13:32

    So everytime i reload it, i get to mostly identical entries.

    I also tried to write a script for storing info in text file, and it also writed to identical strings.

    Help me please!
    P.S Sorry for my bad english.

  2. #2
    athiwatc is offline x10 Sophmore athiwatc is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    155

    Re: Page double executuon

    File please ??
    How could i help you with no script
    Last edited by athiwatc; 10-31-2007 at 11:14 AM.

  3. #3
    kotofei is offline x10Hosting Member kotofei is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    11

    Re: Page double executuon

    PHP Code:
    <?php 

    if ($_SERVER['HTTP_USER_AGENT']) {
        
    $browser $_SERVER['HTTP_USER_AGENT'];
        echo 
    $browser;
    }

    if (
    $_SERVER['REMOTE_ADDR']) {
        
    $ip $_SERVER['REMOTE_ADDR'];
        echo 
    ", " $ip;
    }

    if (
    $_SERVER['QUERY_STRING']) {
        
    $query $_SERVER['QUERY_STRING'];
        echo 
    ", " $query;
    }

    if (
    $_SERVER['HTTP_REFERER']) {
        
    $referer $_SERVER['HTTP_REFERER'];
        echo 
    ", " $referer;
    }

    if (
    $_COOKIE) {
        echo 
    ", ";
        
    print_r($_COOKIE);
    }

    echo 
    $data;
    include_once(
    'mysql_settings.php');

    mysql_query("INSERT INTO log (ip, browser, referer) VALUES('$ip', '$browser', '$referer') ") or die(mysql_error());
    mysql_close($con);

    echo 
    "<br>Data logged";
    ?>

  4. #4
    Slothie's Avatar
    Slothie is offline Lord Of The Keys Slothie is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Singapore
    Posts
    1,432

    Re: Page double executuon

    Tried this in other browsers yet?

    Easiest 70 points you'll make on x10

    Feel free to add my reputation by clicking on the if you found my post helpful to you :P


    If I am not responding to your PMs, that means I am ignoring you. Take a hint.



    09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0


+ Reply to Thread

Similar Threads

  1. Replies: 4
    Last Post: 02-20-2008, 06:13 AM
  2. I need help with public viewing of my page
    By Squeaky Neb in forum Scripts & 3rd Party Apps
    Replies: 3
    Last Post: 10-02-2007, 08:24 PM
  3. welcome page just won't die!
    By acphoto in forum Free Hosting
    Replies: 3
    Last Post: 09-25-2007, 06:05 PM
  4. Cannot edit in Front Page
    By katyW in forum Free Hosting
    Replies: 9
    Last Post: 05-26-2005, 06:34 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
x10hosting free hosting for the masses
dedicated servers