Skip to content

Instantly share code, notes, and snippets.

@ss23
Created October 19, 2020 06:20
Show Gist options
  • Save ss23/421f939dedaed944ae01f8f82ee73791 to your computer and use it in GitHub Desktop.
Save ss23/421f939dedaed944ae01f8f82ee73791 to your computer and use it in GitHub Desktop.
<?php
$url = parse_url($_GET['url']);
if ($url['host'] == 'example.com') {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, htmlentities($_GET['url']));
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,TRUE);
curl_exec($ch);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment