Link to home
Create AccountLog in
Avatar of jsound
jsound

asked on

Extract Meta Tags from Own Web Site

I need to extract the meta tags (keywords and description) from a dynamic site we built for a client. I am using templates (Smarty), so it's not as easy as just going through the list of template files and extract the tags.

What's the best software I can use to extract those meta tags in a proper URL context?

Thanks,

JB
Avatar of b0lsc0tt
b0lsc0tt
Flag of United States of America image

jsound,

Are you trying to do this with a page or script on the same server or from a different server/domain?  What server languages (e.g. PHP, ASP, etc) can you use?

I am not familiar with Smarty templates and don't usually use any template so let me know if this would make a difference but I assume the info you want is just in the html's head section in html tags.  The templates I assume just mean there isn't one file on the web server with the info but that may not matter if you aren't doing this from the same web server.

Let me know if you have any questions or need more information.

b0lsc0tt
Avatar of jsound
jsound

ASKER

We use PHP and Smarty templates,which are may be sections of a page that are put together dynamically. That's why we can't just go through the templates themselves to get the keywords and descriptions associated with the real URLs. We have a single PHP file that acts as the page controller (index.php), which in turn receives parameters to build the page content dynamically.

And yes, this would be on the same server.

I think it is essentially a web crawler that goes through the web site and extracts the meta tags out of the header. But it would need to happen in a way where the full URL is referenced along with the keywords and descriptions found on that page.

Thanks for that info.  What do you hope to do this in?  In other words what type of program, server language or script?  HTML won't do this.  Javascript or a browser script wouldn't be the best option either.

Where do the URLs come from?

bol
Avatar of jsound

ASKER

I have to deliver a file to our client in the form of a CSV that lists all the URLs on the site we developed for them. In that file I need to list the full URL and the associated keywords and description coming from the individual pages. This is a preliminary step for SEO done on the site.

The URLs would be coming from that site itself, so again, a web crawler of sorts would go through the site and grab the fully qualified URLs and the keywords and descriptions and then write it to a file.

That would be the ideal solution.

Hope this all makes sense.
ASKER CERTIFIED SOLUTION
Avatar of b0lsc0tt
b0lsc0tt
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of jsound

ASKER

I'll have to go with something like PowerGrep.

I appreciate your suggestion.

JB
Your welcome!  I'm glad I could help.  Thanks for the grade, the points and the fun question.

bol