I just bought a new laptop and started installing my usual Windows dev stack. I still use Wamp, as it turns out to be most efficient for me. I can easily create a new development domain, change PHP versions as I go, and MySQL is running just fine. There is just one thing that is boring, and that is installing all the Visual Studio components that are needed.Continue reading →
My pet project is on its way – a subtitles website done in Laravel. So, I needed some data about the movies and found out that IMDB offers a daily dump of their database. Parts of it, surely… Anyway, it is enough for me, faster than an API, better than scraping.
So, I have made a simple script to download the files using
file_get_contents, and ungz-ed (I think that is how you say it 🙂 ) the file with a script I found here: https://stackoverflow.com/questions/3293121/how-can-i-unzip-a-gz-file-with-php
I knew that importing trough Laravel’s method
create would be slow… Way too slow for the amount of the data IMDB has to offer (). The first alternative was to open the file in PHP, and a “foreach” loop, but why not skip PHP as much as I can?