Skip to content

Instantly share code, notes, and snippets.

@hubgit
Created April 28, 2009 12:15
Show Gist options
  • Save hubgit/103106 to your computer and use it in GitHub Desktop.
Save hubgit/103106 to your computer and use it in GitHub Desktop.
Reflect as a proxy (freely available content only)
<?php
$response = file_get_contents('http://reflect.ws/ReflectProxy?' . http_build_query(array('url' => $url)));
if (strpos($response, 'http://reflect.ws/Reflection') === 0)
system(sprintf('open %s', escapeshellarg(trim($response))));
else
exit(sprintf("Error: %s\n", $response));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment