Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- set_time_limit(0);
- $domain = $_GET['domain'];
- function curl($url, $post=null) {
- $ch = curl_init($url);
- curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.3; rv:50.0) Gecko/20100101 Firefox/50.0");
- if($post != null) {
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
- }
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- $exec = curl_exec($ch);
- curl_close($ch);
- return $exec;
- }
- if(!empty($domain)) {
- $find = curl("https://findsubdomains.com/subdomains-map/".$domain);
- if(preg_match("/Page not found/i", $find)) exit("Domain tidak ditemukan!");
- else{
- preg_match("/var data = ([^']+);/i", $find, $data);
- $data = explode("\n// create a name: node map", $data[1])[0];
- $data = str_replace(array(" ",";"), "", $data);
- $data = str_replace(",]", "]", $data);
- $json = json_decode($data);
- foreach($json as $subdo) {
- if($subdo->name !== "") echo $subdo->name."<br>";
- }
- }
- }else exit("Parameter domain masih kosong!");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement