@this_code_sucks said:
@SEMI-HYBRID code said:
ob_clean(); echo(file_get_contents($urlToTransferTo));
in a true to PHP wtfy fashion.
Serious question:
Will this work if you point it at another server? Say, a java instance running 3rd party software inside my cluster?
Yep. As long as you have file wrappers compiled in.
You can simplify it further by removing the parens around the echo statement.
echo file_get_contents($url);
(side php wtf: echo is a language statement, print is a function whose parens are optional.
echo (echo 1);is a syntax error but
print print 1;prints out '11')
Of course if you want to do it in true php wtf way you ignore all possibilities of handling errors and reduce your call to:
@readfile($url);