mirror of
https://github.com/GeoffreyFrogeye/phroxyp.git
synced 2024-11-20 19:26:03 +01:00
Proxy now callable as an object
Well, "object"...
This commit is contained in:
parent
b287949ead
commit
bc30ea6f88
12
proxy.php
12
proxy.php
|
@ -1,12 +1,7 @@
|
|||
<?php
|
||||
|
||||
// PROXY
|
||||
// Config
|
||||
$serv = 'google.com'; // TODO External file
|
||||
$port = 80;
|
||||
$root = '';
|
||||
$localRoot = '';
|
||||
|
||||
class Proxy {
|
||||
public function __construct($serv, $port = 80, $root = '/', $localRoot = '') {
|
||||
// Functions
|
||||
function str_replace_once($search, $replace, $subject) { // TODO Credit
|
||||
$pos = strpos($subject, $search);
|
||||
|
@ -97,4 +92,7 @@ if (!$fp) { // TODO ErrorCode, ErrorDocument
|
|||
}
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue