From The Blog

CakePHP 2 aggressive Security - continued

CakePHP 2.0 has another aggressive security which is shown clearly when trying to make an ajax request to an action via method POST, it fires...

Read more
Clearing OpenX Cache

to clear openx cache clear openx/var/cache directory or by setting cache time by navigating to Configuration > Global Settings > Banner...

Read more
CakePHP 2 Aggressive Security

CakePHP has had CSRF protection since 1.2. For 2.0 the existing CSRF has a new more paranoid mode, and is its own standalone feature. By default a...

Read more
Flash objects overlay problem

How to make flash objects overlaid by another html elements? simply by using the wmode attribute and set it to transparent wmode - Possible...

Read more
Javascript: dealing with cookies

function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = ";...

Read more
SWF flash files ignore stacking order, play on top of DHTML layers

Issue A SWF file in a layer on a DHTML page containing several layers displays above all the layers regardless of the layers' stacking order ("z-...

Read more
How to check jQuery version ?

// Returns string Ex: "1.3.1" $().jquery; // Also returns string Ex: "1.3.1" jQuery.fn.jquery;

Read more
Detecting the iPhone and iPad

Obviously, if you've created a page specifically for iPhone and iPad users, the first thing you'll need to do is to find out when a user is visiting...

Read more
FTP connections and file transfers

$file = 'somefile.txt'; $remote_file = 'readme.txt'; // set up basic connection $conn_id = ftp_connect($ftp_server); // login with username and...

Read more
Secure copy via ssh connection

scp allows files to be copied to, from, or between different hosts. It uses ssh for data transfer and provides the same authentication and same level...

Read more
Don't put a form inside a table

Don't put a form inside a table, instead put table inside form Wrong approach: <table> <form id="form-id" method="POST" action"action.php...

Read more
Drupal: doing an action in more safe way as another user.

To do an action as another user "Administrator for example" for any reason "maybe to run it in a cron job" in a safe way: global $user; $currentuser...

Read more
Drupal file_copy won't work outside of the Drupal installation directory

The selected file could not be uploaded, because the destination is not properly configured This "feature" has bitten me before. It's one of those...

Read more
Easy sorting with CakePHP

Sorting with Set::sort() in CakePHP 1.2 You probably already know that CakePHP's Set class is one of the most useful additions to CakePHP 1.2. What...

Read more
Very helpful regex (regular expressions)

Regular expressions are a very useful tool for developers. They allow to find, identify or replace text, words or any kind of characters. In this...

Read more
Get Selected Text

Example: get selected and put it in a form textarea Reference: http://www.codetoad.com/javascript_get_selected_text.asp <script language=...

Read more
Change page URL without refreshing page

Can we change page URL, eg. when sending an ajax request, or opening an image in a light-box? HTML5: Changing the browser-URL without refreshing page...

Read more
Using CakePHP without Database Connection

Is it possible to use CakePHP framework without using any database connection? YES Without much fanfare - here are the steps to trick CakePHP into...

Read more