How to retrieve the title of a page ?


Back to php.


*7c224f    (2009-04-23)
How to retrieve the title of a page ?

Hello,

Does a PHP function like get_meta_tags() exist to retrieve the title of a page ?

It is quite easy to imitate with this small script but it would be useful anyway....

<?

$url_query = file_get_contents('http://www.google.com');
$url_query = htmlspecialchars($url_query);

$beg_title = stripos($url_query,'&lt;title&gt;')+13;
$end_title = stripos($url_query,'&lt;/title&gt;');

$url_title = substr($url_query,$beg_title,$end_title - $beg_title);
$url_title = htmlspecialchars_decode($url_title);

?>


PHP is a great and easy language anyway !


See also


ficgs
More websites

You must register to see these links, as this is a collaborative page, then you may change the order of the links by clicking the icons before the titles.



admin
Other websites

The following links might be less relevant, please change their ranks if you find them useful.


 Code of Federal Regulations: Retrieve by CFR Citation
gpoaccess > cfr/retrieve

 Automatically Retrieve <title> of Referring Page - CodingForums.com
codingforums > s

 Retrieving page elements via the DOM
elated > articles/javascript retrieving page elements via the dom

returns an object representing the element (in this case an...
is all very well if the element you're after has an ID (or you can...

 Retrieve Data From Mysql Page By Page : Get the title of a page, How to Get Page-by-page XML Data, Passing Variables from Page to Page, JavaScript Pri...
vclcomponents > s/0 /retrieve data from mysql page by page

Functions to Open a Database Connection and Record Set...
Using a page by page password system using mySQL...

 How to retrieve Document Title in plug-n - GroupBrowser
adobe.groupbrowser > t84434

 Retrieve Technologies vBooks "title" and "message" Cross-Site Scripting - Secunia Advisories - Vulnerability Information - Secunia...
secunia > advisories/34207

Google Chrome Flash Player Unspecified Code Execution...
Adobe Reader / Acrobat Unspecified Code Execution...

 Retrieving Images from SqlServer in ASP .NET: ASP Alliance
aspalliance > 140 Retrieving Images from SqlServer in ASP NET

Hey itz urgent plz send me the code for entering the value in text...
I am only seeing a number where the image should be? Am I storing it...

 How to retrieve data from a dynamically generated radio button - ASP.NET
daniweb > forums/thread68863

No one has posted to this discussion for at least three...
Need suggestions for a video recorder/player for...

 AbstractHtmlUnitTestCase (Shale Test Framework 1.0.4 API)
shale.apache > 1.0.4/shale test/apidocs/org/apache/shale/test/htmlunit/AbstractH

 Retrieving Query String Values in ASP.NET and Javascript « Read, With the Name of Your Lord Who Created
triaslama.wordpress > 2008/04/12/retrieving query string values in aspnet and ja

Javascript can be used for retrieves query string values...

 Retrieve title from URL in Ruby on Rails : ruby, url, rails, retrieve
experts exchange > Programming/Languages/Scripting/Ruby/Q 22830620

Subscribe now for full access to Experts Exchange and...
All Experts Exchange premium technology solutions are available to...

 how to retrieve value from database to drop down list? - ASP.NET Forums
forums.asp > t/1279075.aspx

how to retrieve value from database to drop down...

 Embed HTML in XML & Retrieve it with XSL | evolt.org
evolt > node/27855

How about PHP? Which conversion functions can we use to put...
Would this work if there were comment tags in the HTML?...

 University Libraries - Database Finder - How to Use This Page
library.albany > databases

This page was last updated August 26, 2010 at 9:31 AM by Pardavila...
Attempts to download an entire database are prohibited by the...
Resources containing citations to newspaper articles or the...

 Facebook Platform Developer Forum / <fb:comments> how to retrieve parameters?
forum.developers.facebook > viewtopic.php?pid=140941

 retrieve email subject from page title
facileforms > forum/index.php?topic=3285.msg12487

 AMS Journals :: Print and Electronic
ams > jourhtml/abstracthelp

 Page 3 - Advanced JavaScript with Internet Explorer: Retrieving Networking Configuration Information
devarticles > c/a/JavaScript/Advanced JavaScript with Internet Explorer Retrievi

Comments On: Advanced JavaScript with Internet Explorer: Retrieving...
Next: How to retrieve the Win Proxy information for your computer...
Advanced JavaScript with Internet Explorer: Retrieving Networking...

 Main Articles: 'An Introduction to the Search/Retrieve URL Service (SRU)', Ariadne Issue 40
ariadne.ac > issue40/morgan

copyright Ariadne (University of Bath) and original...

 Special Page
imdb > swiki/special?SynopsisHelp

Text can be decorated with square brackets to format it in the...
Someone is continuously vandalizing a Synopsis page, what should I...
What will prevent people from adding bad information?...

 How Do I Retrieve A Title For A 1979 Honda CB 750 K? - Blurtit
blurtit > q245392

$(function() { var position = $('div#header #metaNav...

 Read the web page and retrieve the URL links in it. - VB.NET - Source Code | DreamInCode.net
dreamincode > code/snippet1249.htm

I have written the code for search the web pages with the key words...
Develop For Windows - A Stage As Big As Your Ideas! - New Devices,...

 DevExpertise » Blog Archive » Retrieving SharePoint List Data from Silverlight Without a Custom WCF or ASP.NET Web Service
devexpertise > 2009/02/07/retrieving sharepoint list data from silverlight witho

SQL Tip/Trick: Retrieving Records as a Comma-Delimited Value Using...
SharePoint Tip/Trick: Specifying a Relative Portal Site Connection...
Retrieving SharePoint List Data from Silverlight Without a Custom WCF...

 SULAIR: East Asia Library: CJK Help Page
www sul.stanford > depts/asrg/research help/CJKhelp

 Retrieve session var from .net page and use in VBScript - bytes
bytes > groups/net asp/432170 retrieve session var net page use vbscript

 Search: retrieve | LongTail Video | Home of the JW Player
longtailvideo > jw/?search=retrieve

 How can I retrieve the web page title using VB? - VBForums
vbforums > s

Hi, Does anybody know how I can retrieve the title of...
The only way I can think of is to parse the source for text...
I would use the Inet control to connect to the server and...

 PHP :: Retrieve <TITLE> In Php Code ?
bigresource > PHP Retrieve lt TITLE gt in php code llgyHKTW

 Code Examples -> Tag content retrieval from websites with preg_match
weberdev > get example 4625

 Print Page - how to programatically parse .ivl file to retrieve its latitude/longitude bound
forums.ilog > visualization/index.php?action=printpage;topic=894.0

 Kevin yank's php mysql book how to retrieve mysql data with ajax on the same page - SitePoint Forums
sitepoint > forums/s



Response  
 

Guest name   (option)     Register
Please sum : 5896 + eight  




Trackbacks : If you talked about this article in your blog or website, you may instantly get a backlink 
There's no trackback at the moment.