I like it 🙂 Nice and simple, and has a useful function.
I can imagine a lot of SEO people will find it very handy 🙂
Aleister: Do you have any suggestions on what I could implement, change, or add?
in your Example on your page, the title=”an awesome title”
But your description says “gather the data for the attribute from the remote page (the page you linked to)”
What is an example of the plugin gathering data from the linked page? What data from the linked page would it put in my link titles? Would it be the meta-description, or the Title, or what? Thank you!
It will put whatever is inbetween the <title> tags. For example, if you are linking to a page that has <title>FooBarYou</title> it would put “FooBarYou” as the title in the attribute.
Hm.. lets see..
First off, instead of loading the whole page with file_get_contents, you could just grab lines until you find the title.. something like this:
$handle = fopen("http://www.domain.com/page.htm", "r");
do {
$line = fgets($handle, 4096);
} while (the title tag is not found)
take the title from $line
fclose($handle);
It is a nice idea in theory.. but I do not know if it would work as well.
Also, since it will be easy to see if a link is valid or not, you could code it so that if a bad link is found, it either replaces the whole link with “(Link no longer valid)”, or appends it to the visible text for the link.
I am not sure about that one though.. it might not be that useful 😛
It is hard to think of ideas for a script that already does it’s job nicely 🙂
I’ve released a new version.
You can check it out at http://preow.com/plugins/title-grabber/ I fixed a couple bugs, it works in PHP 4 now too.
Please comment on the post.