Category Archives: PHP
This is a quick fix on WordPress plugin called ‘Share Posts on Whatsapp’ by Aftab Husain. I have been using this plugin for quite sometime and it did not give me much problem. But it’s lack the facility to limit the sharing button to only posts, or to only pages. I took a look at […]
This is a quick update. If you ever need an unlimited postpaid mass SMS blast engine then a serious consideration should be given to TM Infoblast product. For end users; There is web based interfaced for mass SMS sending There is also windows based standalone program that can serve the purpose. Import and export phonebookp […]
Not so long time ago, maybe few years, I used to use a third party software in order to display a collection of photos from Instagram sharing the same #hashtag. The purpose is to add more fun to the event, so our guest can have their selfies or wefies on instagram, put a common #hashtag […]
Have you ever need some kind of notification be it via SMS or emails during some alarming conditions? Here is a real case study after meeting my client recently. A little background:- this client need a solution whereby an automation will notify a group of stakeholders in case of a trigger happen. The trigger will […]
TM Infoblast is a service provided by Telekom Malaysia (TM) enabling users to send and receive SMS over normal fixed line service. Yes, the normal 03-xxxxxxxx (Klang Valley) or 09-xxxxxxx (Eastern). Some might wonder why would anyone wish to use TM Infoblast while there are a lot of other providers offering the same solution, for […]
There is a very cool plugin called Autoset Featured Image by Arefly. I like it because it let me getting lazy. I just post an article and put in a picture tag, the plugin then sweetly update the featured image field. Awesome. However I did some mods to it for my personal use. What Autoset […]
I have issue with putting serialized array containing “‘” into database. This is how to fix it: //to safely serialize $safe_string_to_store = base64_encode(serialize($multidimensional_array)); //to unserialize… $array_restored_from_db = unserialize(base64_decode($encoded_serialized_string)); Source here.
$original = “The quick red fox jumps over the lazy brown dog.”; $new = preg_replace(“/the/i”, “\$0“, $original); Source here.
To do it in PHP: $f = file_get_contents($url); file_put_contents($path_to_new_file, $f);
This is the link: https://www.digitalocean.com/community/articles/how-to-install-and-secure-phpmyadmin-on-ubuntu-12-04 This is how to create the htpasswd: sudo htpasswd -c /path/to/passwords/.htpasswd username and this is how to change it later on: sudo htpasswd /path/to/passwords/.htpasswd username Ref: http://wiki.ultraseedbox.com/index.php?title=How_to_change_passwords
Symptoms: The URL is loadable via normal browsers. However Google Webmaster Tools report crawl error of “not found”. When fetched as Google, it will return “HTTP/1.1 404 Not Found” instead of “HTTP/1.1 200 OK”. Cause: I was including WordPress “wp-blog-header.php” in my script such as: require(“subfolder/wp-blog-header.php”); This is the only reason. This is the code […]