There are many types of SEO tools that are utilized. Depending on the objectives, you may use a particular tool to look up a keyword or maybe to expand on the keywords. Or maybe you’re looking to see what your competitors Social Media presences looks like. No matter what you’re using some sort of tool to look up something or as part of a distilled process.
The purpose of this post is about creating a simple headless SEO tool that I’ve been working on that pulls information quickly about a web page. This is an agile tool, its not built out to be a robust tool, its specific to what I need to look up.
Before we talk about specifics of the tools, we need to define what the objectives are. Are we just looking up a keyword to see how many competing websites, or are we trying to conduct a site audit? There is no one tool that does it all, unless its custom made for your multi-purpose. For the focus of this article, we will look at an agile tool with a main function of looking up a specific thing, such as the meta data of a web page. Meta data is the information in the backend of a web page, usually located withing the header tag, ie <head>….</head>
This specific tool is initiated from the command line interface. In this article, I’m going to assume:
- That you’re on a Window 7 Operating System (other OS’s are fine, I’m on Window 7)
- Have PHP 5 + installed on your system.
- You know how to bring up the CLI (command line interface, cmd)
- You know PHP programming (beginner to intermediate level, ability to read & write the code)
Benefits of This Agile Tool
- Quick look Up
- Headless Web – means you don’t have to open your web browser.
- You can code your script to do almost anything from simple meta lookups to DOM manipulation.
- Can be coded in most web programming languages, for this illustrative post the script highlighted is written in PHP.
Start by creating a file with a .php at the end. Below is the code, I won’t go into the explanation of what it does, but mainly to get information from the meta tags of a web page.
// get meta tags
// store page
// find where the title CONTENT begins
// find how long the title is
// extract title from $page
// return array of data
echo ‘Title: ‘.$tags['title'];
echo ‘Description: ‘.$tags['description'];
echo ‘Keywords: ‘.$tags['keywords'];
Next open up your terminal and navigate to where you have this file located. In the file be sure to identify the domain that you’re looking up. From the terminal you type in php nameofyourscript.php and press enter. After a few seconds you would see the meta tags information of the domain. View the video below to get an idea.
So Whats the Big Fuss?
Well as I said earlier, this is a quick way to look up a domain info for SEO without opening up your web browser. Now you can build this out to look up:
- Other meta info
- multiple url’s lookup
- check page load speed
- scrape SERP listing of Google and Bing
- get locations of nearest pizza joint
- get twitter followers count
- scrape SocialMention results
- collect the links onpage and store to a database for further processing
As you can see what you do with the script is endless. Another note there are many different ways to write the previous script. I am not the most eloquent coder, just a newbie coder to manipulate things. Please feel free to comment and share with us on what you’ve created to help with your SEO process.