Tag Archives: php

Calculating memory used by PHP to generate that page

Do you know how much memory those loops are using ? Why is this page taking so long to load ? Well with this simple PHP code you can daily benchmark different versions of your script to use the least … Continue reading

Posted in Code, framework, Technology, work | Tagged , , , , , | Leave a comment

PHP Dump/Debug script.

Ever use PHP’s var_dump() or print_r() to debug what is going wrong with that $data you have ? Well, this simple script acts as the above functions, yours first parameter is your data, and the second optional parameter is stoping … Continue reading

Posted in Code, fun, work | Tagged , , , , , | 1 Comment

Use PHP to find your mobile browser

I needed a quick way to include different files based on the if the visitor to a site is on a mobile device or a regular browser/computer. Every browser has a user agent depending on the operating system, browser and … Continue reading

Posted in apple, Code, fun, Technology, work | Tagged , , , , , | 3 Comments

Use PHP and the GD Library to make CSS Sprites

I came across some neat free Icons a couple of day’s ago. I found 178 free icons by WooThemes. They suited my needs for some navigation icons I was after, so after a quick download, I have them all. Great. … Continue reading

Posted in Code, design, fun, Life, Technology, work | Tagged , , , | Leave a comment

Basic REGEX for cleaning and prepping data

Over the last year or so, I have used a PHP Framework Code Igniter, Amongst many of its good features is its built in Form Validation Library. Every now and then I either write a a small site out of … Continue reading

Posted in Code, fun, Technology, work | Tagged , , | Leave a comment

Using Mootools Request.HTML response Javascript using $exec

Javascript frameworks are great, no matter which one you use their all built to do more, quickly. I use Mootools for most of my JS needs, and something is I often use is the AJAX request functionality. Today I needed … Continue reading

Posted in Code, javascript, Technology, Uncategorized, work | Tagged , , , , , | Leave a comment

Use PHP to subStr to cut length in whole words

In work, we often output a section of content and don’t always either want the whole content, or want a quick summary; Below is a quick piece of code that will create a quick clean summary of a full HTML … Continue reading

Posted in Code, work | Tagged , , | Leave a comment

IP Addressing – know your External IP

I often want to know my IP address from when I am not, when I am not at Home/Work. I know that there are Lots of sites out there that will sett it to you, but I wanted to set … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment