time-period

Date/time programming is one of the tricky aspects of software development. Although inherently not complex in itself, coding date/time algorithms can be a subtle source of bugs. Especially in web development a feature such as payment subscription processing that ranges from days to weeks to months can get complex quickly. Also such kind of scenarios require additional features like auto renewal, scheduled email alerts to subscribers etc. Such kind of features require good date/time handling algorithms and libraries that handle such chores are always welcome.
Read More

Sentiment Analysis of Twitter feeds

by: Sameer Posted in: social |  

29 Sep 2014
twitter-sentiment-analysis

In the last post we looked into accessing Twitter API v1.1 from PHP. In this post we will see how we can add sentiment analysis for the tweets. Generally speaking, sentiment analysis aims to determine the attitude of a writer with respect to some topic. A basic task in sentiment analysis is classifying the polarity of a given text, whether the expressed opinion in a sentence is positive, negative, or neutral.
Read More

Creating Twitter Apps in PHP

by: Sameer Posted in: social |  

28 Sep 2014
twitter-api

In this post we will look into accessing Twitter REST API in PHP. This can be useful if you need to post Tweets from your PHP application or anaylze, search Tweets. In the following examples we will use the twitter-api-php PHP wrapper for Twitter v1.1 API. Although there are a few wrappers around, this one I like for its simplicity.
Read More

iphone6

Where on Earth is the iPhone made, follow its global supply chain in this infographic. We call it the iPhone Saga, how Apple has perfected the art of juggling the global supply chain, perfecting the art of sourcing suppliers from around the world that can offer the most efficient and best value parts under Appleā€™s strict quality benchmark.
Read More

Data cleaning in PHP applications

by: Sameer Posted in: data |  

21 Sep 2014
data-cleaning

One of the important tasks in any web application is proper sanitization and standardization of data. Any data stored in a database should be in a standardized format, specially data that comes from a variety of sources.

Scrubbers or data cleaners are an important part of the data transformation process. Whenever you are involved in some data import or export process, data scrubbers can help you clean and standardize your data elements before storing.
Read More

spamtraffic

Referrer spam has always been a nuisance, specially if you have some traffic restrictions on your hosting. The referral traffic robs your site from the precious bandwidth allocated (also know as Bandwidth Theft). Also with a large number of spam traffic, legitimate users will be greeted with a slow and sometimes non responsive site.

Htaccess enables one to block certain referrer sites and prevent referrer spam. The following post list some techniques to do so. One way to prevent referrer spam is to force a error and stop any further redirection. Note that the following requires that ‘mod_rewrite’ is enabled on your server.
Read More

gmail-attachment-with-php1

Over the last few years I’ve received quite some queries regarding the article Downloading Gmail attachments using PHP published here. After procrastinating for some time (a long time actually), I’ve answered some of the queries in this updated post.

As mentioned in the earlier post, automatically extracting attachments from Gmail can be important for reasons where you need to process the attached files periodically with a CRON job or need to process the files programmatically. Also it can be useful for automatically archiving important attachments.
Read More

bower

Bower is a package manager for the web and offers a generic solution to the problem of front-end package management. For example the Polymer library uses Bower for package management. In fact, the primary reason for me to install Bower was to use Polymer. The main difference between Bower and pther package managers is that Bower will manage any packages, even if that means HTML, CSS, or images. In this case, a package means any third-party code, usually publicly accessible from a Git repository.
Read More

google-app-with-php

A couple of years back if you needed to run PHP on Google App Engine you were required to use a open source tool like Quercus, a 100% Java implementation of PHP, to run your PHP applications on the App Engine. However, as you would have guessed, it was not easy to work as with using a native PHP implementation. Now that App Engine natively supports PHP and MySQL, you can easily write PHP applications.
Read More

descriptive stats

Descriptive statistics can be quite useful for simple analysis of records in a database. For example, to calculate average numbers of sales or products for a particular duration, or the Variance of sales for a month etc.

We can easily calculate standard descriptive statistic measures in MySQL such as MEAN, SUM, STANDARD DEVIATION, VARIANCE, MIN and MAX using built-in functions. Below is a sample student table with student id and scores which we will use for calculating descriptive statistical measures.
Read More

Sign up for fresh content in your email