Miscellaneous
Mployd.ph Offers PHPUGPH Members 1-Year Free Subscription
If you are a member of PHPUGph.com, you are entitled to a 1 year free account subscription at Mployd.ph. The account subscription is worth Php 10,000 approx. ($250).
Login to PHPUGPH now and grab the exclusive promo code. Hurry! This offer expires October 31, 2008 is extended till the end of the year!
Globe Innovation Convention: Globe Labs Launch - “Enriching lives through Innovative Communications”
Spreading the news
Date: August 7, 2008 (Thursday)
Time: 7:30 AM - 5:00 PM
Venue: Isla Ballroom, Tower Wing, EDSA Shangrila
Globe Labs is a new organization within Globe Telecom whose mission is to help bring in the newest future technology services at the earliest market-relevant time. We explore new and future technologies, and partner with developers to create [...]
Top 25 Active PHPUGPH Users
Here are the top 25 active PHPUGPH users
How to use AuthComponent in Cakephp 1.2
How do you use AuthComponent and AclComponent to authenticate users? On app_controller.php,
put this code:
<?php
class AppController extends Controller {
var $components = array(’Acl’,’Auth’,’Cookie’,’Session’);
function beforeFilter() {
$this->Auth->loginAction = ‘/users/login’;
$this->Auth->loginRedirect = ‘/questions/Various-Topics’;
$this->Auth->authorize = ‘actions’;
}
?>
and, on every controller, create a beforeFilter function and put this :
function beforeFilter() {
//var_dump($this->params);
this->Auth->allow(’action1′,’action2′);
parent::beforeFilter();
}
Note, however , since AuthComponent is authenticating users based on controller actions [...]
Colorful phpinfo();
Just for fun and if you have nothing to do, run this custom phpinfo(); to get a view of the old and dull phpinfo with cool colors.
<?php
ob_start();
phpinfo();
$phpinfo = ob_get_contents();
ob_end_clean();
preg_match_all(‘/#[0-9a-fA-F]{6}/’, $phpinfo, $rawmatches);
for ($i = 0; $i < count($rawmatches[0]); $i++)
$matches[] = $rawmatches[0][$i];
$matches = array_unique($matches);
$hexvalue = ‘0123456789abcdef’;
$j = 0;
foreach ($matches as $match)
{
$r = ‘#’;
$searches[$j] = $match;
for ($i = [...]
