Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19
  1. #11
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    Was that the version id rembered to change " to ' or not "/

    Just tested, works fine, i fixed an error with edit, change to the updated version and should work fine

  2. #12
    Join Date
    Feb 2006
    Location
    Inside your PC
    Posts
    1,626
    Tokens
    0

    Latest Awards:

    Default

    Warning: file(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/habboatt/public_html/test/online2.php on line 3

    Warning: file(http://www.habbohotel.co.uk/): failed to open stream: Permission denied in /home/habboatt/public_html/test/online2.php on line 3
    Current Habbos Online:

    i copied the updated script and it didnt work still

  3. #13
    Join Date
    Aug 2004
    Location
    bristol
    Posts
    3,799
    Tokens
    0

    Latest Awards:

    Default

    Are you sure you can use file() on external pages?
    kinda quit.

  4. #14
    Join Date
    Feb 2006
    Location
    Inside your PC
    Posts
    1,626
    Tokens
    0

    Latest Awards:

    Default

    thats the updated code he posted and i just copied and pasted it tryed it n it dont work


    i now get something really weird showing
    well look for yaself
    www.habboattic.co.uk/test/online2.php
    Last edited by -::Mr.Dave::-; 10-04-2006 at 09:00 PM.

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

    Latest Awards:

    Default

    Oops i think that explains it, its grabing the wrong line

    (plus must work if the first version worked)


    I think... its line 72 of the document, im just not sure if i need to counter for the line 0 in php or not "/
    <?php
    //get page
    $lines = file('http://www.habbohotel.co.uk/');

    //Get line
    $Ndata = $lines['72']; // may be line 71 or 70 - try till one works

    //Remove what we dont want
    $Ndata = str_replace('<div id="toolbar-habbocount">', '', $Ndata);
    $Ndata = str_replace("Habbos online</div>", "", $Ndata);

    // Add text and output
    echo "Current Habbos Online: ".$Ndata;
    ?>
    Last edited by Mentor; 10-04-2006 at 09:06 PM.

  6. #16
    Join Date
    Feb 2006
    Location
    Inside your PC
    Posts
    1,626
    Tokens
    0

    Latest Awards:

    Default

    still the wrong line now it shows hc badge

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

    Latest Awards:

    Default

    Can someone else count the lines, as it seems to be changeing "/
    Ive got line 73 in a editor with numbers, firefox puts it at 72 and it should be one less to count for the start at 0 "/

    Eee. use your current number -2 and it may work *hopes*

  8. #18
    Join Date
    Dec 2005
    Location
    England | Brighton
    Posts
    1,378
    Tokens
    0

    Latest Awards:

    Default

    Line 72 for me is
    <div id="toolbar-habbocount">8,146 Habbos online</div>

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

    Latest Awards:

    Default

    Yup thats the one its supposed to be targeting "/ so line 71 should be right if php adds a line 0 "/
    Or is firefox already adding that and it is 72... meh, im to tired for this

Page 2 of 2 FirstFirst 12

Posting Permissions

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