mirror of
https://github.com/GeoffreyFrogeye/phroxyp.git
synced 2024-11-21 19:36:04 +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
|
<?php
|
||||||
|
|
||||||
// PROXY
|
class Proxy {
|
||||||
// Config
|
public function __construct($serv, $port = 80, $root = '/', $localRoot = '') {
|
||||||
$serv = 'google.com'; // TODO External file
|
|
||||||
$port = 80;
|
|
||||||
$root = '';
|
|
||||||
$localRoot = '';
|
|
||||||
|
|
||||||
// Functions
|
// Functions
|
||||||
function str_replace_once($search, $replace, $subject) { // TODO Credit
|
function str_replace_once($search, $replace, $subject) { // TODO Credit
|
||||||
$pos = strpos($subject, $search);
|
$pos = strpos($subject, $search);
|
||||||
|
@ -97,4 +92,7 @@ if (!$fp) { // TODO ErrorCode, ErrorDocument
|
||||||
}
|
}
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in a new issue