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
    Nov 2007
    Posts
    88
    Tokens
    0

    Default PHP help, i think

    might be ajax/java or php not too sure.
    is there a script that finds the page 'title' and displays.

    so like say i click 'home' and the page loads in my frame.
    theres a box above it that currently says 'Main Content' and changes to 'Home Page' or whatever the <title></title> (or other means of defining a page title) of the page is.



    the main content is an ajax frame and the div is called contentarea

  2. #2
    RedCrisps Guest

    Default

    do you mean like this?

    Habbox UK Forum > Technology + The Web > Designing & Development > Website Coding
    Reload this Page PHP help, i think

    or just the name of the file?

  3. #3
    Join Date
    Nov 2007
    Posts
    88
    Tokens
    0

    Default

    I mean like a specific name like the title of the page

  4. #4
    RedCrisps Guest

    Default

    ask simon, he uses that script on habbolake.com =]

  5. #5
    Join Date
    Apr 2005
    Posts
    4,614
    Tokens
    90

    Latest Awards:

    Default

    PHP Code:
    <?php
    $data 
    file_get_contents("ur page");
    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);
    }
    $lol get_string_between($data"<title>""</title>");
    echo 
    $lol;
    ?>
    If ever you need to get string between two pieces of data and don't know PHP, use that

  6. #6
    RedCrisps Guest

    Default

    it don't matter now i don't think he is using that layout anymore

Posting Permissions

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