how to create php script to pull and write a javascript file?

I use a service to place ads on my website, but whenever I try to click them when using internet explorer, the links are blocked by its ad blocker feature. I read about this work around on a website, but have no idea how to do it. Could someone please help with the following?

The process goes something like this:

  1. Create PHP or any server-side script that pulls the JavaScript file and writes the contents to a .js file
  2. Create cronjob to run that script every night in case the ad server pushes out an update
  3. Remove the part of the original snippet that writes out the include, leaving the API URL and key values
  4. Add a tag with the src pointing at the .js file created in step 1
Sponsor our Newsletter | Privacy Policy | Terms of Service