Get Last Segment of URL in JavaScript

JavaScript handles strings and arrays very well. Sometime its needed to get the last segment or file name of the current page URL and process it for another JavaScript/Ajax request. Here,...

Search and Replace from another table in MySQL

In MySQL, its easy to find occurrence of a sub-string within string and replace all that occurrences with MySQL REPLACE() function like: UPDATE tablename set table_column = REPLACE (table_column, ‘[string to...

Manually Clear Cached Data

ExpressionEngine have good caching feature. You can see about Data Caching and Performance. The cached data can be cleared from ExpressionEngine’s Control Panel -> Tools -> Data -> Clear Caching. Here...

Download remote file with cURL

cURL stands for “Client for URLs”. cURL is a library (libcurl) which allows PHP to communicate with other servers with different type of protocols. With the cURL its easy to download...