Log in

View Full Version : PHP help, i think



SmileUK
13-02-2008, 12:33 AM
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.

http://i59.photobucket.com/albums/g295/maltfish/main-1.png

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

RedCrisps
13-02-2008, 08:56 AM
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?

SmileUK
14-02-2008, 06:20 PM
I mean like a specific name like the title of the page

RedCrisps
14-02-2008, 06:29 PM
ask simon, he uses that script on habbolake.com =]

Robbie
15-02-2008, 11:18 PM
<?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

RedCrisps
16-02-2008, 03:41 PM
it don't matter now i don't think he is using that layout anymore

Want to hide these adverts? Register an account for free!