Advertisement
Guest User

Untitled

a guest
Nov 15th, 2013
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.35 KB | None | 0 0
  1. <?php
  2. $cache_path = '/etc/nginx/cache/';
  3. $url = parse_url($_POST['url']);
  4. if(!$url)
  5. {
  6.     echo 'Invalid URL entered';
  7.     die();
  8. }
  9. $scheme = $url['scheme'];
  10. $host = $url['host'];
  11. $requesturi = $url['path'];
  12. $hash = md5($scheme.'GET'.$host.$requesturi);
  13. var_dump(unlink($cache_path . substr($hash, -1) . '/' . substr($hash,-3,2) . '/' . $hash));
  14. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement