If you run a WordPress blog on OpenShift, you might not be able to run the Minify plugins. These plugins won’t work if your OpenShift app is directly installed from the WordPress catridge they provide. This happens because the plugins, themes and other directories of wp-content are linked directories which means they’re fake. The folders are just shortcuts of the original folder situated in app-root/data. This makes the minify plugin hard to find the source of the file.... [READ MORE]
Posts marked with "PHP" in categories
Making Text To Speech In PHP With Google Translate
Google provides text to speech feature on their translator product which is an awesome feature. If you are creating a web app of your own and need a human speaking voice for your app, you will get lost. Google have a URL for creating these audio files when given a text. I will tell you how to implement this text to speech feature on your PHP site without directly compromising the Google URL.... [READ MORE]
Create Group Chat In PHP With MySQL, jQuery And AJAX
Chatting is one of the most implemented feature on websites. Group chat makes users to share their feelings and other news easily to their friends easily. AJAX makes this chatting more beautiful, elegant, simple and comfortable. Group chats may be vulnerable to SQL injections and XSS attacks. But in this post where we’re going to make a group chat that doesn’t have these vulnerabilities which makes it more awesome. You can see a demo, or you can download the files directly.... [READ MORE]
Simplest Way To Detect A Mobile Device In PHP
Mobile users are increasing. Most of the site visitors of a website is using mobiles to browse. So you need to redirect users who uses mobile to a mobile page of your site. In Javascript it is easy, because you can check the width and height of the window. But on server side, it can become difficult. You will find is_mobile() function in this post which detects if the client is in mobile or not.... [READ MORE]
Parsing sMention Form Data On Server In PHP
In my previous post, I introduced the sMention jQuery plugin – a plugin that adds the @mentions to a input element. But I haven’t told in the post how to handle the data on the server side after the form has been submitted. This handling replaces the @mentions to the user’s name in a[href] tag. It’s made possible using smention function bind as the callback function of preg_replace_callback. This smention function can be seen on the file comps/config.... [READ MORE]
Check If a Number is Odd Or Even In PHP & JavaScript
Odd numbers and even numbers are used in programming languages. To check if a number is even or odd needs brilliant code. In this post, you will be introduced to checkNum() function in both PHP and JavaScript. This functions will return even for even numbers and odd for odd numbers. Parameters $num – An integer (PHP) num – An integer (JS) Returns “odd” for odd number, “even” for even number.... [READ MORE]
E-Mail Verification Script In PHP Using Mailgun API
As years goes, so does the increase in SPAM on the web. Most users sign up on services with a fake E-Mail. They might even use other’s E-Mail for signing up. This is a big problem, because when you send an email to the signed up user, it goes to the wrong guy. So, you should verify user’s email before signing them up. You might think that it would cost database memory.... [READ MORE]
Create A Contact Form In PHP With Mailgun
Contact forms make it easy for the visitors of your site to contact you. Contact forms are available in various CM systems, but if you are creating your own site, you have to create the contact form yourself. The messages thus sent by the users have to be stored in databases and you have to constantly check the database for new messages. To overcome this problem, it’s better to directly send the messages to your inbox.... [READ MORE]
Encryption & Decryption Using Mcrypt In PHP
Mcrypt is a replacement of Unix‘s popular command crypt. It is a file encryption tool. Mcrypt uses modern algorithms for encrypting. Hence it is considered as secure and safe. To encrypt a string, Mcrypt requires a key to encrypt and decrypt. This key have a critical role in encryption and decryption. In this post I’ll be giving out two functions that will encrypt and decrypt based on a key. The Key We should use the same key for both encryption and decryption.... [READ MORE]
Send Free E-Mails Using Mailgun API in PHP
E-Mails increases your site’s traffic. E-Mails are used in websites that require E-Mail verification to Reset Passwords. There is already a mail function in PHP, but the E-Mails that are sent via PHP‘s mail function goes to SPAM folder in most of the mail services. So, developers use API services to send E-Mails that gets received on user’s Inbox. Most of the API‘s need money to use. If you are a starting developer, you need a Free service.... [READ MORE]