Image Mining Webbot:
john@john-asus:~/Webbot$ cat Download_Images_From_Site.php
# This is an attempt to download all the images from www.johnbebo.com (the background)
include("LIB_parse.php"); // include parse library to split off gifs
include("LIB_http.php"); // include curl library---good test to see if installed
// Get the Webpage
$web_page = http_get($target="http://www.johnbebo.com", $referer="");
// Parse the Image Tags
$meta_tag_array = parse_array($web_page['FILE'], "");
// Echo the image source attribute from each image tag
for($xx=0; $xx
{
$name = get_attribute($meta_tag_array[$xx], $attribute="src");
#echo $target ."/"; echo $name ."\n";
# DO SOMETHING HERE TO OUTPUT IMAGE
echo $target ."/"; echo $name ." is stored\n";
}
?>
Snarf a Webpage WebBot:
john@john-asus:~/Webbot$ cat Get_Page_johnbebo.php
# Define the file you want to download
# Can just greatergreater this to a file to store locally
$target = "http://www.johnbebo.com";
$file_handle = fopen($target, "r");
# fetch the file
while (!feof($file_handle))
echo fgets($file_handle, 4096);
fclose($file_handle);
?>
Show Images on Website WebBot:
john@john-asus:~/Webbot$ cat Show_Images_on_Site.php
# This is an attempt to download all the gifs on www.johnbebo.com (the background)
include("LIB_parse.php"); // include parse library to split off gifs
include("LIB_http.php"); // include curl library---good test to see if installed
// Get the Webpage
$web_page = http_get($target="http://www.johnbebo.com", $referer="");
// Parse the Image Tags
$meta_tag_array = parse_array($web_page['FILE'], "");
// Echo the image source attribute from each image tag
for($xx=0; $xx
{
$name = get_attribute($meta_tag_array[$xx], $attribute="src");
echo $name ."\n";
}
?>
john@john-asus:~/Webbot$ cat Download_Images_From_Site.php
# This is an attempt to download all the images from www.johnbebo.com (the background)
include("LIB_parse.php"); // include parse library to split off gifs
include("LIB_http.php"); // include curl library---good test to see if installed
// Get the Webpage
$web_page = http_get($target="http://www.johnbebo.com", $referer="");
// Parse the Image Tags
$meta_tag_array = parse_array($web_page['FILE'], "");
// Echo the image source attribute from each image tag
for($xx=0; $xx
{
$name = get_attribute($meta_tag_array[$xx], $attribute="src");
#echo $target ."/"; echo $name ."\n";
# DO SOMETHING HERE TO OUTPUT IMAGE
echo $target ."/"; echo $name ." is stored\n";
}
?>
Snarf a Webpage WebBot:
john@john-asus:~/Webbot$ cat Get_Page_johnbebo.php
# Define the file you want to download
# Can just greatergreater this to a file to store locally
$target = "http://www.johnbebo.com";
$file_handle = fopen($target, "r");
# fetch the file
while (!feof($file_handle))
echo fgets($file_handle, 4096);
fclose($file_handle);
?>
Show Images on Website WebBot:
john@john-asus:~/Webbot$ cat Show_Images_on_Site.php
# This is an attempt to download all the gifs on www.johnbebo.com (the background)
include("LIB_parse.php"); // include parse library to split off gifs
include("LIB_http.php"); // include curl library---good test to see if installed
// Get the Webpage
$web_page = http_get($target="http://www.johnbebo.com", $referer="");
// Parse the Image Tags
$meta_tag_array = parse_array($web_page['FILE'], "");
// Echo the image source attribute from each image tag
for($xx=0; $xx
{
$name = get_attribute($meta_tag_array[$xx], $attribute="src");
echo $name ."\n";
}
?>
Comments
Post a Comment