just so you know, $query = "SELECT * FROM 1downloads_hits WHERE base64 = '$file_id'"; leaves your server wide-open for anyone to do anything they want to your DB...
you can't use ajax to post to most places, unless they opt-in for such behavior using access-control (cors).
you can however simply use an invisible form and submit() to the url your're trying to hit.
BROWSER STATS [% share]
(2013/10/31) IE7:0.5, IE8:8.6, IE9:5.3, IE10:12.3, FF:17.7, CH:41.8, SF:8.1, MOBILE:20.4