Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Andrey Nikishaev  >  Little PHP Proxy  >  example.php  
File: example.php
Role: Example script
Content type: text/plain
Description: example
Class: Little PHP Proxy
Show remote pages as if they from the current site
 

Contents

Class file image Download
<?php
session_start
();
include(
'proxy_class.php');
//or include('proxy_class_for_php4.php');

        
function compress($data) {
           if(isset(
$_SERVER['HTTP_ACCEPT_ENCODING']) && strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')!==false ){
                  
header("Content-Encoding: gzip");
                
$st="x1fx8bx08x00x00x00x00x00";
                
$size strlen($data);
                
$data gzcompress($data9);
                
$data substr($data0$size);
                return 
$st.$data;
               } else {
                   return 
$data;
            }

           }

        
$P=new little_php_proxy();
        
$P->query($_REQUEST['u'],$_POST,$_GET,$_FILES,$_POST['c']);
        
$P->getPage();






?>