Hello!
Calling a local URL.
It works (when external http server is enabled):
function set_proxy($action) {
$host = '127.0.0.1';
$port = "55777";
$scriptDir = dirname($_SERVER['SCRIPT_NAME']);
$path = ($scriptDir === '/' || $scriptDir === '\\') ? '' : $scriptDir;
$url = 'http://' . $host . ':' . $port . $path . '/set_proxy.php?proxy=' . $action;
...
I disable the external http server and try to do it.
It doesn't work:
$url = "http://heserver/set_proxy.php?proxy=$action";
$url = "https://heserver/set_proxy.php?proxy=$action";
$url = "/set_proxy.php?proxy=$action";
$url = "http://heserver/set_proxy.php?proxy=" . urlencode($action);
$url = "https://heserver/set_proxy.php?proxy=" . urlencode($action);
How can I make the function work without an external http server on port 55777?
Calling a local URL.
It works (when external http server is enabled):
function set_proxy($action) {
$host = '127.0.0.1';
$port = "55777";
$scriptDir = dirname($_SERVER['SCRIPT_NAME']);
$path = ($scriptDir === '/' || $scriptDir === '\\') ? '' : $scriptDir;
$url = 'http://' . $host . ':' . $port . $path . '/set_proxy.php?proxy=' . $action;
...
I disable the external http server and try to do it.
It doesn't work:
$url = "http://heserver/set_proxy.php?proxy=$action";
$url = "https://heserver/set_proxy.php?proxy=$action";
$url = "/set_proxy.php?proxy=$action";
$url = "http://heserver/set_proxy.php?proxy=" . urlencode($action);
$url = "https://heserver/set_proxy.php?proxy=" . urlencode($action);
How can I make the function work without an external http server on port 55777?