That is a full working script that you can upload to your site. I tested it online and it works. You then need to look at the script and put the php bits into your page in the same locations they are above.
Gary, I come here for advice which i beleive is what forums are set up for. Also i can not afford to hire someone being as im 16 and obviously unemployed. And i have a small understanding of html, css, php and javascript. Just the people here know Soooo much it goes over my head
You need to cut and past the different bits of it to every page on your site that you want the title and link to appear.
ok <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <?php ?> <html> <title>Title of the page</title> <body> <a href="http://www.geekazoid.co.uk<?php echo $_SERVER['REQUEST_URI']; ?>"><?php echo get_title_tag(); ?> </head> <body> <?php function get_title_tag(){ $thesite="http://www.geekazoid.co.uk"; $thepage=$_SERVER['REQUEST_URI']; $theurl="$thesite$thepage"; $fp = fopen ("$theurl", 'r'); while (! feof ($fp)){ $contenu .= fgets ($fp, 1024); if (stristr($contenu, '<title>' )){ break; } } if (eregi("<title>(.*)</title>", $contenu, $out)) { return $out[1]; } else{ return false; } } ?> </a> </body> </html> </body> </html>
<?php function get_title_tag(){ $thesite="http://www.geekazoid.co.uk"; $thepage=$_SERVER['REQUEST_URI']; $theurl="$thesite$thepage"; $fp = fopen ("$theurl", 'r'); while (! feof ($fp)){ $contenu .= fgets ($fp, 1024); if (stristr($contenu, '<title>' )){ break; } } if (eregi("<title>(.*)</title>", $contenu, $out)) { return $out[1]; } else{ return false; } } ?> <html> <head> <title>Title of the page</title> </head> <body> <a href="http://www.geekazoid.co.uk<?php echo $_SERVER['REQUEST_URI']; ?>"><?php echo get_title_tag(); ?> </body> </html> PHP: Also your html tags are pretty poorly structured!!!!!!!
Ok ive uploaded the page, it was a blank php page i pasting the script in exactly as you put it and thats whats happening now >> http://www.geekazoid.co.uk/Untitled-2.php did you say you tested it ?
Don't paste the script into dreamweaver. Use notepad and save it as a php file and upload it to your site.
I have no problem with your condition, only with the apparent lack of motivation to learn the basic stuff from which all else is derived, and the apparent desire to have the answers just handed to you. It is imperative that you have a certain degree of competence in html and css. You should work your way through a few tutorials in javascript and php. You don't need to be able to create new scripts, but you should be able to work your way through something you are given. It is up to you to provide the basic understanding. Forums like this are most effective when folks needing help are given just enough info for them to get to the next step on their own, by study and further research. Tutorials in all these disciplines are available on the web. Google is your friend. As your level of basic understanding rises, the advice you're given will be more and more valuable to you. cheers, gary