PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Andrey Nikishaev  >  Little PHP Proxy  >  example.php  >  Download  
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
Author: By
Last change: fix
Date: 13 years ago
Size: 659 bytes
 

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($data, 9);
               
$data = substr($data, 0, $size);
                return
$st.$data;
               } else {
                   return
$data;
            }

           }

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






?>

For more information send a message to info at phpclasses dot org.