Details
PHP Web Proxy
A simple PHP web proxy.
Usage
Install
composer require "isaeken/proxier"
Proxy an URL
<?php
require_once __DIR__ . '/vendor/autoload.php';
use IsaEken\Proxier\Proxier;
$proxier = new Proxier();
$proxier->setUrl('http://isaeken.com.tr');
$proxier->run();
Proxy an URL with custom html header
$proxier = new Proxier();
$proxier->setUrl('http://isaeken.com.tr');
$proxier->setHeader(<<<HTML
<!--
Your html code is here.
-->
HTML
);
$proxier->run();
Proxy with custom logger
Create a logger class
<?php
class Logger implements \IsaEken\Proxier\LoggerInterface
{
public function log(string $url): void
{
echo $url;
}
}
Create your proxy
$proxier = new Proxier();
$proxier->setUrl('http://isaeken.com.tr');
$proxier->setLogger(new Logger());
$proxier->run();
Notice
Do not use this package with a framework.
License
The MIT License (MIT). Please see License File for more information.
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.
|
Files |
|
File |
Role |
Description |
proxier |
Appl. |
Application script |
File |
Role |
Description |
index.php |
Example |
Example script |
File |
Role |
Description |
script.js |
Data |
Auxiliary data |
|
Files |
|
File |
Role |
Description |
proxier |
Appl. |
Application script |
File |
Role |
Description |
index.php |
Example |
Example script |
File |
Role |
Description |
script.js |
Data |
Auxiliary data |