getscraperfilters("images");
$get = $frontend->parsegetfilters($_GET, $filters);
$frontend->loadheader(
$get,
$filters,
"images"
);
$payload = [
"images" => "",
"nextpage" => ""
];
try{
$results = $scraper->image($get);
}catch(Exception $error){
echo
$frontend->drawerror(
"Shit",
'This scraper returned an error:' .
'
' . htmlspecialchars($error->getMessage()) . '
' .
'Things you can try:' .
'' .
'- Use a different scraper
' .
'- Remove keywords that could cause errors
' .
'- Use another 4get instance
' .
'
' .
'If the error persists, please contact the administrator.'
);
die();
}
if(count($results["image"]) === 0){
$payload["images"] =
'' .
"
Nobody here but us chickens!
" .
'Have you tried:' .
'
' .
'- Using a different scraper
' .
'- Using fewer keywords
' .
'- Defining broader filters (Is NSFW turned off?)
' .
'
' .
'
';
}
foreach($results["image"] as $image){
$payload["images"] .=
'';
}
if($results["npt"] !== null){
$payload["nextpage"] =
'Next page >';
}
echo $frontend->load("images.html", $payload);