$devices = array( 'iphone_p' => array( 'type' => 'iPhone: portrait (320x480)', 'width' => 320, 'height' => 480 ), 'iphone_l' => array( 'type' => 'iPhone: landscape (480x320)', 'width' => 480, 'height' => 320 ), 'moto' => array( 'type' => 'Motorola phone/browser (RAZR, v551, etc)', 'width' => 176, 'height' => 220 ), 'n80' => array( 'type' => 'Nokia N80 (N60WebKit)', 'width' => 352, 'height' => 416 ) ); if ( (int) $_REQUEST['w'] && (int) $_REQUEST['h'] ) { $choice = array( 'type' => "Custom size ({$_REQUEST['w']}x{$_REQUEST['h']})", 'width' => $_REQUEST['w'], 'height' => $_REQUEST['h'] ); } elseif ( $devices[$_REQUEST['d']] ) $choice = $devices[$_REQUEST['d']]; else $choice = $devices['iphone_p']; ?>