First of all you need Eggdrop installed on your server.
You need at least v1.9.2
Open your eggdrop.conf and add the script
source scripts/Eggdrop-IRC-announcer.tcl
Then upload Index.php & Eggdrop.php to your HTML folder.
Then run the system. You can include the script in any PHP files you want