Jump to content

Tried searching but to no avail? Get page title and description VIA AJAX


Brandon_R

Recommended Posts

Hello wonderful users of this forum. I tried searching for this but to no avail. Can someone show me how to get the page title of a url and its meta description and return them onto the page in a textarea? I will be truly grateful. The only thing i can get right it the HTML aspect of this piece of code :(

Javascript can access web document header information through the Navigator and Document objects

 

Or you could try AJAX based header response functions:

http://www.w3schools.com/dom/dom_http.asp

 

Whether or not these will let you access the 'title' and 'meta-description' tags I don't know.

 

If not you may need to save a temporary copy of the web page as a text file on the server, then retrieve the information you desire through a text string analysis of the file using php or something -> using strrpos() to find the start and end tags then copy whats between them.

I tried searching for this but to no avail.

What results have you gotten what have you tried?

 

Can someone show me how to get the page title of a url and its meta description and return them onto the page in a textarea?

Will these url's be on the same domain or a different one? And what serverside languages do you have?  Is there a reason you want to use ajax?

 

I will be truly grateful. The only thing i can get right it the HTML aspect of this piece of code :(

Just HTML won't get you far do you have a basic understanding of any programming language?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.