Click to See Complete Forum and Search --> : info question


Phalon
09-11-2006, 04:58 PM
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.

DJsAC
09-11-2006, 06:26 PM
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.

Phalon
09-12-2006, 09:38 AM
actually if found a better method in the php manual.

$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