How to Read Big Files with PHP (Without Killing Your Server)

Here’s an interesting article that was hanging around in my “to blog” tabs for a while now: How to Read Big Files with PHP (Without Killing Your Server).  I found the title to be slightly misleading, expecting the good old advice of reading and processing files line by line rather than all at once.  But it’s not that.  It’s much better.  It covers some techniques that aren’t that well known to the majority of the PHP developers – generators, streams, and filters.

Strongly recommended read!

Crooked Style Sheets

Crooked Style Sheets is a proof of concept for website tracking/analytics using only CSS and without Javascript.

What can we do with this method?

We can gather some basic information about the user, like the screen resolution (when the browser is maximized) and which browser (or engine) is used. Further we can detect if a user opens a link or hovers with the mouse over an element. This can be used to track which (external) links a user visits and using the hover method. It should be even possible to track how the user moved their mouse (using an invisible table of fields in the page background). However, using my method it’s only possible to track when a user visits a link the first time or hovers over a field the first time. Maybe it’s possible to modify the method so that it is possible to track every click.

Furthermore it is possible to detect if a user has installed a specific font. Based on this information it should be possible to detect, which OS a users uses (because different operating systems ship different fonts, e.g. “Calibri” on Windows).

JSON Server

JSON Server is a handy tool for anybody working with or developing the REST/JSON APIs.  It’s a ready-made “fake” API server, that is super easy to setup with your end points and your data.  And the best part – it’s not just read-only.  You can work with POST, PUT, PATCH, and DELETE requests too and the JSON Server will properly update your pre-configured data in the JSON files.

Nerd Fonts – Iconic font aggregator, collection, and patcher

Nerd Fonts is a collection of fonts for people who work with code snippets, command line, and text-based user interface applications.  The fonts are also patched with additional popular icon sets like Font Awesome, Devicons, Octicons, and others.