Archive for category internet

Cache PHP to gzipped static html pages using htaccess redirect

No matter the server performance, the fastest kind of website for a visitor is the one with static HTML pages; this way the server just has to upload existing data to the browser instead of starting the PHP compiler, open a connection to MySQL, fetch data, format the page and only after that send it. […]

Tags: , , , ,

Redirect mobile and desktop users to the correct CSS via .htaccess file

The winning solution for a mobile compliant website is to have a single HTML structure for every visitor, and just choose the appropriate CSS to render the page correctly for both worlds; so, I’m not speaking here about a /mobile/ folder under your website root, nor any ?mobile query string, but about the exact same […]

Tags: , , , ,

Zip MySQL database backup with PHP and send as email attachment

I was a happy user of MySQLDumper until a while ago, when my shared hosting upgraded to the cloud architecture and latest PHP version; with that, some modules for PERL went missing and I was left without a viable backup solution (MySQLDumper PHP approach uses a javascript reloading routine which is superslow and is not […]

Tags: , , , ,

reCAPTCHA fails to deliver, bypassed or cracked, spam still comes through

I like(d)  the idea behind reCAPTCHA, blocking spam while helping scanning books is cool, and let’s be honest, reCAPCHA images are more readable to the human eye than the random deformed alphanumeric combinations the usual antispam codes produce. Anyway, even if I have Akismet plugin installed, being the comments captcha’ed I expected almost no spam […]

Tags: ,

PHP templating, preg_match, file_get_contents and strpos, the fastest

While working on the website of reecycle.it, il frecycling italiano per il riciclo degli oggetti, I am spending my resources also on reducing at most the load on the Apache server of my italian shared hosting, Tophost, so i decided to make some benchmarks to see which was the best speed I could load the […]

Tags: , ,

Protect your WordPress contents from plagiarism with a digital timestamp

Since a while ago, I decided to release all the contents I produce with a Creative Commons license. Why? Well, once I publish my stuff online, anyone with an internet connection can read it; so, if they like it and want to make it more widely available, a stricter copyright policy would compell them to […]

Tags: , ,

Resize, enlarge or scale an html image map with a PHP script

I am creating a portal for an italian website which will sport a nice region selector with an imagemap, and region highlighting with a javascript. I found a free and detailed image map of italy along with a combined png, but it was too small to be really useable, so I needed to put a […]

Tags:

Time of last visit to a website page in Firefox history

Last time I put hands on my car, a Rover 75, in order to change by myself the in-tank fuel pump (maybe a tutorial will be coming about that), I already knew it was going to be a hard task. That’s why I made sure I had enough time, it was a sunny sunday morning […]

Tags: ,

Internet tools freeware downloads

After the website was moved to the new domain and converted to PHP, a lot of utilities linked here have been massively updated, disappeared, or become obsolete/useless. I removed the obsolete/useless ones, and added “google” near the ones which are not hosted in here but you should google for, while the downloads you can find […]

Tags: ,

How to get an named alias for your dynamic IP

No matter if you use a DHCP connection (which means you have a different IP address for each connection – every 56k and ISDN line, and some DSL and Cable lines) or a static IP one, if you have a server installed on your machine, you may take advantage by "changing" your IP with a […]

Tags: