Tag Archives: php

Customizing WordPress Jetpack Mobile Theme

I have successfully using Jetpack Mobile Theme to serve the mobile version of my blogs, as of now it uses a theme called minieleven (that is starting to look a bit old…), with some tweaks here and there it can shine … Continue reading

Posted in Geek Stuff | Tagged , , , , , , , , , , | Leave a comment

PHP get a Youtube video duration

To make this work you need to go to Google Developers Console, create a project, enable the YouTube Data API v3, and get a key in authentication key in credentials. This is pretty much the difficult part. Now the easy … Continue reading

Posted in Geek Stuff | Tagged , , , , | 6 Comments

Parsing Media RSS with PHP SimpleXML

Parsing XML docs with PHP SimpleXML is pretty straightforward. Yesterday i lost around 5 minutes to parse a Media RSS XML, and that was weird because normally with SimpleXML you take like 30 seconds… A Media RSS (MRSS) document is … Continue reading

Posted in Geek Stuff | Tagged , , , , | 11 Comments

Raspberry PI follow-up

So, i did get a (actually 2) Raspberry PI and did get it up and running, it was time to do anything useful with it… Time to setup a Samba server for network recording of security camera feeds. I went … Continue reading

Posted in DIY, Geek Stuff | Tagged , , , | Leave a comment

PHP Email validation function

My PHP email validation function nowadays is: function isEmail($value, $network_validation = true) { // Create the syntactical validation regular expression // (broken in 2 lines for better readability) $regexp = “/^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@”. “([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/i”; // Validate the syntax if(preg_match($regexp, $value)) { if … Continue reading

Posted in Geek Stuff | Tagged , , , | Leave a comment