Añadir 't.php'
This commit is contained in:
parent
7672e400b2
commit
acc60a953e
|
@ -0,0 +1,33 @@
|
|||
<?php if(isset($_GET["url"])){
|
||||
$pus = parse_url($_GET["url"], PHP_URL_SCHEME);
|
||||
if(strtolower($pus)=="tilde"){
|
||||
$tld_list = json_decode(shell_exec("curl https://tildegit.org/tetld/tetld/raw/branch/main/tld.json"));
|
||||
$expurl = explode(".", parse_url($_GET["url"], PHP_URL_HOST));
|
||||
$urlc=count($expurl)-1;
|
||||
$tld = $expurl[$urlc];
|
||||
if(isset($tld_list->{$tld})){
|
||||
$extra = parse_url($_GET["url"], PHP_URL_PATH)."?".parse_url($_GET["url"], PHP_URL_QUERY);
|
||||
$test2 = json_decode(shell_exec("curl ".$tld_list->{$tld}));
|
||||
if(isset($test2->{"2nd"}->{$expurl[$urlc-1]})){
|
||||
$sub = $expurl[$urlc-1];
|
||||
$dname = $expurl[$urlc-2];
|
||||
$codn = $dname . "_" . $sub;
|
||||
//$dname = str_replace(".".$tld, "", parse_url($_GET["url"], PHP_URL_HOST));
|
||||
}else{
|
||||
$dname = $expurl[$urlc-1]; $codn = $expurl[$urlc-1];
|
||||
}
|
||||
$nic = str_replace("<name>",$codn,$test2->{"nic"});
|
||||
$test3 = json_decode(shell_exec("curl ".$nic));
|
||||
//echo shell_exec("curl ".$nic);
|
||||
if($test3->{"code"}==true){
|
||||
shell_exec("curl ".$test3->{"url"}.$extra." > test.txt");
|
||||
header("Content-Type: ".mime_content_type("test.txt"));
|
||||
echo readfile("test.txt");
|
||||
unlink("test.txt");
|
||||
}else{
|
||||
echo "ERROR!!! Website not found";
|
||||
}
|
||||
// echo $nic."<br>".$tld."<br>".$dname."<br>".$extra;
|
||||
}else{echo "ERROR!!! Website not found";}
|
||||
}else{echo "ERROR!!! Website not found";}
|
||||
} ?>
|
Loading…
Reference in New Issue