Advertisement
rapani

store-id.php

Oct 23rd, 2014
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. <?php
  2. $query = $_GET['url'];
  3. if(preg_match('#^https?:\/\/.*\.fbsbx\.com\/file_download\.php\?(id=[^\&\s]*).*#i', "$query", $match))
  4. {
  5. echo 'OK store-id=http://fb-attachment.squid.internal/';
  6. echo $match[1];
  7. }
  8. else if(preg_match('#^http:\/\/.*\/depot\/[0-9]{3}\/chunk\/(.*?)(\?.*|$)#i', "$query", $match))
  9. {
  10. echo 'OK store-id=http://dota2.squid.internal/';
  11. echo $match[1];
  12. }
  13.  
  14. else if(preg_match('#^https?:\/\/[^\.]+\.dl\.sourceforge\.net\/(.*)#i', "$query", $match))
  15. {
  16. echo 'OK store-id=http://sourceforge.squid.internal/';
  17. echo $match[1];
  18. }
  19.  
  20. else
  21. {
  22. echo 'ERR';
  23. }
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement