TheSpaceDude
New Member
Hello,
I am in the process of making a small proxy server. When I request a page from a remote server, I put the response in the var $data. How would I change all links in $data to this format:
http://www.mydomain.com/proxy.php?url=[LINK HERE]
and also add the host name and directory to the link if it's not already there (eg. change /index.php or filename.php to http://www.domain.com/filename.php)?
Thanks in advance,
I am in the process of making a small proxy server. When I request a page from a remote server, I put the response in the var $data. How would I change all links in $data to this format:
http://www.mydomain.com/proxy.php?url=[LINK HERE]
and also add the host name and directory to the link if it's not already there (eg. change /index.php or filename.php to http://www.domain.com/filename.php)?
Thanks in advance,