When DDOSят, put the main task is to bend a particular service or the entire server.
Defending against BTC for a nice surprise using php, special advantages in most cases will not bring (well, except that, e.g., removes the burden from the DBMS). And the channel will remain pocketed, all connections complete, Apache will thresh the maximum number of processes that someone's gonna eat up the remnants of free memory... And there's not only the users of the service will be difficult to get to the site, but the admin over ssh.
\r
DDOS protection is always a holistic approach, otherwise there is no protection.