Here you will find details of news, projects, releases and other bits and pieces that we are working on at Boolean.
We hope that you find something of interest amongst the archives.
Code snippets, methodologies and useful links will also be mentioned here.
![]() |
Just a quick and dirty PHP function to retrieve information from the Yahoo Finance API to perform a currency conversion
if ($Handle) {
$Result = fgets($Handle, 4096);
fclose($Handle);
}
$allData = explode(‘,’,$Result);
$Value = $allData[1];
return $Value * $Amount;
}
Usage:
![]() |
The Apache mod_rewrite module offers an unparalleled toolset for manipulating URLs, – however configuration can be a tricky beast at times. While most people are comfortable enough removing file extensions like .php we recently had a user who wanted to hide all the variables in the address string.
For example index.php?id=id would end up being index/id
The magic here is the QSA or Query String Append. If you just wanted to remove the .php you would use
![]() |
A quick way to create a view to show file size statistics across databases on a server.
![]() |
The requirements were that Javascript shouldn’t be necessary (bad SEO and accessibility) and that the HTML had to validate. For some examples have a look at Facebook advertisements. Here is how it was done:
Any other links you may have inside the div will require position:relative and a suitable z-index (greater than 1)
|
The icon of the wonderful plugin Firebug recently moved from its familiar location at the bottom right corner of Firefox. This was due to a UI change in the status bar of Firebox from version 4 onwards. The Firebug blog does a good explanation of why this was necessary.
What I did to fix however was to type about:config in my Firefox address bar.
I accepted the “I’ll be careful, promise!” warning.
To narrow down the (many) configuration options I applied a filter “firebug.show”
Finally I changed “extensions.firebug.showStatusIcon” to true.
29/01/2012 From the number of pageviews this post receives I see this is common problem. I hope it helps people solve the issue.
![]() |
Facebook recently moving their applications inside an iFrame has turned web development on its head once again. After being deprecated in XHTML and barely hanging on in HTML iFrames looked like they had all but become extinct. Not so!
So, although other browsers do not block and intercept your cookie within an iFrame (and hence Facebook application) Internet Explorer will do. The problem lies with the W3C standard called Platform for Privacy Preferences (P3P) and you can read about it here if you wish.
In PHP all you will need to ensure Internet Explorer accepts third party cookies is to send the below header:
Note: by using such a P3P statement you are making a legal statement about how your application handles cookies and if you are later found in violation of the statement you make, you may find yourself in criminal or civil hot water.
![]() |
Often for testing the efficieny of some PHP code we use script execution calculations such as the microtime function. What is infinitely more useful however is the ability to time the execution of all, some, or multiple sections of code or series of lines.
Unfortunately I cant remember the origins of this timer class – but this code allows you to stop, start, pause and resume timing of specific sections of your php code. Thank you, whoever you may be.
Download the class here
Available methods:
start() – start/resume the timer
stop() – stop/pause the timer
reset() – reset the timer
get([$format]) Which can defaults to Timer::SECONDS but can also be Timer::MILLISECONDS or Timer::MICROSECONDS
Usage example:
$timer1->start();
// do some code
// calculate the time it takes to run a function
$timer2->start();
functionX();
$timer2->stop();
$timer1->stop();
print $timer1->get();
print $timer2->get();
A quick and simple service for obtaining pictures of kittens for use as placeholders in your designs or code.
Simply place the required image size after their url (for example http://placekitten/200/300) and you will be rewarded with a cute placeholder image. Great for quick real code mockups…
Check it out here