Reply
Is this possible? (automated browser title)
Old 09-28-2007, 05:32 PM Is this possible? (automated browser title)
Junior Talker

Posts: 3
Hi,
Something that would be really useful for a new project im working on would be to have automated browser titles using some php code in the <title> tags.
The only way I can think of doing this is by having the php code read the url im using for navigation, e.g. /windows/atari2600/ and use that data, edit it and have it display as 'Windows > Atari 2600'
Has this kind of thing been done before? are there any other common ways of doing this? Also are there any tutorials around?
Thanks!
Mosqwik is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 09-28-2007, 11:14 PM
dadofgage's Avatar
Extreme Talker

Posts: 224
Quote:
Originally Posted by Mosqwik View Post
Hi,
Something that would be really useful for a new project im working on would be to have automated browser titles using some php code in the <title> tags.
The only way I can think of doing this is by having the php code read the url im using for navigation, e.g. /windows/atari2600/ and use that data, edit it and have it display as 'Windows > Atari 2600'
Has this kind of thing been done before? are there any other common ways of doing this? Also are there any tutorials around?
Thanks!


Sure it is possible.

It honestly depends on the URL that you are trying to interpret.

In the case you gave above, you can pull those two words out and then create the custom title.

As far as the php code that you need to do this:

$_SERVER['REQUEST_URI'] - will pull the current URL

explode("/", $url) - this would put the different parts of the URL (windows, atari2600) into an array

Of course, there are going to be more than 1 way to accomplish this same thing, but do a quick google search for finding url with php and you can see some examples of what other people have done.
dadofgage is offline
Reply With Quote
View Public Profile Visit dadofgage's homepage!
 
Reply     « Reply to Is this possible? (automated browser title)
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Webmaster Resources Marketplace:
Software Development Company | Webhosting.UK.com | Text Link Brokers 


   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11241 seconds with 12 queries