fix dmca links not showing up on google

This commit is contained in:
2026-09-01 18:28:37 -04:00
parent 76c4b62d1a
commit d598a560ae
3 changed files with 144 additions and 11 deletions
+9 -4
View File
@@ -5,7 +5,8 @@ $resolver = new resolver();
class resolver{
public const resolvers = [
"sc"
"sc",
"google"
];
public function __construct(){
@@ -40,9 +41,13 @@ class resolver{
$resolver = new $scraper();
$link = $resolver->resolve($target);
if(is_string($link)){
if(
is_string($link) &&
!empty($link)
){
header("Location: {$link}");
echo 'If your ass is not getting redirected, <a href="' . htmlspecialchars($link) . '">click here</a>.';
}
}catch(Exception $error){
@@ -54,13 +59,13 @@ class resolver{
header("Content-Type: text/plain");
http_response_code(400);
echo $message;
echo htmlspecialchars($message);
}
public function do404($message){
header("Content-Type: text/plain");
http_response_code(404);
echo $message;
echo htmlspecialchars($message);
}
}