| Server IP : 208.122.213.31 / Your IP : 216.73.216.45 Web Server : Apache System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64 User : WHMCS_MIA_382 ( 1001) PHP Version : 7.4.33 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/httpd/html/www.superporner.com/porn/admin/ |
Upload File : |
<?
ignore_user_abort();
ini_set('max_execution_time',86400);
ini_set('user_agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9');
include('scrape_class.php');
function getAttribute($attrib, $tag){
$re = '/'.$attrib.'=["\']?([^"\' ]*)["\' ]/is';
preg_match($re, $tag, $match);
if($match){
return urldecode($match[1]);
}else {
return false;
}
}
function parseUrl($url) {
$r = "^(?:(?P<scheme>\w+)://)?";
$r .= "(?:(?P<login>\w+):(?P<pass>\w+)@)?";
$r .= "(?P<host>(?:(?P<subdomain>[-\w\.]+)\.)?" . "(?P<domain>[-\w]+\.(?P<extension>\w+)))";
$r .= "(?::(?P<port>\d+))?";
$r .= "(?P<path>[-\w/]*/(?P<file>\w+(?:\.\w+)?)?)?";
$r .= "(?:\?(?P<arg>[\w=&]+))?";
$r .= "(?:#(?P<anchor>\w+))?";
$r = "!$r!"; // Delimiters
preg_match ( $r, $url, $out );
return $out;
}
function scrapeGallery($url) {
$parsed = parseUrl($url);
$newurl = "http://".$parsed[host].str_replace($parsed[file],'',$parsed[path]);
$html = file_get_html($url);
$ret = $html->find('a');
foreach($ret as $k=>$v) {
if(eregi('.jpg',$v->href)) {
if(!eregi('http',$v->href)) {
if(substr($v->href,0,1) == '/') {
$video[] = 'http://'.$parsed[host].$v->href;
}
else {
$video[] = $newurl.$v->href;
}
}
else {
$video[] = $v->href;
}
}
}
return $video;
}
require "header.php";
if($_POST[dump]) {
$dumparr = explode("\n",$_POST[dump]);
foreach($dumparr as $i) {
if($i != '') {
$i = trim($i);
//$uniq = rawurlencode($i);
$uniq = uniqid();
$path = '../ftp_photos/'.$uniq;
unset($files);
mkdir($path);
chmod($path,0777);
$files = scrapeGallery($i);
$counter = 1;
foreach($files as $k) {
//$exec = "/usr/bin/wget \"$k\" -O \"$path/$counter.jpg\"";
//echo shell_exec($exec);
//$executed .= $exec."<br>";
//echo $k.'<br>';
$string = file_get_contents($k);
file_put_contents($path.'/'.$counter.'.jpg',$string);
chmod($path.'/'.$counter.'.jpg',0777);
$counter++;
unset($string);
}
}
}
$message = true;
}
?>
<div id="right_column">
<div id="right_top">
<div id="right_home"></div>
<div id="right_right">
<a href="index.php">Admin Home</a>
<span><a href="gallery_scraper.php">FHG Scraper</a></span>
</div>
</div>
<div id="right_bg">
<h2>FHG<strong>Scraper</strong></h2>
<p><strong>Import Format</strong>: Gallery Url, one per line.<br />
This is a very simple image gallery scraper. It will take most hosted galleries, suck in the full sized images, and put them in the ftp_photos directory. FTP Photo Import must still be run after this, this is merely to collect data, not to import directly. This will not work on absolutely all galleries, but should work on most.</p>
<p>If this does not work, it is likeliest that the galleries you are trying to scrape have some sort of hotlinking protection.</p>
<div id="index_left" style='width: 100%;'>
<? if($message) { ?><center><b style='color: #FF0000;'>Done<br /></b></center><? } ?>
<form id="form2" name="form2" method="POST" action="">
<p align='center'></p>
<table width="750" border="0" align="center" cellpadding="3" cellspacing="0" class='pagetable'>
<tr>
<td width="92" height="25" valign="top" class="style4">Dump</td>
<td width="456" height="25" align="left" class="style4"><textarea name="dump" style='width: 98%;' rows="10" id="dump" wrap='off'></textarea></td>
</tr>
<tr>
<td height="25" colspan="2" align="center" class="style4"><input type="submit" name="Submit2" id="Submit2" value="Submit" /></td>
</tr>
</table>
<br />
</form>
</div>
</div>
<div id="right_bottom"></div>
</div>
</div>
</div>
<? require "footer.php"; ?>