Pan resolve differences with a simple php

<?php

  header('content-type:text/html; charset=utf-8');

  $host = '58.com';

  $hosts = gethostbyname('fuckfuck.'.$host)

  if ($hosts != 'fuckfuck.'.$host){

    fan($host,$hosts);

}else{

    fan1($host,$hosts);

}

 

function fan ($host,$hosts){

    . Echo $ host 'existence Pan resolve' '<br>'.;

    $ports = array('80','81','82');

    $domains = file('domain.txt');

    foreach($domains as $d=>$domain){

        $domain = rtrim($domain){

        $domain = $domain.'.'.$host;

        $dom = (gethostbyname($domain)!= $domain)? gethostbyname($domain):'';

    if ($hosts != $dom){
       foreach($ports as $port){
          echo $domain.':'.$dom.':'.$port.'<p>';
              }
        }
}
}

function fan1($host,$hosts){
    $domains = array('www','ww','www1');
    $ports = array('80','81','82');
    foreach($domains as $domain){
        $domain = $domain.'.'.$host;
        $domain = (gethostbyname($domain)!= $domain)? $domain.':'.gethostbyname($domain).'':'';

              foreach($ports as $port){
                  echo $domain.':'.$port.'<p>';
        }

}
}

 

?>

Guess you like

Origin www.cnblogs.com/lighting--/p/11354473.html