www.webdeveloper.com
Results 1 to 3 of 3

Thread: info question

  1. #1
    Join Date
    Jan 2006
    Posts
    88

    info question

    I am trying to make a utility for the internet that allows people with no knowledge about html to get information not printed on the page.

    I want to have the person enter a internet address and then from that, get information from the meta tags. such as author, content, date last modified.

    basically things needed for a internet resource in a bibliography that might not be displayed in public view.

  2. #2
    Join Date
    Sep 2003
    Location
    Netherlands
    Posts
    353
    use file_get_contents(); to read the page's source.
    use preg_match(); to match and return the <meta> data etc
    echo the matched data to the page :-)

    Carefull though, this type of applications can be sensitive to [h|cr]ackers and scriptkiddies.

  3. #3
    Join Date
    Jan 2006
    Posts
    88
    actually if found a better method in the php manual.
    PHP Code:
    $place="http://www.someplace.com/"
    $tags=get_meta_tags($place);
    echo 
    "url: ".$place;
    echo 
    "<b>Author: </b><br>".$tags['author'];
    echo 
    "<br><br><b>Description: </b><br>".$tags['description'];
    echo 
    "<br><br><b>Keywords: </b><br>".$tags['keywords'];
    echo 
    "<br><br><b>Generator: </b><br>".$tags['generator'];
    echo 
    "<br><br><b>Copyright: </b><br>".$tags['copyright'];
    echo 
    "<br><br><b>Content-Language: </b><br>".$tags['content-language']; 
    and as far as I know its safe from the people you mentioned

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles