PageRenderTime 2447ms queryFilters 1ms Sphinxql 271ms GetByIds 1914ms meta 0ms repositoryFilters 69ms languageFilters 0ms sourceFilters 1ms

36,578 results for 'php mt_rand repo:dlorenso/dazlo' (2447 ms)

Source

Language

Repository

Br.php https://bitbucket.org/englishextra/shimansky.biz | PHP | 840 lines
1<?php
2
24    // if (is_string($array)) {
25      require_once(__DIR__ . '/BrString.php');
26      return new BrString($array);
112    $className = 'Br' . ucwords($name);
113    $classFile = __DIR__ . '/' . $className . '.php';
114    if (file_exists($classFile)) {
673    return sprintf('%04x%04x-%04x-%03x4-%04x-%04x%04x%04x',
674      mt_rand(0, 65535), mt_rand(0, 65535), // 32 bits for "time_low"
675      mt_rand(0, 65535), // 16 bits for "time_mid"
680         // 8 bits for "clk_seq_low"
681      mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535) // 48 bits for "node"
682    );
738    if (!class_exists('PHPMailer')) {
739      require_once(__DIR__.'/3rdparty/phpmailer/class.phpmailer.php');
740    }
Utils.class.php git://github.com/benkeen/generatedata.git | PHP | 389 lines
1<?php
2
50				 case "noSettingsFile":
51					 $settingsFileAndPath = realpath(__DIR__ . "/../settings.php");
52					 $settingsFileExists = file_exists($settingsFileAndPath);
140	public static function weightedRand($weightedValues) {
141		$rand = mt_rand(1, (int) array_sum($weightedValues));
142		foreach ($weightedValues as $key => $value) {
150	/**
151	 * A security-related function. This returns a clean version of PHP_SELF for use in the templates. This wards
152	 * against URI Cross-site scripting attacks.
153	 *
154	 * @return the cleaned $_SERVER["PHP_SELF"]
155	 */
155	 */
156	public static function getCleanPhpSelf() {
157		return htmlspecialchars(strip_tags($_SERVER['PHP_SELF']), ENT_QUOTES);
Security.php https://github.com/Arantor/Elkarte.git | PHP | 1,437 lines
1<?php
2
89	{
90		require_once(SUBSDIR . '/OpenID.subs.php');
91		openID_revalidate();
278		{
279			require_once(ADMINDIR . '/ManageBans.php');
280			updateBanMembers();
313		{
314			require_once(SUBSDIR . '/Auth.subs.php');
315			$cookie_url = url_parts(!empty($modSettings['localCookies']), !empty($modSettings['globalCookies']));
757	$token = md5(mt_rand() . session_id() . (string) microtime() . $modSettings['rand_seed'] . $type);
758	$token_var = substr(preg_replace('~^\d+~', '', md5(mt_rand() . (string) microtime() . mt_rand())), 0, rand(7, 12));
759
1257
1258RemoveHandler .php .php3 .phtml .cgi .fcgi .pl .fpl .shtml';
1259
Security.php https://github.com/smf-portal/SMF2.1.git | PHP | 1,321 lines
1<?php
2
50
51	require_once($sourcedir . '/Subs-Auth.php');
52
82	{
83		require_once($sourcedir . '/Subs-OpenID.php');
84		smf_openID_revalidate();
270		{
271			require_once($sourcedir . '/ManageBans.php');
272			updateBanMembers();
746	$token = md5(mt_rand() . session_id() . (string) microtime() . $modSettings['rand_seed'] . $type);
747	$token_var = substr(preg_replace('~^\d+~', '', md5(mt_rand() . (string) microtime() . mt_rand())), 0, rand(7, 12));
748
1232
1233RemoveHandler .php .php3 .phtml .cgi .fcgi .pl .fpl .shtml';
1234
Hash.php https://github.com/zc1415926/eva-engine.git | PHP | 172 lines
1<?php
2/**
7 * @license   http://framework.zend.com/license/new-bsd New BSD License
8 * @package   Eva_Api.php
9 * @author    AlloVince
15 * Unique Hash
16 * From : http://blog.kevburnsjr.com/php-unique-hash
17 * 
28         }
29         return sprintf('%04X%04X-%04X-%04X-%04X-%04X%04X%04X', mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(16384, 20479), mt_rand(32768, 49151), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535));
30     }
87     * @copyright 2008 Kevin van Zonneveld (http://kevin.vanzonneveld.net)
88     * @license   http://www.opensource.org/licenses/bsd-license.php New BSD Licence
89     * @version   SVN: Release: $Id: alphaID.inc.php 344 2009-06-10 17:43:59Z kevin $
101         if(!$in){
102             $in = mt_rand();
103             $padUp = 6;
captcha_helper.php https://github.com/betchi/CodeIgniter.git | PHP | 229 lines
1<?php
2/**
4 *
5 * An open source application development framework for PHP 5.2.4 or newer
6 *
114			$word = '';
115			for ($i = 0, $mt_rand_max = strlen($pool) - 1; $i < $word_length; $i++)
116			{
116			{
117				$word .= $pool[mt_rand(0, $mt_rand_max)];
118			}
128		$length	= strlen($word);
129		$angle	= ($length >= 6) ? mt_rand(-($length-6), ($length-6)) : 0;
130		$x_axis	= mt_rand(6, (360/$length)-16);
130		$x_axis	= mt_rand(6, (360/$length)-16);
131		$y_axis = ($angle >= 0) ? mt_rand($img_height, $img_width) : mt_rand(6, $img_height);
132
captcha_helper.php https://github.com/coderkid/No-CMS.git | PHP | 228 lines
1<?php
2/**
4 *
5 * An open source application development framework for PHP 5.2.4 or newer
6 *
114			$word = '';
115			for ($i = 0, $mt_rand_max = strlen($pool) - 1; $i < $word_length; $i++)
116			{
116			{
117				$word .= $pool[mt_rand(0, $mt_rand_max)];
118			}
128		$length	= strlen($word);
129		$angle	= ($length >= 6) ? mt_rand(-($length-6), ($length-6)) : 0;
130		$x_axis	= mt_rand(6, (360/$length)-16);
130		$x_axis	= mt_rand(6, (360/$length)-16);
131		$y_axis = ($angle >= 0) ? mt_rand($img_height, $img_width) : mt_rand(6, $img_height);
132
datagen.php https://github.com/GM-Alex/oxideshop_ce.git | PHP | 466 lines
1<?php
2require_once realpath(dirname(__FILE__) . '/../../') . '/unit/OxidTestCase.php';
2require_once realpath(dirname(__FILE__) . '/../../') . '/unit/OxidTestCase.php';
3require_once realpath(dirname(__FILE__) . '/../../') . '/integration/price/basketconstruct.php';
4
155    {
156        $sStart = "<?php\r";
157        $sStart .= "\$aData = ";
177            $aData = $this->_generateData($i);
178            $sFilename = "{$this->sCaseName}{$i}.php";
179            $rHandle = $this->_createFile($sFilename);
215            $aArticle['oxid'] = $sUID;
216            $aArticle['oxprice'] = mt_rand($this->dPriceFrom, $this->dPriceTo) / 100;
217            // check if got any special vat
260        for ($i = 0; $i < $this->iVouseries; $i++) {
261            $aVouchers[$i]['oxdiscount'] = mt_rand($this->iVouSerieMinDiscount, $this->iVouSerieMaxDiscount);
262            $aVouchers[$i]['oxdiscounttype'] = $this->aVouSerieTypes[array_rand($this->aVouSerieTypes, 1)];
uuid.php https://github.com/lmorchard/friendfeedarchiver.git | PHP | 24 lines
1<?php
2/**
13     * Produce a UUID per RFC 4122, version 4 
14     * See also: http://us.php.net/manual/en/function.uniqid.php#69164
15     */
17        return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
18            mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),
19            mt_rand( 0, 0x0fff ) | 0x4000,
20            mt_rand( 0, 0x3fff ) | 0x8000,
21            mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ) );
22    }
Case.php https://github.com/toshibr/hashmark.git | PHP | 426 lines
1<?php
2// vim: fenc=utf-8:ft=php:ai:si:ts=4:sw=4:et:
9 * @link        http://framework.zend.com/manual/en/coding-standard.html
10 * @link        http://phpdoc.org/tutorial.php
11 * @copyright   Copyright (c) 2008-2009, Code Actual LLC
11 * @copyright   Copyright (c) 2008-2009, Code Actual LLC
12 * @license     http://www.opensource.org/licenses/bsd-license.php New BSD License
13 * @package     Hashmark-Test
14 * @subpackage  Base
15 * @version     $Id: Case.php 294 2009-02-13 03:48:59Z david $
16*/
24 */
25abstract class Hashmark_TestCase extends PHPUnit_Framework_TestCase
26{
28     * @access protected
29     * @var boolean     If true, PHPUnit lets globals persist between tests.
30     * @link http://sebastian-bergmann.de/archives/797-Global-Variables-and-PHPUnit.html
EngineHelpers.php https://github.com/poitch/dokin.git | PHP | 115 lines
1<?php
2/**
45 **/
46require_once DOKIN_DIR.'Controller.php';
47require_once DOKIN_DIR.'Config.php';
108    return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
109            mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),
110            mt_rand( 0, 0x0fff ) | 0x4000,
111            mt_rand( 0, 0x3fff ) | 0x8000,
112            mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ) );
113}
faptcha.php https://github.com/Laurelai/tsukiboards.git | PHP | 219 lines
1<?php
2/*
52
53//srand((double)microtime()*1000000);	// RH - not necessary on PHP >=4.2.0, and it's bad for randomness to reseed
54$randnum = rand(0,$NumFiles - 1);
91	$rotate = 0;
92	$rotate = mt_rand(-35,35);
93	if( $rotate >=0 && $rotate < 9 )
105	$draw->setStrokeWidth( mt_rand(1,3) );
106	$draw->line( mt_rand(0, $width), mt_rand(0,$height), mt_rand(0,$width), mt_rand(0,$height) );
107	$draw->setStrokeColor( GetRandomColour() );
108	$draw->setStrokeWidth( mt_rand(1,3) );
109	$draw->line( mt_rand(0, $width), mt_rand(0,$height), mt_rand(0,$width), mt_rand(0,$height) );
110	$image->drawImage( $draw );
134	// Cheap background permutation, 50% chance of flipping or flopping
135	if( mt_rand( 0, 1) )
136	{
system.php https://github.com/Excito/bubba-frontend.git | PHP | 489 lines
1<?php
2require_once 'HTTP/Request2.php';
73
74  # faithfully stolen from http://stackoverflow.com/questions/2040240/php-function-to-generate-v4-uuid
75  private function gen_uuid() {
77      // 32 bits for "time_low"
78      mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),
79
80      // 16 bits for "time_mid"
81      mt_rand( 0, 0xffff ),
82
84      // four most significant bits holds version number 4
85      mt_rand( 0, 0x0fff ) | 0x4000,
86
92      // 48 bits for "node"
93      mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )
94    );
mt_rand.c git://github.com/php/php-src.git | C | 356 lines
159 */
160PHPAPI uint32_t php_mt_rand(void)
161{
201		case MT_RAND_PHP:
202			BG(mt_rand_mode) = MT_RAND_PHP;
203			break;
275 */
276PHPAPI zend_long php_mt_rand_range(zend_long min, zend_long max)
277{
291 * rand() allows min > max, mt_rand does not */
292PHPAPI zend_long php_mt_rand_common(zend_long min, zend_long max)
293{
352	REGISTER_LONG_CONSTANT("MT_RAND_MT19937", MT_RAND_MT19937, CONST_CS | CONST_PERSISTENT);
353	REGISTER_LONG_CONSTANT("MT_RAND_PHP",     MT_RAND_PHP, CONST_CS | CONST_PERSISTENT);
354
adm_index.php https://bitbucket.org/roser137/turkerreklam | PHP | 200 lines
1<?PHP
2/*
7 hiç bir ţekilde yardým etmeyeceđimi de bilmelisiniz. Bu yüzden bana ulaţmaya çalýţmayýn. Ayrýca scriptin bazý dosyalarýnda
8 bazý mail fonksiyonlarý silinmiţtir. Bu bölümleri bulup düzenlemeniz gerekmektedir. Bu da belli bir seviyede PHP bilgisi gerektirir.
9 Özetle, script bu haliyle ,tam olarak deđilsede, çalýţmaktadýr. Bu scripti özgürce kullandýđýnýz için her türlü sorumluluđu size
17session_start();
18include_once("load/funcs.php");
19if (@empty($_SESSION['uid'])) {
25		// Create a random number between 1 and 3
26		$IMGVER_RandVal = mt_rand(1,3);
27		// If the random number was 1, we generate a lowercase
33	  	  	// case characters from a to z.
34		        $IMGVER_RandVal = mt_rand(97, 122); 
35	        	break;
38	  	  	// numbers from 0 to 9.
39		        $IMGVER_RandVal = mt_rand(48, 57);
40	        	break;
captcha.php https://bitbucket.org/PhEnIxMo_On/ojoo.git | PHP | 539 lines
1<?php
2/**
6 * @license GPLv3
7 * @link    http://code.google.com/p/cool-php-captcha
8 * @package captcha
22// OPTIONAL Change configuration...
23//$captcha->wordsFile = 'words/es.php';
24//$captcha->session_var = 'secretword';
27//$captcha->scale = 3; $captcha->blur = true;
28//$captcha->resourcesPath = "/var/cool-php-captcha/resources";
29
35    if (in_array($lang, $langs)) {
36        $captcha->wordsFile = "words/$lang.php";
37    }
86    /** Dictionary word file (empty for random text) */
87    public $wordsFile = 'words/en.php';
88
captcha_1.php https://bitbucket.org/PhEnIxMo_On/ojoo.git | PHP | 539 lines
1<?php
2/**
6 * @license GPLv3
7 * @link    http://code.google.com/p/cool-php-captcha
8 * @package captcha
22// OPTIONAL Change configuration...
23//$captcha->wordsFile = 'words/es.php';
24//$captcha->session_var = 'secretword';
27//$captcha->scale = 3; $captcha->blur = true;
28//$captcha->resourcesPath = "/var/cool-php-captcha/resources";
29
35    if (in_array($lang, $langs)) {
36        $captcha->wordsFile = "words/$lang.php";
37    }
86    /** Dictionary word file (empty for random text) */
87    public $wordsFile = 'words/en.php';
88
securimage.php https://github.com/42Team-itslove/passport.git | PHP | 1,683 lines
1<?php
2/**
19    // They can be passed as an array to the Securimage constructor, set below,
20    // or set from securimage_show.php and securimage_play.php
21
176     * It is recommended to set this value here so it is used by all securimage
177     * scripts (i.e. securimage_show.php)
178     *
250     *
251     *     <?php
252     *     // use <img src="securimage_show.php?namespace=contact_form">
252     *     // use <img src="securimage_show.php?namespace=contact_form">
253     *     // or manually in securimage_show.php
254     *     $img->setNamespace('contact_form');
529     * @param array $options Additional options to be passed to Securimage.
530     *   $options must include database settings if they are not set directly in securimage.php
531     *
populateSeedData.php https://github.com/adityasingh93/SuiteCRM.git | PHP | 513 lines
1<?php
2if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
45// it's not found fall back on en_us
46if(file_exists("include/language/{$current_language}.lang.php")){
47    require_once("include/language/{$current_language}.lang.php");
49else {
50    require_once("include/language/en_us.lang.php");
51}
51}
52require_once('install/UserDemoData.php');
53require_once('install/TeamDemoData.php');
55global $sugar_demodata;
56if(file_exists("install/demoData.{$current_language}.php")){
57   require_once("install/demoData.{$current_language}.php");
59else {
60   require_once("install/demoData.en_us.php");
61}
populateSeedData.php https://github.com/AlexandrPM/Suite.git | PHP | 513 lines
1<?php
2if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
45// it's not found fall back on en_us
46if(file_exists("include/language/{$current_language}.lang.php")){
47    require_once("include/language/{$current_language}.lang.php");
49else {
50    require_once("include/language/en_us.lang.php");
51}
51}
52require_once('install/UserDemoData.php');
53require_once('install/TeamDemoData.php');
55global $sugar_demodata;
56if(file_exists("install/demoData.{$current_language}.php")){
57   require_once("install/demoData.{$current_language}.php");
59else {
60   require_once("install/demoData.en_us.php");
61}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21