In an effort to improve private torrent trackers the Project Gazelle team has created a reliable, lightweight and secure codebase. It was designed from the ground up to be secure against SQL and XSS injection attacks and at the same time be able to handle thousands of users.
The source code, which is currently undergoing beta, is available via the Project Gazelle SVN. The source code comes with a C++ based tracker, PHP frontend and complete administration panel.
You can find more info at the Project Gazelle web site.
Author:
kihbord
Tags: C++, Gazelle, PHP
I’ve don my share of coding in Assembly language and one of the constructs that is pretty efficient to use is lookup tables for calling subroutines or functions. One of the things I like PHP is its ability to do the same thing.
For example, if you want to perform exception/error handling based on a status code, you can use lookup tables instead of using a switch() construct. If you use a switch() construct, you’ll have something like:
switch( $status ) {
case 0: do_action_1(); break;
case 0: do_action_1(); break;
default: do_default();
}
If you use a lookup table, your source code will have something like:
$lookup = array( 'do_action_1','do_action_2');
if ( $status >= 0 && $status < count($lookup) ) {
call_user_func($lookup[$status]);
}
I’m sure there are other uses of lookup tables and the combination of using array() and call_user_func() in PHP offers a lot of flexibility in coding.
Author:
kihbord
Tags: call_user_func, lookup table
As a follow-up on my last post about “Detecting web visitors that use mobile phones“, I’ve made available a Wordpress plugin that can be used on your Wordpress site. The plugin provides an is_mobile() function that can be used in Wordpress themes to enable detection of mobile devices.
I currently use it on this site to allow me to view Code Stuff on my mobile phone. If you want to know more about the TxTu Is Mobile wordpress plugin, you can visit my site at TxTu. You can also go straight to the TxTu Is Mobile page to read and download the Wordpress plugin.
Author:
kihbord
Tags: browser detect, plugins, WordPress Development
With all the thrusts nowadays towards using mobile devices to surf the Net, it would be great if your Wordpress blog is mobile device friendly. The concept is actually simple and you can incorporate a mobile friendly version of your blog by understanding some simple things.
The main thing that you need to know is that when visitors to your Wordpress blog (actually any web site but let’s use Wordpress for this example) browses your site, you can identify the type of computer or mobile device that they are using. Once you have identified the device, it’s easy to create a separate CSS stylesheet for your mobile visitor.
Continue reading …
Author:
kihbord
Tags: browser detection, plugins, WordPress Development