'.$e.'
'; die(); } $stmt = $dbc->prepare(' SELECT url FROM downloads WHERE id = ? ORDER BY id LIMIT 1'); $stmt->execute(array($id)); $dl = $stmt->fetchColumn(); $url_parts = explode('/', $dl); Header( "Content-Type: application/octet-stream" ); Header( 'Content-Disposition: attachment; filename="'.$url_parts[count($url_parts)-1].'"' ); readfile($dl); $dbc = null; ?>