Archive for the ‘PHP’ Category

How safe strip_tags is?

Many developers rely on strip_tags to validate user input, and, although the function does a good job when removing all the html tags, there are some security issues when you want to leave some of them (like <a> or <img>).
That is because, although you removed all the <script> tags from the input, that doesn’t mean [...]

OEmbed – transforming video links to embeds

Since the video sharing phenomenon began, many web developers struggle with the problem of embeding the videos without knowing anything but the url where the video page is. Many users didn’t know anything about embed code, how to put videos on their blog or other tehnical stuff like that, so developers tried to find ways [...]

Running multiple processes in PHP

Sometimes you need multiple commands to run in parallel to save up script processing time for repetitive tasks.
In the “Building a Video sharing site” project that i will present here soon, I needed a script to run multiple video processing jobs. PHP wasn’t meant to support multitasking, but with a few tricks we can emulate [...]