• Home
  • Amoeba
  • ASK
  • Community
  • Source Codes
  • Contact Us
Blue Orange Green Pink Purple

Archive for the ‘Programming Techniques’ Category

You can use the search form below to go through the content and find a specific post or page:

Sep 01

How to Protect your SWF (AS2 or AS3). Prevent SWF Decompile using SWF Protector

Being a flash programmer, I have always had this concern. The way a flash application works differs from a php application. We don’t really need to worry about protecting the PHP code because the code is interpreted in the server and only the html codes are sent to the client browser. But a Flash engine basically lies in the user browser and the AS2 or AS3 codes are rendered in the user Browser. Though a Flash application is compiled in to a compact SWF file which is served to the user, this file contains all the codes we have written, thus making it easy for hackers or other developers to steal codes from our SWF application. And the Actionscript code is the most important part of any Flash/Flex application.

Read More 0 Comments   |   Posted in Flash & Action Script, Flex, Programming Techniques   |   Posted by Aneeska
Jul 07

PHP – Search in an Array for Values Matching a Pattern – Regex, Wildcard

I have an array with many values and I need to do a search to find all the values that match a pattern. We have functions like in_array & array_search in PHP, but these functions basically try to match the exact needle value in the array. I need to use my Regular Expression Pattern and [...]

Read More 0 Comments   |   Posted in PHP/MySQL, Programming Techniques, Regular Expression   |   Posted by Aneeska
Jul 01

PHP – How to Get Browser Properties and Capabilities – get_browser()

In this tutorial, learn about the get_browser() PHP function and its configuration. We’ll learn how to use Gary Keith’s browser information database (browscap.ini) with the PHP browscap directive.

I wanted one of my web applications to have a different appearance on mobile phones and devices. I didn’t really want to set up an entirely different domain or use a sub domain particularly for mobile devices (like http://mobile.facebook.com). Instead I want to tackle the device inside my application logic so that all users access the same URL.

Read More 1 Comment   |   Posted in Enterprise Web, PHP/MySQL, Programming Techniques   |   Posted by Aneeska
Jun 25

CakePHP – Search for records between two dates inclusively

Often we search for records in a database table for fetching records that were created or modified on a particular date or between two dates. We match against a date field and add multiple conditions to find records with a date field value ranging between two dates.
It would look something like this:
Select * from tables [...]

Read More 0 Comments   |   Posted in CakePHP, PHP/MySQL, Programming Techniques   |   Posted by Aneeska
Jun 02

Swap Values Without Temp or A Third Variable in PHP

When we need to swap the values of two variables, we use a third variable temporarily to hold the data between swapping.  Something like this:

<?php
$tmp = $a;
$a = $b;
$b = $tmp;
?>

Here is another way without using a temp or a third variable.

<?php
list($b, $a) = array($a, $b);
?>

And if you want to make it a function:

<?php
function swapValues(&$a, [...]

Read More 0 Comments   |   Posted in PHP/MySQL, Programming Techniques   |   Posted by Aneeska
Jun 02

CakePHP – Auth Login Redirect Problem with Plugins

The Auth Component in CakePHP redirects the user to the log-in page when a user tries to access any protected pages in the application. The default log-in page is set by defining the loginAction variable in the beforeFilter function in your UsersController or AppController.
But if you have used plug-ins in your application, and if a [...]

Read More 3 Comments   |   Posted in CakePHP, PHP/MySQL, Programming Techniques   |   Posted by Aneeska
May 10

Convert under_scored strings to CamelCased without RegEx in PHP

Developers normally use functions that use Regular Expression to convert under_scored strings in to CamelCased strings. Usage of Regular Expression is quite heavy. We can use a simple yet powerful method to convert these strings to CamelCase without using RegEx in PHP.

Read More 2 Comments   |   Posted in PHP/MySQL, Programming Techniques   |   Posted by Aneeska
Apr 22

Enhance your Website Performance – Best Practices

Do you think your website is sluggish? Does it take a lot of time to download on to a user computer? Here are some techniques to make your site load faster on user computers and enhance it’s performance. These are some of the best practices followed in the Web industry. Implementing these practices has proved that your site will become 20-30% faster. This tutorial is for advanced users and I haven’t explained it in detail.

Read More 1 Comment   |   Posted in CSS & XHTML, Enterprise Web, Javascript & Libraries, PHP/MySQL, Programming Techniques   |   Posted by Aneeska
Feb 03

Multiple Insert in Single Query – PHP/MySQL

Often, we come across situations where we need to INSERT multiple rows in to a database table from an Array, File or even from another Database Table. I am explaining various methods for inserting multiple rows using a single query using MySQL and PHP.
MySQL documentation says you can use the following methods to speed up [...]

Read More 14 Comments   |   Posted in PHP/MySQL, Programming Techniques   |   Posted by Aneeska
Jan 29

Regular Expression in PHP – Find Link Texts

A small article for those who want to experience with Regular Expressions in PHP. Regular expressions, also referred to as regex or regexp, provide a concise and flexible means for matching strings of text, such as particular characters, words, or patterns of characters. Regular expressions are used by many text editors, utilities, and programming languages [...]

Read More 4 Comments   |   Posted in PHP/MySQL, Programming Techniques, Regular Expression   |   Posted by Aneeska
Older Posts »
  • Search a Topic


  • Got a Question?
      ASK and get a Solution! ASK
  • Categories
    • CakePHP
    • Computers
    • CSS & XHTML
    • Enterprise Web
    • Flash & Action Script
    • Flex
    • Javascript & Libraries
    • Perl Programming
    • PHP/MySQL
    • Programming Techniques
    • Regular Expression
    • Social Media
  • Recent Visitors
  • Recent Articles
    • How to Protect your SWF (AS2 or AS3). Prevent SWF Decompile using SWF Protector
    • PHP – Search in an Array for Values Matching a Pattern – Regex, Wildcard
    • PHP – How to Get Browser Properties and Capabilities – get_browser()
    • CakePHP – Search for records between two dates inclusively
    • Notebook/Laptop hangs frequently/random (on Low Battery when AC power is connected)
    • Swap Values Without Temp or A Third Variable in PHP
    • CakePHP – Auth Login Redirect Problem with Plugins
    • Convert PHP array to Javascript array
    • CakePHP – Accessing a model in AppController or in any Controllers
    • Save Images from Flash – Actionscript 3, Filereference.save, JPGEncoder
  • Archives
    • September 2010
    • July 2010
    • June 2010
    • May 2010
    • April 2010
    • March 2010
    • February 2010
    • January 2010
    • December 2009
  • Tags
      vertically center horizontally align dead center div amoeba ask credit card workbench decryption solutions kiosk questions horizontal center align vertical center align css trick solution css encryption as2 flash regex as3 Regular Expression action script mysql array CakePHP php

  • Donate

      If you find this site helpful, please donate to Amoeba Solution Kiosk. We will be using the money received for conducting technology awareness camps and seminars for school and college students in rural areas of Kerala, India.

  • Links
    • Amoeba Solutions
    • Blog Catalog
  • Home
  • Amoeba
  • ASK
  • Community
  • Source Codes
  • Contact Us

© Copyright Amoeba Solution Kiosk. All rights reserved.
An Amoeba Concept!

Back to Top