favicon on toplist

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    favicon on toplist

    on my toplist i want to show registered sites favicons to appear next to their sites title/description how do i implement this feature im using old worldlist script.

    #2
    Give this a try, just wrap matched in img tag.

    PHP Code:
    $site file_get_contents('http://somesite.tld');
    if (
    preg_match('/\<link[^\>]+rel="(?:shortcut )?icon"[^\>]+?href="([^"]+?)"/i'$site$matched)) {
        echo 
    $matched[0];
    } else {
        echo 
    'No favicons there';

    You can refer to this for fine tuning if needed. ;)

    http://coding-talk.com/f46/tag-conte...g_match-17152/
    <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

    Comment


      #3
      Originally posted by arnage View Post
      Give this a try, just wrap matched in img tag.

      PHP Code:
      $site file_get_contents('http://somesite.tld');
      if (
      preg_match('/\<link[^\>]+rel="(?:shortcut )?icon"[^\>]+?href="([^"]+?)"/i'$site$matched)) {
          echo 
      $matched[0];
      } else {
          echo 
      'No favicons there';

      You can refer to this for fine tuning if needed. ;)

      http://coding-talk.com/f46/tag-conte...g_match-17152/
      do i insert that on index page?

      Comment


        #4
        Where you want, just apply it to your needs.
        <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

        Comment


          #5
          Originally posted by arnage View Post
          Where you want, just apply it to your needs.
          cheers mate il try it out

          Comment

          Working...
          X