Can you set up such an agent website by yourself?

this website
http://anyorigin.com
provides proxies that can solve cross-domain problems.
now, can I do it with my own vps?

I will turn on the forward proxy of apache (reverse will also). How can I use php to match the client"s request on this vps, and the agent will forward it?
Please give me some clues.

client code

$.getJSON("http://anyorigin.com/go?url=https://www.cnblogs.com/not-alone/articles/8552251.html&callback=?", function(data){
$("-sharpoutput").html(data.contents);});
 
 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

The content i got with proxy

<p id="output">

I want to provide services on my domain name www.mydaomin.com so that the following code can run

$.getJSON("http://www.mydomain.com/go?url=https://www.cnblogs.com/not-alone/articles/8552251.html&callback=?", function(data){
$("-sharpoutput").html(data.contents);});
 
 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

The content i got with proxy

<p id="output">

May.22,2021

header('Access-Control-Allow-Origin: *');
if($_SERVER['REQUEST_METHOD'] == 'GET')
{
    echo file_get_contents($_GET['url']);
}
else
{
    //curl post
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb80d7-269f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb80d7-269f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?