Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 23

Thread: help

  1. #11
    Join Date
    Apr 2006
    Location
    Leamington Spa
    Posts
    1,375
    Tokens
    72

    Latest Awards:

    Default

    See if this works:
    PHP Code:
    <?php

    $file 
    file_get_content("http://z7.invisionfree.com/HabbosWorld_Forums/index.php");

    eregi('Our members have made a total of <b>(.*)</b> posts<br>'$file$totP);

    eregi('We have <b>(.*)</b> registered members<br>'$file$totM);

    echo(
    "<b>Forum Statistics:</b>");

    echo(
    "<br />Total Posts: ");
    echo 
    $totP[1];

    echo(
    "<br />Total Members: ");
    echo 
    $totM[1];

    ?>
    i've been here for over 8 years and i don't know why

  2. #12
    Join Date
    Oct 2007
    Posts
    824
    Tokens
    71

    Latest Awards:

    Default

    I got the following error:

    Fatal error: Call to undefined function file_get_content() in /www/**********/h/a/b/b/o/s/w/o/habbosworld/htdocs/test/systemtest.php on line 3
    Vouches
    [x][x]

  3. #13
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default

    someone made a spelling mistake

    Corrected Vers:
    PHP Code:
    <?php

    $file 
    file_get_contents("http://z7.invisionfree.com/HabbosWorld_Forums/index.php");

    eregi('Our members have made a total of <b>(.*)</b> posts<br>'$file$totP);

    eregi('We have <b>(.*)</b> registered members<br>'$file$totM);

    echo(
    "<b>Forum Statistics:</b>");

    echo(
    "<br />Total Posts: ");
    echo 
    $totP[1];

    echo(
    "<br />Total Members: ");
    echo 
    $totM[1];

    ?>
    Coming and going...
    Highers are getting the better of me

  4. #14
    Join Date
    Oct 2007
    Posts
    824
    Tokens
    71

    Latest Awards:

    Default

    Another error
    Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /www/**********/h/a/b/b/o/s/w/o/habbosworld/htdocs/test/systemtest.php on line 5

    Warning: file_get_contents(http://z7.invisionfree.com/HabbosWorld_Forums/index.php) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /www/**********/h/a/b/b/o/s/w/o/habbosworld/htdocs/test/systemtest.php on line 5
    Forum Statistics:
    Total Posts:
    Total Members:
    Vouches
    [x][x]

  5. #15
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default

    I cant help you then as your php config doesnt allow file_get_contents.
    Coming and going...
    Highers are getting the better of me

  6. #16
    Join Date
    Oct 2007
    Posts
    824
    Tokens
    71

    Latest Awards:

    Default

    Ill try a different host 1 sec.

    EDIT-
    k i tried it on freehostia but all I got was this:
    (.*) posts
    ', $file, $totP); eregi('We have (.*) registered members
    ', $file, $totM); echo("Forum Statistics:"); echo("
    Total Posts: "); echo $totP[1]; echo("
    Total Members: "); echo $totM[1]; ?>
    Last edited by Trigs; 24-12-2007 at 08:28 PM.
    Vouches
    [x][x]

  7. #17
    Join Date
    Oct 2007
    Posts
    824
    Tokens
    71

    Latest Awards:

    Default

    bump

    btw are the files even readable?
    Vouches
    [x][x]

  8. #18
    Join Date
    Apr 2005
    Posts
    4,614
    Tokens
    1,290

    Latest Awards:

    Default

    Might not be tidy but it works. Can't remember where I saved get_string_between from.

    PHP Code:
    <?php

    function get_string_between($string$start$end){
            
    $string " ".$string;
            
    $ini strpos($string,$start);
            if (
    $ini == 0) return "";
            
    $ini += strlen($start);  
            
    $len strpos($string,$end,$ini) - $ini;
            return 
    substr($string,$ini,$len);
    }

    $data file_get_contents("http://z7.invisionfree.com/HabbosWorld_Forums/index.php");

    $members get_string_between($data"We have""registered members");

    echo (
    "Total members: $members");

    $posts get_string_between($data"Our members have made a total of""posts");

    echo (
    "<br>Total posts: $posts");

    ?>

  9. #19
    Join Date
    Oct 2007
    Posts
    824
    Tokens
    71

    Latest Awards:

    Default

    Thanks for the help but all I got was:

    Total posts: $posts"); ?>
    Vouches
    [x][x]

  10. #20
    Join Date
    Feb 2007
    Location
    London
    Posts
    6,722
    Tokens
    3,902
    Habbo
    welldonemate

    Latest Awards:

    Default

    I don't understand, you want someone to work for you to help your site improve?
    (H)

Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

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