Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Basically, what you are trying to do is create a proxy, in PHP ?</p> <p>Well, that will not be such an easy tak, I'm afraid : you will have to find every links in the HTML content, and rewrite them one by one... And that for those which you want rewritten <em>(probably not all, so)</em></p> <p>A few ideas :</p> <ul> <li>You could try doing this with a couple regex... That'll end up quite messy...</li> <li>Same with str_replace and the like...</li> <li>Maybe with <a href="http://php.net/manual/en/domdocument.loadhtml.php" rel="nofollow noreferrer"><code>DOMDocument::loadHTML</code></a>, some DOM and XPath manipulations... But that's probably be hell on earth too...</li> </ul> <p>So, no miracle idea in PHP, I'm afraid :-(</p> <p><br> I have not tried it myself, but if you are working with Apache and you are admin of your server, maybe Apache's <a href="http://httpd.apache.org/docs/2.2/en/mod/mod_proxy_http.html" rel="nofollow noreferrer"><code>mod_proxy_http</code></a> and <a href="http://httpd.apache.org/docs/2.2/en/mod/mod_proxy.html" rel="nofollow noreferrer"><code>mod_proxy</code></a> could help you <em>(not sure, though)</em></p> <p><br> Speaking about a PHP Proxy, maybe you could take a look at some existing software that seem to already do the kind of stuff you want.</p> <p>For instance :</p> <ul> <li><a href="http://sourceforge.net/projects/php-proxy/" rel="nofollow noreferrer">PHP Web Proxy</a></li> <li><a href="http://www.glype.com/" rel="nofollow noreferrer">Glype proxy script</a></li> <li><a href="http://freshmeat.net/projects/phpproxy/" rel="nofollow noreferrer">PHPProxy</a></li> </ul> <p><em>There might others, btw...</em></p> <p>Quoting the page of Glype :</p> <blockquote> <p>Glype proxy script is a free-to-use, web-based proxy script written in PHP. Similar to a typical proxy server, a web-proxy script downloads requested web pages and files and forwards them back to the user. The service is provided by a web page itself, which allows instant access to the proxy without editing your browser connection settings.</p> </blockquote> <p><em>Unfortunatly, the demo page doesn't seem to be working right now :-(</em></p> <p>I have not looked into what those can do... But maybe they might help you ;-) <br><em>ie, there might be some ideas in their code-source that you could base your script upon ?</em></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload