Description d'une Page
The following script fetch the description, title and keywords from an url even if there are no meta tags. It also take care of the charset.
This kind of script can easily be implemented and adapted inside a search engine robot.
Faites un copier coller du code ci-dessous et lancez le dans votre navigateur. Si vous souhaitez voir le résultat en démo (selon nous une bonne méthode d'apprentissage) cliquez ici (nouvelle fenêtre).
The source code:
As we take care of multilingual possibilities, here is short list of different charset:
- charset=big5 - Chinese Traditional (Big5)
- charset=iso-8859-1 - Western Alphabet
- charset=iso-8859-6 - Arabic Alphabet (ISO)
- charset=utf-8 - Universal Alphabet (UTF-8)
- charset=windows-1252 - Western Alphabet (Windows)
- charset=gb2312 - Chinese Simplified (GB2312)
- charset=iso-8859-15 - Latin 9 (ISO)
A more important list is available at International/O-charset-list.html
For details about the different Php functions implemented here, there are interesting pages:
- Sitemap Generator (another Curl example)
- preg_match examples
- php.net/iconv (iconv function)
Commentaires
Poster un commentaire
ou venez en discuter sur:
Forum - Php
|
Coin du Webmaster
Vous disposez d'un site à forte audience?
Obtenez votre Kit Graphique pour vos sites!
Engagez des Freelance Pro.
|
Categories
|