コード例 #1
0
ファイル: Http.php プロジェクト: salt-lick/magescan
 /**
  * Check for unreachable paths
  *
  * @return void
  */
 public function checkUnreachablepathsingle()
 {
     $unreachablePath = new UnreachablePath();
     $result = $unreachablePath->checkPath($this->url, $_GET['path']);
     if ($result[2] === true) {
         return;
     }
     if ($result[2] === false) {
         $result[0] = '<a target="_blank" href="' . $this->url . $result[0] . '">' . $result[0] . '</a>';
         $result[2] = '<span class="fail">Reachable</span>';
     } elseif (substr($result[1], 0, 1) == 3) {
         if (substr($result[2], 0, 4) == 'http') {
             $newUrl = $result[2];
         } else {
             $newUrl = $this->url . substr($result[2], 1);
         }
         $result[0] = '<a target="_blank" href="' . $newUrl . '">' . $result[0] . '</a>';
         $result[2] = '<a target="_blank" href="' . $newUrl . '">Redirect</a>';
     }
     $this->respond($result);
 }