<?php

// ---------------------------------------
// getwebsite.php
// ---------------------------------------

// simple extension for action coderz
// attention - unrestricted this is really dangerous

$arrRestrictedTo = array();
$arrRestrictedTo = array("https://www.golem.de","https://www.and-or.ch");

if (isset($_GET["url"])) {
   $url = $_GET["url"];
   // echo($url);
   $doIt = true;
   if (count($arrRestrictedTo)>0) {
      $doIt = false;
      for ($i=0;$i<count($arrRestrictedTo);$i++) {
      		$urlt = $arrRestrictedTo[$i];
      		if (stripos($url,$urlt)!==false) { 
      			if (stripos($url,$urlt)==0) { 
      		   		$doIt = true;
      			}
      		}
      }
   }
   if ($doIt) {       
	   $data = file_get_contents(''.$url);  
   } else {
   	 echo("restricted!");
   }
  echo($data);
}

?>

