0

how to recover a a url along with the message which it sends form a client system in the proxy server.there is any command to recover the url and take the message out of the url in the proxy server before forwarding the url to Internet.

For Example:

http://companion_proxy/ocl.cgi?req=cnc_cmd;target=12;action=setchannel;channel=34

this is the url is typed in address bar,then how to recover the above url and the message such as

target=12,action=setchannel,channel=34,req=cnc_cmd from the url.

I have to extract the information from url in proxy server before the proxy server is forwarding the url to internet. Thanks in advance.

3 Answers 3

1

The $_SERVER variable holds the information you need:

http://php.net/manual/en/reserved.variables.server.php

Specifically:

$_SERVER['SERVER_NAME']

and

$_SERVER['REQUEST_URI']

and

$_SERVER['QUERY_STRING']
Sign up to request clarification or add additional context in comments.

Comments

1
$uri = $_SERVER["REQUEST_URI"];
echo str_replace("/ocl.cgi?req=cnc_cmd;", "", $uri);

Comments

0

Go for Below code you can debug and find what you want...

echo "<pre>";
print_r($_SERVER);
echo "</pre>";

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.