<?php

/**
 *
 * INDEXU
 * Copyright(C), Nicecoder, 2000-2006, All Rights Reserved.
 *
 * INDEXU(tm) is protected by Indonesia and International copyright laws.
 * Unauthorized use or distribution of INDEXU(tm) is strictly prohibited,
 * violators will be prosecuted. To obtain a license for using INDEXU(tm),
 * please register at Nicecoder home page at http://www.nicecoder.com
 *
 * Author:
 *    Dody Rachmat Wicaksono (dody@nicecoder.com)
 *    M. Zuber (zubby@nicecoder.com)
 *
 */

  /*===================================================
    main
  ===================================================*/

  include "../application.php";
  include "../key.php";
  ini_set("max_execution_time", "0");
  
  RemoveFilter("gzip_compression");
  RemoveFilter("runtime");
  RemoveFilter("start_session");
  RemoveFilter("validate_admin");
  RunPreFilter(__FILE__);

  $url = urldecode($_GET['url']);
  $header_only = urldecode($_GET['header_only']);
  $hash = '';
  if ($hash == '') {
    $result = HttpRequest($url, $header_only);
    if ($result['status'] == 'ok') {
      if ($header_only) {
        echo $result['header'];
      }
      else {
        echo $result['html'];
      }
    }
  }

  RunPostFilter(__FILE__);

?>