Hi,
I am using a sort of page retrievel script based on the code from the "add spider" from links-2
If the page contains the normal Meta-Tag such as:
<META name="description" content="here are some words">
then everything is OK and it works to retrieve the Tag.
But I run into pages that have turned the Tag around as follows:
<META content="here are some words" name=description>
and for the above nothing is retrieved because the Tag is turned around
This is the snippet of code I use from add_Spider to retrieve the Tag:
if ($t =~ m!.*?<META([^\>]*?)(NAME|HTTP-EQUIV)="description"([^\>]*?)(CONTENT|VALUE)="([^\"]+)"!i){$Description = ' '.$5;}
I really dont have a Clue how to change the code so that it also retrieves the second, or turned around model of Meta-tag.
Thanks and Regards,
sanuk
I am using a sort of page retrievel script based on the code from the "add spider" from links-2
If the page contains the normal Meta-Tag such as:
<META name="description" content="here are some words">
then everything is OK and it works to retrieve the Tag.
But I run into pages that have turned the Tag around as follows:
<META content="here are some words" name=description>
and for the above nothing is retrieved because the Tag is turned around
This is the snippet of code I use from add_Spider to retrieve the Tag:
if ($t =~ m!.*?<META([^\>]*?)(NAME|HTTP-EQUIV)="description"([^\>]*?)(CONTENT|VALUE)="([^\"]+)"!i){$Description = ' '.$5;}
I really dont have a Clue how to change the code so that it also retrieves the second, or turned around model of Meta-tag.
Thanks and Regards,
sanuk