PageRenderTime 141ms queryTime 14ms sortTime 1ms getByIdsTime 20ms findMatchingLines 31ms

100+ results results for 'php mt_rand repo:zc1415926/eva-engine' (141 ms)

Not the results you expected?
DooTextHelper.php http://doophp.googlecode.com/svn/trunk/ | PHP | 320 lines
                    
1<?php
                    
2/**
                    
14 * @author Leng Sheng Hong <darkredz@gmail.com>
                    
15 * @version $Id: DooTextHelper.php 1000 2009-08-4 11:17:22
                    
16 * @package doo.helper
                    
30        for( $i=0; $i<$length; $i++ )
                    
31            $str .= substr( $allchar, mt_rand (0,36), 1 ) ;
                    
32        return date("YmdHis").rand(1000,9999).$str ;
                    
53     * @param bool $convertEmail Convert email address into links. Default true.
                    
54     * @param string $emailHide Change this if you want to hide the email. eg. leng[AT]doophp.com, value = '[AT]'
                    
55     * @return string
                    
178        $str = str_replace(array('&lt;', '&gt;'), array('<', '>'), $str);
                    
179        $str = str_replace(array('&lt;?php', '?&gt;',  '\\'), array('phptagopen', 'phptagclose', 'backslashtmp'), $str);
                    
180        $str = '<?php //tempstart' . "\n" . $str . '//tempend ?>';
                    
188        $str = preg_replace("#//tempend.+#is", "</span>\n</code>", $str);
                    
189        $str = str_replace(array('phptagopen', 'phptagclose', 'backslashtmp'), array('&lt;?php', '?&gt;', '\\'), $str);
                    
190        return $str;
                    
                
NodeSaveTest.php git://github.com/drupal/drupal.git | PHP | 183 lines
                    
1<?php
                    
2
                    
51    $max_nid = reset($nids);
                    
52    $test_nid = $max_nid + mt_rand(1000, 1000000);
                    
53    $title = $this->randomMachineName(8);
                    
                
Session.class.php http://dyhb-frame.googlecode.com/svn/trunk/ | PHP | 298 lines
                    
1<?php
                    
2/* [DoYouHaoBaby!] (C)Dianniu From 2010.
                    
2/* [DoYouHaoBaby!] (C)Dianniu From 2010.
                    
3   ? PHP ??Session ??????($)*/
                    
4
                    
41		if(is_null($this->detectId())) {
                    
42			$this->id(uniqid(dechex(mt_rand())));
                    
43		}
                    
                
functions.php http://xtraupload.googlecode.com/svn/trunk/ | PHP | 280 lines
                    
1<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * A turn-key open source web 2.0 PHP file uploading package requiring PHP v5
                    
6 *
                    
38		{
                    
39			$num = mt_rand() % strlen($vals);
                    
40			
                    
42			{
                    
43				$num = mt_rand(0, 60);
                    
44			}
                    
132	{
                    
133		return '"3gp", "7z", "aca", "ai", "api", "app", "as", "ascx", "asmx", "asp", "aspx", "avi", "avs", "axt", "bash", "bat", "bmp", "c", "cab", "cal", "cat", "cda", "cf", "chm", "cnf", "conf", "config", "cpl", "cpp", "crt", "cs", "csproj", "css", "csv", "cue", "dar", "db", "dbp", "dem", "disco", "dll", "dng", "doc", "dot", "dpk", "dpr", "dps", "dtq", "dun", "etp", "exe", "fdb", "fhf", "fla", "flv", "fnd", "fon", "gif", "gz", "h", "hlp", "hol", "htm", "html", "htt", "hxc", "hxi", "hxk", "hxs", "hxt", "icm", "ini", "ins", "iqy", "iso", "its", "jar", "java", "jbf", "job", "jpeg", "jpf", "jpg", "js", "lnk", "m3u", "m3v", "m4a", "m4p", "m4v", "mad", "map", "mapup", "mat", "mdb", "mdf", "mht", "mml", "mov", "mp3", "mp4", "mpeg", "mpg", "msc", "msg", "msi", "ncd", "nfo", "none", "nrg", "ogg", "ost", "otf", "pas", "pdf", "pdi", "pet", "pfm", "php", "pif", "plg", "pmc", "", "pot", "ppk", "pps", "ppt", "prf", "psd", "psp", "pub", "qbb", "rar", "rb", "rc", "rct", "rdp", "refresh", "reg", "res", "resx", "rmvb", "rss", "rtf", "sdl", "sea", "sh", "shs", "sln", "sql", "suo", "swf", "tar", "tdf", "tdl", "theme", "tiff", "ttf", "txt", "url", "vb", "vbproj", "vbs", "vcard", "vcf", "vob", "vsmacros", "wab", "wma", "wmv", "wpl", "wri", "wsc", "xhtml", "xla", "xls", "xml", "xpi", "xsd", "xsl", "xslt", "xsn", "zip"';
                    
134	}
                    
                
ProductsDemoDataMaker.php https://bitbucket.org/zurmo/zurmo/ | PHP | 162 lines
                    
1<?php
                    
2    /*********************************************************************************
                    
96            $model->name            = $name;
                    
97            $model->quantity        = mt_rand(1, 95);
                    
98            $model->productTemplate = $productTemplate;
                    
                
index.php https://code.google.com/p/maxsite/ | PHP | 148 lines
                    
1<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); 
                    
2
                    
141	$text = explode("\n", $text);
                    
142	$out = trim($text[ mt_rand(0, count($text) - 1) ] );
                    
143	
                    
                
info.php https://bitbucket.org/itoxable/chiron-gaming.git | PHP | 224 lines
                    
18//NOTE: use a trailing slash for folders!!!
                    
19//see http://bugs.php.net/bug.php?id=27609
                    
20//see http://bugs.php.net/bug.php?id=30931
                    
24    else if (is_dir($path))
                    
25        return is__writable($path.'/'.uniqid(mt_rand()).'.tmp');
                    
26    // check tmp file for read/write capabilities
                    
55        
                    
56        if(is_file('integ/'.$_SESSION['cms'].'.php')){
                    
57          
                    
170        </b></span><br/><br/><br/>
                    
171                freichat/hardcode.php <font color='<?php echo $flags['color1']; ?>'><?php echo $flags['text1']; ?> </font><br/>
                    
172                freichat/cache/perm/request.001 <font color='<?php echo $flags['color3']; ?>'><?php echo $flags['text3']; ?> </font><br/>     
                    
173                freichat/cache/temp <font color='<?php echo $flags['color4']; ?>'><?php echo $flags['text4']; ?> </font><br/>                 
                    
174                <p><?php echo $set_file; ?> <font color=<?php echo $flags['color2']; ?>><?php echo $flags['text2']; ?></font><br/>
                    
175                freichat/client/plugins/upload/upload <font color='<?php echo $flags['color5']; ?>'><?php echo $flags['text5']; ?> </font><br/>
                    
                
engine_potpourri.php https://code.google.com/p/enanocms/ | PHP | 332 lines
                    
1<?php
                    
2
                    
51			'foreground_lattice_x' => (string)mt_rand(25, 30),
                    
52			'foreground_lattice_y' => (string)mt_rand(25, 30),
                    
53			'lattice_color' => $latticecolor,
                    
124		}
                    
125		$font = mt_rand(0, (count($fonts)-1));
                    
126		
                    
194			$font = ($rnd_font) ? rand(0, (count($fonts)-1)) : $font;
                    
195			$angle = mt_rand(-30, 30);
                    
196		
                    
294	// Function  gdVersion by Hagan Fox
                    
295	// http://de3.php.net/manual/en/function.gd-info.php#52481
                    
296	function gdVersion($user_ver = 0)
                    
322 		ob_start();
                    
323 		phpinfo(8);
                    
324 		$info = ob_get_contents();
                    
                
captcha_helper.php https://bitbucket.org/studiobreakfast/sync.git | PHP | 246 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP 5.1.6 or newer
                    
6 *
                    
115			{
                    
116				$str .= substr($pool, mt_rand(0, strlen($pool) -1), 1);
                    
117			}
                    
134
                    
135		// PHP.net recommends imagecreatetruecolor(), but it isn't always available
                    
136		if (function_exists('imagecreatetruecolor'))
                    
244
                    
245/* End of file captcha_helper.php */
                    
246/* Location: ./system/heleprs/captcha_helper.php */
                    
                
UserPasswordResetTest.php git://github.com/drupal/drupal.git | PHP | 274 lines
                    
1<?php
                    
2
                    
59    // that it is definitely over a second ago.
                    
60    $account->login = REQUEST_TIME - mt_rand(10, 100000);
                    
61    db_update('users_field_data')
                    
                
LibraryInstallerTest.php git://github.com/composer/composer.git | PHP | 290 lines
                    
1<?php
                    
2
                    
286        return $this->getMockBuilder('Composer\Package\Package')
                    
287            ->setConstructorArgs(array(md5(mt_rand()), '1.0.0.0', '1.0.0'))
                    
288            ->getMock();
                    
                
FilesystemTestCase.php git://github.com/symfony/symfony.git | PHP | 180 lines
                    
1<?php
                    
2
                    
13
                    
14use PHPUnit\Framework\TestCase;
                    
15use Symfony\Component\Filesystem\Filesystem;
                    
75        $this->filesystem = new Filesystem();
                    
76        $this->workspace = sys_get_temp_dir().'/'.microtime(true).'.'.mt_rand();
                    
77        mkdir($this->workspace, 0777, true);
                    
160
                    
161        // https://bugs.php.net/69473
                    
162        if ($relative && '\\' === \DIRECTORY_SEPARATOR && 1 === PHP_ZTS) {
                    
162        if ($relative && '\\' === \DIRECTORY_SEPARATOR && 1 === PHP_ZTS) {
                    
163            $this->markTestSkipped('symlink does not support relative paths on thread safe Windows PHP versions');
                    
164        }
                    
                
functions.php http://xrnx.googlecode.com/svn/trunk/ | PHP | 124 lines
                    
1<?php
                    
2
                    
90        // Detect by creating a temporary file
                    
91        $temp_file = tempnam(md5(uniqid(mt_rand(), true)), '');
                    
92        if ($temp_file) {
                    
                
Common.php https://bitbucket.org/studiobreakfast/sync.git | PHP | 503 lines
                    
41*/
                    
42	function is_php($version = '5.0.0')
                    
43	{
                    
48		{
                    
49			$_is_php[$version] = (version_compare(PHP_VERSION, $version) < 0) ? FALSE : TRUE;
                    
50		}
                    
78		{
                    
79			$file = rtrim($file, '/').'/'.md5(mt_rand(1,100).mt_rand(1,100));
                    
80
                    
160			set_status_header(503);
                    
161			exit('Unable to locate the specified class: '.$class.'.php');
                    
162		}
                    
453		{
                    
454			$_error->show_php_error($severity, $message, $filepath, $line);
                    
455		}
                    
                
Word.php git://github.com/pmjones/php-framework-benchmarks.git | PHP | 396 lines
                    
1<?php
                    
2/**
                    
22/** @see Zend_Captcha_Base */
                    
23require_once 'Zend/Captcha/Base.php';
                    
24
                    
34 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
35 * @version    $Id: Word.php 20096 2010-01-06 02:05:09Z bkarwin $
                    
36 */
                    
241            if (!class_exists($this->_sessionClass)) {
                    
242                require_once 'Zend/Loader.php';
                    
243                Zend_Loader::loadClass($this->_sessionClass);
                    
339    {
                    
340        return md5(mt_rand(0, 1000) . microtime(true));
                    
341    }
                    
                
AuthController.php https://code.google.com/p/ecartcommerce/ | PHP | 114 lines
                    
1<?php
                    
2/**
                    
38        mt_srand((double)microtime(1)*1000000);
                    
39        return md5(mt_rand());
                    
40    }
                    
                
UUID.php https://github.com/Ocramius/stormpath-sdk-php.git | PHP | 348 lines
                    
1<?php
                    
2
                    
169
                    
170        $uuid['time_hi'] = (4 << 12) | (mt_rand(0, 0x1000));
                    
171        $uuid['clock_seq_hi'] = (1 << 7) | mt_rand(0, 128);
                    
171        $uuid['clock_seq_hi'] = (1 << 7) | mt_rand(0, 128);
                    
172        $uuid['time_low'] = mt_rand(0, 0xffff) + (mt_rand(0, 0xffff) << 16);
                    
173        $uuid['time_mid'] = mt_rand(0, 0xffff);
                    
173        $uuid['time_mid'] = mt_rand(0, 0xffff);
                    
174        $uuid['clock_seq_low'] = mt_rand(0, 255);
                    
175        for ($i = 0; $i < 6; $i++)
                    
175        for ($i = 0; $i < 6; $i++)
                    
176            $uuid['node'][$i] = mt_rand(0, 255);
                    
177        return ($uuid);
                    
241        $uuid['time_low'] = $time & 0xffffffff;
                    
242        /* Work around PHP 32-bit bit-operation limits */
                    
243        $high = intval($time / 0xffffffff);
                    
                
Random.php git://github.com/drupal/drupal.git | PHP | 302 lines
                    
1<?php
                    
2
                    
67      for ($i = 0; $i < $length; $i++) {
                    
68        $str .= chr(mt_rand(32, 126));
                    
69      }
                    
118      }
                    
119      $str = chr(mt_rand(97, 122));
                    
120      for ($i = 1; $i < $length; $i++) {
                    
120      for ($i = 1; $i < $length; $i++) {
                    
121        $str .= chr($values[mt_rand(0, $max)]);
                    
122      }
                    
154    while (strlen($word) < $length) {
                    
155      $word .= $cons[mt_rand(0, $num_cons - 1)] . $vowels[mt_rand(0, $num_vowels - 1)];
                    
156    }
                    
161  /**
                    
162   * Generates a random PHP object.
                    
163   *
                    
                
captcha_helper.php https://bitbucket.org/sbeuken/artelux.git | PHP | 246 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP 5.2.4 or newer
                    
6 *
                    
115			{
                    
116				$str .= substr($pool, mt_rand(0, strlen($pool) -1), 1);
                    
117			}
                    
134
                    
135		// PHP.net recommends imagecreatetruecolor(), but it isn't always available
                    
136		if (function_exists('imagecreatetruecolor'))
                    
244
                    
245/* End of file captcha_helper.php */
                    
246/* Location: ./system/heleprs/captcha_helper.php */
                    
                
FormLibrary.class.php https://bitbucket.org/chamilo/chamilo-dev/ | PHP | 200 lines
                    
1<?php
                    
2require_once Path :: get_plugin_path() . 'FormLibrary/Rules/Rule.class.php';
                    
2require_once Path :: get_plugin_path() . 'FormLibrary/Rules/Rule.class.php';
                    
3require_once Path :: get_plugin_path() . 'FormLibrary/ElementStorage/ElementStorage.class.php';
                    
4require_once Path :: get_plugin_path() . 'FormLibrary/Elements/Element.class.php';
                    
4require_once Path :: get_plugin_path() . 'FormLibrary/Elements/Element.class.php';
                    
5require_once Path :: get_plugin_path() . 'FormLibrary/Containers/Container.class.php';
                    
6require_once Path :: get_plugin_path() . 'FormLibrary/Renderer/Render.class.php';
                    
6require_once Path :: get_plugin_path() . 'FormLibrary/Renderer/Render.class.php';
                    
7require_once Path :: get_plugin_path() . 'FormLibrary/Elements/CustomElements/form_library_html_editor.class.php';
                    
8/*
                    
32        {
                    
33            $a = "FormLibrary_" . mt_rand();
                    
34        }
                    
53        {
                    
54            $this->action = $_SERVER['PHP_SELF'];
                    
55            if (! empty($_SERVER['QUERY_STRING']))
                    
                
String.php https://bitbucket.org/bodeidowu/letsstake | PHP | 329 lines
                    
1<?php
                    
2/* SVN FILE: $Id: string.php 8166 2009-05-04 21:17:19Z gwoo $ */
                    
6 *
                    
7 * PHP versions 4 and 5
                    
8 *
                    
8 *
                    
9 * CakePHP(tm) :  Rapid Development Framework (http://www.cakephp.org)
                    
10 * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
                    
16 * @copyright     Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
                    
17 * @link          http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
                    
18 * @package       cake
                    
19 * @subpackage    cake.cake.libs
                    
20 * @since         CakePHP(tm) v 1.2.0.5551
                    
21 * @version       $Revision: 8166 $
                    
114		$uuid = sprintf("%08x-%04x-%04x-%02x%02x-%04x%08x", (int)$timeLow, (int)substr($timeMid, 2) & 0xffff,
                    
115					mt_rand(0, 0xfff) | 0x4000, mt_rand(0, 0x3f) | 0x80, mt_rand(0, 0xff), $pid, $node);
                    
116
                    
                
string_helper.php https://github.com/cybertank378/IZARIAM.git | PHP | 288 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP 4.3.2 or newer
                    
6 *
                    
128 *
                    
129 * http://www.some-site.com//index.php
                    
130 *
                    
132 *
                    
133 * http://www.some-site.com/index.php
                    
134 *
                    
198		{
                    
199			case 'basic'	: return mt_rand();
                    
200			  break;
                    
220					{
                    
221						$str .= substr($pool, mt_rand(0, strlen($pool) -1), 1);
                    
222					}
                    
                
WindUtility.php git://github.com/phpwind/windframework.git | PHP | 245 lines
                    
1<?php
                    
2/**
                    
5 * @author Qiong Wu <papa0924@gmail.com>
                    
6 * @copyright ©2003-2103 phpwind.com
                    
7 * @license http://www.windframework.com
                    
111		for ($i = 0; $i < (int) $length; $i++) {
                    
112			$randnum = mt_rand(0, 61);
                    
113			if ($randnum < 10) {
                    
152	 * 
                    
153	 * 该函优化了php strtr()实现, 在进行数组方式的字符替换时支持了两种模式的字符替换:
                    
154	 * @example<pre>
                    
                
captcha_helper.php git://github.com/claudehohl/Stikked.git | PHP | 412 lines
                    
7 *
                    
8 * An open source application development framework for PHP 5.1.6 or newer
                    
9 *
                    
133
                    
134        // PHP.net recommends imagecreatetruecolor(), but it isn't always available
                    
135
                    
282            for ($i = 0; $i < 4; $i++) {
                    
283                $str .= substr($pool, mt_rand(0, strlen($pool) - 1), 1);
                    
284            }
                    
296        $x_axis = mt_rand(6, (360 / $length) - 16);
                    
297        $y_axis = ($angle >= 0) ? mt_rand($img_height, $img_width) : mt_rand(6, $img_height);
                    
298
                    
303
                    
304        // PHP.net recommends imagecreatetruecolor(), but it isn't always available
                    
305
                    
                
Simple.php git://github.com/centurion-project/Centurion.git | PHP | 117 lines
                    
1<?php
                    
2/**
                    
113        
                    
114        $this->_setPointer(mt_rand(1, $wordlen));
                    
115    }
                    
                
HttpClient.php git://github.com/moodle/moodle.git | PHP | 353 lines
                    
1<?php
                    
2/**
                    
25 */
                    
26require_once 'Zend/Http/Client.php';
                    
27
                    
100        if (!$fp) {
                    
101            require_once 'Zend/Gdata/App/InvalidArgumentException.php';
                    
102            throw new Zend_Gdata_App_InvalidArgumentException('Failed to open private key file for AuthSub.');
                    
115     *
                    
116     * In order to call this method, openssl must be enabled in your PHP
                    
117     * installation.  Otherwise, a Zend_Gdata_App_InvalidArgumentException
                    
126        if ($key != null && !function_exists('openssl_pkey_get_private')) {
                    
127            require_once 'Zend/Gdata/App/InvalidArgumentException.php';
                    
128            throw new Zend_Gdata_App_InvalidArgumentException(
                    
129                    'You cannot enable secure AuthSub if the openssl module ' .
                    
130                    'is not enabled in your PHP installation.');
                    
131        }
                    
                
helper.php https://bitbucket.org/asosso/joomla15.git | PHP | 391 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3* @version		$Id:helper.php 6961 2007-03-15 16:06:53Z tcp $
                    
4* @package		Joomla.Framework
                    
6* @copyright	Copyright (C) 2005 - 2012 Open Source Matters. All rights reserved.
                    
7* @license		GNU/GPL, see LICENSE.php
                    
8* Joomla! is free software. This version may have been modified pursuant
                    
11* other free or open source software licenses.
                    
12* See COPYRIGHT.php for copyright notices and details.
                    
13*/
                    
210				} else {
                    
211					return substr(md5(mt_rand()), 0, 2);
                    
212				}
                    
218				} else {
                    
219					return '$1$'.substr(md5(mt_rand()), 0, 8).'$';
                    
220				}
                    
                
DirectoryResourceTest.php git://github.com/fabpot/symfony.git | PHP | 181 lines
                    
1<?php
                    
2
                    
13
                    
14use PHPUnit\Framework\TestCase;
                    
15use Symfony\Component\Config\Resource\DirectoryResource;
                    
69        $this->expectExceptionMessageMatches('/The directory ".*" does not exist./');
                    
70        new DirectoryResource('/____foo/foobar'.mt_rand(1, 999999));
                    
71    }
                    
                
IntegrationTest.php git://github.com/drupal/drupal.git | PHP | 142 lines
                    
1<?php
                    
2
                    
90      $values['fid'] = $feed->id();
                    
91      $values['timestamp'] = mt_rand(REQUEST_TIME - 10, REQUEST_TIME + 10);
                    
92      $values['title'] = $this->randomMachineName();
                    
95      $values['author'] = $this->randomMachineName() . '<img src="http://example.com/example.png" \>"';
                    
96      $values['link'] = 'https://www.drupal.org/node/' . mt_rand(1000, 10000);
                    
97      $values['guid'] = $this->randomString();
                    
                
captcha.php http://lansuite.googlecode.com/svn/trunk/ | PHP | 43 lines
                    
1<?php
                    
2
                    
7  mt_srand((double)microtime()*1000000);
                    
8  $auth_code = mt_rand(1000, 99999);
                    
9  $auth_code = md5($auth_code);
                    
18  $text_color   = imagecolorallocate($image, 0, 0, 0);
                    
19  $rand1_h = mt_rand(1, $height);
                    
20  $rand2_h = mt_rand(1, $height);
                    
20  $rand2_h = mt_rand(1, $height);
                    
21  $rand3_h = mt_rand(1, $height);
                    
22  $rand4_h = mt_rand(1, $height);
                    
22  $rand4_h = mt_rand(1, $height);
                    
23  $rand1_v = mt_rand(1, $width);
                    
24  $rand2_v = mt_rand(1, $width);
                    
34  imageline($image, $rand4_v, 0, $rand4_v, 50, $line_color);
                    
35  imagefilledellipse($image, mt_rand(0, 100), mt_rand(0, 40), mt_rand(10, 40), mt_rand(10, 25), $elpise_color);
                    
36  imagefilledellipse($image, mt_rand(0, 100), mt_rand(0, 40), mt_rand(20, 40), mt_rand(10, 25), $elpise_color);
                    
                
form.php git://git.savannah.nongnu.org/savane-cleanup.git | PHP | 194 lines
                    
1<?php
                    
2# <one line to give a brief idea of what this does.>
                    
21
                    
22require_once(dirname(__FILE__).'/dnsbl.php');
                    
23require_once(dirname(__FILE__).'/spam.php');
                    
40      mt_srand((double)microtime()*1000000);
                    
41      $form_id=md5(mt_rand(0,1000000));
                    
42    }
                    
                
HttpClient.php git://github.com/pmjones/php-framework-benchmarks.git | PHP | 352 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: HttpClient.php 20096 2010-01-06 02:05:09Z bkarwin $
                    
21 */
                    
25 */
                    
26require_once 'Zend/Http/Client.php';
                    
27
                    
100        if (!$fp) {
                    
101            require_once 'Zend/Gdata/App/InvalidArgumentException.php';
                    
102            throw new Zend_Gdata_App_InvalidArgumentException('Failed to open private key file for AuthSub.');
                    
115     *
                    
116     * In order to call this method, openssl must be enabled in your PHP
                    
117     * installation.  Otherwise, a Zend_Gdata_App_InvalidArgumentException
                    
126        if ($key != null && !function_exists('openssl_pkey_get_private')) {
                    
127            require_once 'Zend/Gdata/App/InvalidArgumentException.php';
                    
128            throw new Zend_Gdata_App_InvalidArgumentException(
                    
                
utils.php https://github.com/crazyboymx/lianchezu.git | PHP | 342 lines
                    
1<?php
                    
2/*
                    
124	$params["oauth_timestamp"]        = time();
                    
125	$params["oauth_nonce"]            = mt_rand();
                    
126	$params["oauth_consumer_key"]     = $appid;
                    
134
                    
135	//签名,确保php版本支持hash_hmac函数
                    
136	$key = $appkey."&".$access_token_secret;
                    
164	$params["oauth_timestamp"]        = time();
                    
165	$params["oauth_nonce"]            = mt_rand();
                    
166	$params["oauth_consumer_key"]     = $appid;
                    
185
                    
186	//签名,需要确保php版本支持hash_hmac函数
                    
187	$key = $appkey."&".$access_token_secret;
                    
230	$params["oauth_timestamp"]        = time();
                    
231	$params["oauth_nonce"]            = mt_rand();
                    
232	$params["oauth_consumer_key"]     = $appid;
                    
                
CacheBase.php git://github.com/moodle/moodle.git | PHP | 369 lines
                    
3/**
                    
4 * PHPExcel_CachedObjectStorage_CacheBase
                    
5 *
                    
21 *
                    
22 * @category   PHPExcel
                    
23 * @package    PHPExcel_CachedObjectStorage
                    
23 * @package    PHPExcel_CachedObjectStorage
                    
24 * @copyright  Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
                    
25 * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
                    
81     *
                    
82     * @return    PHPExcel_Worksheet
                    
83     */
                    
311     *
                    
312     * @param    PHPExcel_Worksheet    $parent        The new worksheet
                    
313     * @return    void
                    
                
UserActions.php https://bitbucket.org/sean111/ebot | PHP | 104 lines
                    
1<?php
                    
2Class UserActions extends eBot {
                    
51		if(empty($r)) {
                    
52			$r=mt_rand(0,sizeof($data)-1);
                    
53        }
                    
                
ParallelTasks.php git://github.com/shaneharter/PHP-Daemon.git | PHP | 75 lines
                    
1<?php
                    
2
                    
35        // Randomly Create Background Tasks
                    
36        if (mt_rand(1, 20) == 1) {
                    
37            $this->log("Creating Sleepy Task");
                    
40
                    
41        if (mt_rand(1, 40) == 1) {
                    
42            $sleepfor = mt_rand(60, 180);
                    
46        // Randomly Shut Down -- Demonstrate daemon shutdown behavior while background tasks are running
                    
47        if (mt_rand(1, 1000) == 1) {
                    
48            $this->log("Shutting Down..");
                    
                
functions.php http://section-cms.googlecode.com/svn/trunk/ | PHP | 292 lines
                    
1<?php
                    
2// Buffer Function
                    
132{
                    
133    // Define Vars so PHP Would not Print Errors
                    
134    $build = '';
                    
148        // Random Number Between 1 and amount of characters in alpha
                    
149        $r = mt_rand(0, strlen($chars[$type])-1);
                    
150        
                    
241            
                    
242            if($file != '.' && $file != '..' && $file != 'modinit.php' && $pos === false)
                    
243            {
                    
246                $trap[] = array(
                    
247                    0 => 'modules/'.$tmp[0].'.php',
                    
248                    1 => $tmp[0]
                    
                
movshare.net_member.php http://rapidleech.googlecode.com/svn/trunk/ | PHP | 117 lines
                    
30</form>
                    
31<?php
                    
32}
                    
41<div id=login width=100% align=center>Login to www.movshare.net</div>
                    
42<?php
                    
43			
                    
48			$post['Submit'] = "Submit";
                    
49			$page = geturl("movshare.net", 80, "/login.php", 0, 0, $post, 0, $_GET["proxy"], $pauth);
                    
50			is_page($page);
                    
56			
                    
57			$page = geturl("movshare.net", 80, "/panel.php", "http://movshare.net/login.php", $cookies, 0, 0, "");
                    
58			is_page($page);
                    
63<div id=info width=100% align=center>Retrive upload ID</div>
                    
64<?php
                    
65	$ref='http://www.movshare.net/';
                    
                
CryptUtil.php git://github.com/vanillaforums/Garden.git | PHP | 109 lines
                    
1<?php
                    
2
                    
6 *
                    
7 * PHP versions 4 and 5
                    
8 *
                    
59            for ($i = 0; $i < $num_bytes; $i += 4) {
                    
60                $bytes .= pack('L', mt_rand());
                    
61            }
                    
                
archives_add.php http://jqbird.googlecode.com/svn/trunk/ | PHP | 234 lines
                    
1<?php
                    
2require_once(dirname(__FILE__).'/config.php');
                    
3CheckPurview('a_New,a_AccNew');
                    
4require_once(DEDEINC.'/customfields.func.php');
                    
5require_once(DEDEADMIN.'/inc/inc_archives_functions.php');
                    
12{
                    
13	require_once(DEDEINC.'/dedetag.class.php');
                    
14	require_once(DEDEADMIN.'/inc/inc_catalog_options.php');
                    
48	
                    
49	require_once(DEDEINC.'/image.func.php');
                    
50	require_once(DEDEINC.'/oxwindow.class.php');
                    
53	$notpost = isset($notpost) && $notpost == 1 ? 1: 0;
                    
54	if(empty($click)) $click = ($cfg_arc_click=='-1' ? mt_rand(50, 200) : $cfg_arc_click);
                    
55
                    
207	{
                    
208		$artUrl = $cfg_phpurl."/view.php?aid=$arcID";
                    
209	}
                    
                
password_compat.php https://bitbucket.org/trujka/game-services | PHP | 221 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * A Compatibility library with PHP 5.5's simplified password hashing API.
                    
4 *
                    
4 *
                    
5 * @author Anthony Ferrara <ircmaxell@php.net>
                    
6 * @license http://www.opensource.org/licenses/mit-license.html MIT License
                    
39            case PASSWORD_BCRYPT:
                    
40                // Note that this is a C constant, but not exposed to PHP, so we don't define it here.
                    
41                $cost = 10;
                    
115                    if ($i < $bl) {
                    
116                        $buffer[$i] = $buffer[$i] ^ chr(mt_rand(0, 255));
                    
117                    } else {
                    
117                    } else {
                    
118                        $buffer .= chr(mt_rand(0, 255));
                    
119                    }
                    
                
Rand.php git://github.com/zendframework/zf2.git | PHP | 213 lines
                    
1<?php
                    
2/**
                    
26    /**
                    
27     * Generate random bytes using OpenSSL or Mcrypt and mt_rand() as fallback
                    
28     *
                    
57            throw new Exception\RuntimeException(
                    
58                'This PHP environment doesn\'t support secure random number generation. ' .
                    
59                'Please consider installing the OpenSSL and/or Mcrypt extensions'
                    
122            return $max;
                    
123        } elseif ($range > PHP_INT_MAX || is_float($range)) {
                    
124            throw new Exception\DomainException(
                    
152     *
                    
153     * PHP uses double precision floating-point format (64-bit) which has
                    
154     * 52-bits of significand precision. We gather 7 bytes of random data,
                    
                
lib.image.text.class.php http://php-ppcms.googlecode.com/svn/trunk/ | PHP | 333 lines
                    
1<?php
                    
2/***************************************************************
                    
121        // Foreground color
                    
122        $color           = $this->colors[mt_rand(0, sizeof($this->colors)-1)];
                    
123        $this->GdFgColor = imagecolorallocate($this->im, $color[0], $color[1], $color[2]);
                    
                
openlayers.render.inc https://bitbucket.org/niccolo/open-outreach-rc9-radix-bootswatch.git | Pascal | 228 lines
                    
1<?php
                    
2
                    
199function _openlayers_create_map_id() {
                    
200  return 'openlayers-map-' . substr(md5(uniqid(mt_rand())), 0, 8);
                    
201}
                    
                
AggregateCache.class.php git://github.com/onPHP/onphp-framework.git | PHP | 130 lines
                    
1<?php
                    
2/****************************************************************************
                    
89				$selectedLabel =
                    
90					$zeroDistances[mt_rand(0, count($zeroDistances) - 1)];
                    
91
                    
94				// weighted random level selection
                    
95				$sum = mt_rand() * array_sum($weights) / mt_getrandmax();
                    
96				$peerLevel = null;
                    
110
                    
111				$selectedLabel = $selectedPeers[mt_rand(0, count($selectedPeers) - 1)];
                    
112			}
                    
                
app.php https://github.com/sook/drumon_framework.git | PHP | 442 lines
                    
1<?php
                    
2/**
                    
102		
                    
103		include(APP_PATH.'/config/routes.php');
                    
104		include(APP_PATH.'/config/application.php');
                    
104		include(APP_PATH.'/config/application.php');
                    
105		include(APP_PATH.'/config/enviroments/'.$app->config['env'] . '.php');
                    
106		
                    
117		foreach ($app->plugins as $plugin) {
                    
118			require_once(APP_PATH.'/vendor/plugins/' . $plugin . '/init.php');
                    
119		}
                    
124		// Required files for Drumon
                    
125		include(CORE_PATH . '/class/request.php');
                    
126		include(CORE_PATH . '/class/response.php');
                    
126		include(CORE_PATH . '/class/response.php');
                    
127		include(CORE_PATH . '/class/helper.php');
                    
128		include(CORE_PATH . '/class/view.php');
                    
                
NotesDemoDataMaker.php https://bitbucket.org/zurmo/zurmo/ | PHP | 92 lines
                    
1<?php
                    
2    /*********************************************************************************
                    
84            $description               = RandomDataUtil::getRandomValueFromArray($taskRandomData['descriptions']);
                    
85            $occurredOnTimeStamp       = time() - (mt_rand(1, 200) * 60 * 60 * 24);
                    
86            $occurredOnDateTime        = DateTimeUtil::convertTimestampToDbFormatDateTime($occurredOnTimeStamp);
                    
                
change_problem.class.php git://pkgs.fedoraproject.org/glpi | PHP | 234 lines
                    
1<?php
                    
2/*
                    
2/*
                    
3 * @version $Id: change_problem.class.php 18771 2012-06-29 08:49:19Z moyo $
                    
4 -------------------------------------------------------------------------
                    
83      $canedit = $problem->can($ID,'w');
                    
84      $rand    = mt_rand();
                    
85      echo "<form name='changeproblem_form$rand' id='changeproblem_form$rand' method='post'
                    
169      $canedit = $change->can($ID,'w');
                    
170      $rand    = mt_rand();
                    
171      echo "<form name='changeproblem_form$rand' id='changeproblem_form$rand' method='post'
                    
                
form.inc https://github.com/seanberto/watershednow.git | Pascal | 302 lines
                    
1<?php
                    
2// $Id: form.inc,v 1.11.2.1 2010/01/05 01:33:46 merlinofchaos Exp $
                    
48      $form = call_user_func_array('drupal_retrieve_form', $args_temp);
                    
49      $form_build_id = 'form-' . md5(mt_rand());
                    
50      $form['#build_id'] = $form_build_id;
                    
124    // We need a new build_id for the new version of the form.
                    
125    $form_build_id = 'form-' . md5(mt_rand());
                    
126  }
                    
                
NonExecutableCodeUnitTest.inc git://github.com/squizlabs/PHP_CodeSniffer.git | PHP | 165 lines
                    
1<?php
                    
2switch ($var) {
                    
103        function() {
                    
104            return mt_rand(-1, 1);
                    
105            echo 'done';
                    
                
BaseTest.php https://bitbucket.org/webvariants/babelcache | PHP | 249 lines
                    
1<?php
                    
2/*
                    
7 *
                    
8 * http://www.opensource.org/licenses/mit-license.php
                    
9 */
                    
10
                    
11abstract class Cache_BaseTest extends PHPUnit_Framework_TestCase {
                    
12	abstract protected function getCache();
                    
84		$cache = $this->getCache();
                    
85		$l1    = 't.AA_'.mt_rand().'_AA';
                    
86		$l2    = $l1.'.BB_'.mt_rand().'_BB';
                    
86		$l2    = $l1.'.BB_'.mt_rand().'_BB';
                    
87		$l3    = $l2.'.CC_'.mt_rand().'_CC';
                    
88
                    
                
common.php http://thinkphp.googlecode.com/svn/trunk/ | PHP | 286 lines
                    
1<?php
                    
2// +----------------------------------------------------------------------
                    
2// +----------------------------------------------------------------------
                    
3// | ThinkPHP
                    
4// +----------------------------------------------------------------------
                    
4// +----------------------------------------------------------------------
                    
5// | Copyright (c) 2007 http://thinkphp.cn All rights reserved.
                    
6// +----------------------------------------------------------------------
                    
10// +----------------------------------------------------------------------
                    
11// $Id: common.php 2601 2012-01-15 04:59:14Z liu21st $
                    
12
                    
45	// ?????????
                    
46	$content = "<?php\nreturn " . var_export ( array_change_key_case ( $data, CASE_UPPER ), true ) . ";\n?>";
                    
47	file_put_contents ( $savefile, $content );
                    
50function cmsgetcache($name = '') {
                    
51	return DATA_PATH . '~' . strtolower ( $name ) . '.php';
                    
52}
                    
                
mysqli_stmt_bind_result.php git://github.com/facebook/hiphop-php.git | PHP | 298 lines
                    
3
                    
4	$hint_str_or_unicode = (version_compare(PHP_VERSION, '5.9.9', '>') == 1) ? "unicode":"string";
                    
5
                    
164
                    
165	func_mysqli_stmt_bind_result($link, $engine, "i", "INTEGER", (defined("PHP_INT_MAX")) ? max(-1 * PHP_INT_MAX + 1, -2147483648) : 1, 380);
                    
166	func_mysqli_stmt_bind_result($link, $engine, "i", "INTEGER", -2147483647, 400, "integer");
                    
166	func_mysqli_stmt_bind_result($link, $engine, "i", "INTEGER", -2147483647, 400, "integer");
                    
167	func_mysqli_stmt_bind_result($link, $engine, "i", "INTEGER", (defined("PHP_INT_MAX")) ? min(2147483647, PHP_INT_MAX) : 1, 420);
                    
168	func_mysqli_stmt_bind_result($link, $engine, "i", "INTEGER", NULL, 440);
                    
169	func_mysqli_stmt_bind_result($link, $engine, "i", "INTEGER UNSIGNED", (defined("PHP_INT_MAX")) ? min(4294967295, 2147483647) : 1, 460);
                    
170	func_mysqli_stmt_bind_result($link, $engine, "i", "INTEGER UNSIGNED", 4294967295, 480, (defined("PHP_INT_MAX") && (4294967295 > PHP_INT_MAX)) ? "string" : null);
                    
171	func_mysqli_stmt_bind_result($link, $engine, "i", "INTEGER UNSIGNED", NULL, 500);
                    
263
                    
264	/* Is this one related? http://bugs.php.net/bug.php?id=35759 */
                    
265	if (($IS_MYSQLND) || (!$IS_MYSQLND && (ini_get('memory_limit') > 4294967296))) {
                    
                
freakshare.net_member.php http://rapidleech.googlecode.com/svn/trunk/ | PHP | 104 lines
                    
26</form>
                    
27<?php
                    
28}
                    
37<div id=login width=100% align=center>Login to freakshare.com</div>
                    
38<?php
                    
39			$post['user'] = $_REQUEST['login'];
                    
53<div id=info width=100% align=center>Retrive upload ID</div>
                    
54<?php
                    
55
                    
62	$upfrm = cut_str($upfrm0,'<form action="','"');
                    
63	$refup = cut_str($upfrm0,'<form action="','/upload.php');
                    
64	
                    
78	is_page($upfiles);
                    
79	$rand = mt_rand();
                    
80	$id = time().'+'.(rand() * 1000000);
                    
                
Model.php git://github.com/forkcms/forkcms.git | PHP | 471 lines
                    
1<?php
                    
2
                    
129    /**
                    
130     * Encrypt the password with PHP password_hash function.
                    
131     *
                    
141    /**
                    
142     * Verify the password with PHP password_verify function.
                    
143     *
                    
228            // random index
                    
229            $index = mt_rand(0, mb_strlen($characters) - 1);
                    
230
                    
                
String.class.php http://thinkphp.googlecode.com/svn/trunk/ | PHP | 282 lines
                    
1<?php
                    
2// +----------------------------------------------------------------------
                    
2// +----------------------------------------------------------------------
                    
3// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
                    
4// +----------------------------------------------------------------------
                    
4// +----------------------------------------------------------------------
                    
5// | Copyright (c) 2009 http://thinkphp.cn All rights reserved.
                    
6// +----------------------------------------------------------------------
                    
10// +----------------------------------------------------------------------
                    
11// $Id: String.class.php 2601 2012-01-15 04:59:14Z liu21st $
                    
12
                    
24	 static public function uuid() {
                    
25        $charid = md5(uniqid(mt_rand(), true));
                    
26        $hyphen = chr(45);// "-"
                    
159			for($i=0;$i<$len;$i++){
                    
160			  $str.= self::msubstr($chars, floor(mt_rand(0,mb_strlen($chars,'utf-8')-1)),1);
                    
161			}
                    
                
Cache.php git://github.com/composer/composer.git | PHP | 257 lines
                    
1<?php
                    
2
                    
173    {
                    
174        return (!self::$cacheCollected && !mt_rand(0, 50));
                    
175    }
                    
                
AbstractMessage.php git://github.com/eryx/php-framework-benchmark.git | PHP | 97 lines
                    
1<?php
                    
2/**
                    
85            '%08X-%04X-%04X-%02X%02X-%012X',
                    
86            mt_rand(),
                    
87            mt_rand(0, 65535),
                    
88            bindec(substr_replace(
                    
89                sprintf('%016b', mt_rand(0, 65535)), '0100', 11, 4)
                    
90            ),
                    
90            ),
                    
91            bindec(substr_replace(sprintf('%08b', mt_rand(0, 255)), '01', 5, 2)),
                    
92            mt_rand(0, 255),
                    
92            mt_rand(0, 255),
                    
93            mt_rand()
                    
94        );
                    
                
payload.php git://github.com/ericbarnes/Status-Board.git | PHP | 346 lines
                    
1<?php namespace Laravel\Session;
                    
2
                    
312
                    
313		if ($this->driver instanceof Sweeper and (mt_rand(1, $sweepage[1]) <= $sweepage[0]))
                    
314		{
                    
                
randomchars.php https://code.google.com/p/prjtest00/ | PHP | 71 lines
                    
1<?php
                    
2############################################################################
                    
61while ($counter <= $key) {
                    
62$target = mt_rand(1,35);
                    
63//echo $target;
                    
                
attachment.php git://pkgs.fedoraproject.org/imp | PHP | 146 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * $Horde: imp/attachment.php,v 2.5.10.23 2010/10/01 07:11:22 slusarz Exp $
                    
4 *
                    
16// Set up initial includes.
                    
17// This does *not* include IMP's base.php because we do not need to be
                    
18// authenticated to get the file. Most users won't send linked
                    
23@define('IMP_BASE', dirname(__FILE__));
                    
24require_once HORDE_BASE . '/lib/core.php';
                    
25require_once IMP_BASE . '/lib/Compose.php';
                    
25require_once IMP_BASE . '/lib/Compose.php';
                    
26require_once 'Horde/MIME/Magic.php';
                    
27require_once 'VFS.php';
                    
77        /* Create a random identifier for this file. */
                    
78        $id = base_convert($file_name . mt_rand(), 10, 36);
                    
79        $res = $vfsroot->writeData($full_path, $file_name . '.notify' , $id, true);
                    
                
Parser.php https://bitbucket.org/bekromer/lange-naechte.git | PHP | 396 lines
                    
1<?php
                    
2
                    
52    {
                    
53        return sprintf('__internal_%s', hash('sha1', uniqid(mt_rand(), true), false));
                    
54    }
                    
288    {
                    
289        $template->setIndex(mt_rand());
                    
290
                    
                
rand.c git://github.com/php/php-src.git | C | 68 lines
                    
26#include "php_rand.h"
                    
27#include "php_mt_rand.h"
                    
28
                    
30 */
                    
31PHPAPI void php_srand(zend_long seed)
                    
32{
                    
38 */
                    
39PHPAPI zend_long php_rand(void)
                    
40{
                    
53	if (argc == 0) {
                    
54		RETURN_LONG(php_mt_rand() >> 1);
                    
55	}
                    
62	if (max < min) {
                    
63		RETURN_LONG(php_mt_rand_common(max, min));
                    
64	}
                    
                
member_do.php http://jqbird.googlecode.com/svn/trunk/ | PHP | 289 lines
                    
1<?php
                    
2require_once(dirname(__FILE__)."/config.php");
                    
2require_once(dirname(__FILE__)."/config.php");
                    
3require_once(DEDEINC."/oxwindow.class.php");
                    
4if(empty($dopost))
                    
11}
                    
12$ENV_GOBACK_URL = isset($_COOKIE['ENV_GOBACK_URL']) ? 'member_main.php' : '';
                    
13
                    
26		{
                    
27			ShowMsg("????????????","member_do.php?id={$id}&dopost=delmember");
                    
28			exit();
                    
62				#api{{
                    
63				if(defined('UC_API') && @include_once DEDEROOT.'/uc_client/client.php')	{
                    
64	        $infofromuc=uc_get_user($row['userid']);
                    
77	}
                    
78	$randcode = mt_rand(10000,99999);
                    
79	$safecode = substr(md5($cfg_cookie_encode.$randcode),0,24);
                    
                
math_wrappers.cpp https://bitbucket.org/asuhan/happy/ | C++ | 627 lines
                    
10  // TODO: assert that number of parameters is large enough
                    
11  ASSIGN_RETURN_VALUE(HPHP::f_pi());
                    
12 }
                    
20  // TODO: assert that enough arguments are in
                    
21  HPHP::Variant a0(params[0]);
                    
22  HPHP::Array p;
                    
598  if (param_count == 0) {
                    
599   ASSIGN_RETURN_VALUE(HPHP::f_mt_rand());
                    
600  } else {
                    
602   if (param_count == 1) {
                    
603    ASSIGN_RETURN_VALUE(HPHP::f_mt_rand(a0));
                    
604   } else {
                    
606    // TODO: assert that number of parameters is large enough
                    
607    ASSIGN_RETURN_VALUE(HPHP::f_mt_rand(a0, a1));
                    
608   }
                    
                
captcha_helper.php https://bitbucket.org/xperez/codeigniter-cross-modular-extensions-xhmvc | 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			}
                    
133		// Create image
                    
134		// PHP.net recommends imagecreatetruecolor(), but it isn't always available
                    
135		$im = function_exists('imagecreatetruecolor')
                    
226
                    
227/* End of file captcha_helper.php */
                    
228/* Location: ./system/helpers/captcha_helper.php */
                    
                
crypt.php git://github.com/joomla/joomla-platform.git | PHP | 246 lines
                    
1<?php
                    
2/**
                    
122		 * if a secure randomness generator exists and we don't
                    
123		 * have a buggy PHP version use it.
                    
124		 */
                    
125		if (function_exists('openssl_random_pseudo_bytes')
                    
126			&& (version_compare(PHP_VERSION, '5.3.4') >= 0 || IS_WIN))
                    
127		{
                    
149
                    
150		// This is PHP 5.3.3 and up
                    
151		if (function_exists('stream_set_read_buffer') && @is_readable('/dev/urandom'))
                    
165			/*
                    
166			 * Collect any entropy available from the PHP system and filesystem.
                    
167			 * If we have ssl data that isn't strong, we use it once.
                    
168			 */
                    
169			$entropy = rand() . uniqid(mt_rand(), true) . $sslStr;
                    
170			$entropy .= implode('', @fstat(fopen(__FILE__, 'r')));
                    
                
String.class.php https://hg.codeplex.com/school15 | PHP | 282 lines
                    
1<?php
                    
2// +----------------------------------------------------------------------
                    
2// +----------------------------------------------------------------------
                    
3// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
                    
4// +----------------------------------------------------------------------
                    
4// +----------------------------------------------------------------------
                    
5// | Copyright (c) 2009 http://thinkphp.cn All rights reserved.
                    
6// +----------------------------------------------------------------------
                    
10// +----------------------------------------------------------------------
                    
11// $Id: String.class.php 2661 2012-01-26 03:00:18Z liu21st $
                    
12
                    
24	 static public function uuid() {
                    
25        $charid = md5(uniqid(mt_rand(), true));
                    
26        $hyphen = chr(45);// "-"
                    
159			for($i=0;$i<$len;$i++){
                    
160			  $str.= self::msubstr($chars, floor(mt_rand(0,mb_strlen($chars,'utf-8')-1)),1,'utf-8',false);
                    
161			}
                    
                
InfoWindow.php https://bitbucket.org/webvariants/wvmaps | PHP | 128 lines
                    
1<?php
                    
2/*
                    
7 *
                    
8 * http://www.opensource.org/licenses/mit-license.php
                    
9 */
                    
35		$this->zIndex         = null;
                    
36		$this->id             = md5($content.mt_rand(0, 1000));
                    
37
                    
                
Remember.php https://bitbucket.org/studiobreakfast/sync.git | PHP | 328 lines
                    
1<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2
                    
271	{
                    
272		return sha1(uniqid(mt_rand(), TRUE));
                    
273	}
                    
326
                    
327/* End of file Remember.php */
                    
328/* Location: ./system/expressionengine/libraries/Remember.php */
                    
                
login.php https://bitbucket.org/seezoo/seezoo/ | PHP | 262 lines
                    
1<?php
                    
2/**
                    
118	{
                    
119		$ticket = md5(uniqid(mt_rand(), TRUE));
                    
120		$this->session->set_userdata($this->ticket_name, $ticket);
                    
245		// load mail library
                    
246		require_once('qdmail.php');
                    
247		// set multibyte japanese
                    
                
admin.php git://github.com/wordpress/wordpress.git | PHP | 402 lines
                    
163 * Note, this does not just run on user-facing admin screens.
                    
164 * It runs on admin-ajax.php and admin-post.php as well.
                    
165 *
                    
376		} elseif ( 'post.php' === $pagenow ) {
                    
377			do_action( 'load-page.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
                    
378		}
                    
380		if ( 'category' === $taxnow ) {
                    
381			do_action( 'load-categories.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
                    
382		} elseif ( 'link_category' === $taxnow ) {
                    
382		} elseif ( 'link_category' === $taxnow ) {
                    
383			do_action( 'load-edit-link-categories.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
                    
384		}
                    
385	} elseif ( 'term.php' === $pagenow ) {
                    
386		do_action( 'load-edit-tags.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
                    
387	}
                    
                
share-stress-test.php git://pkgs.fedoraproject.org/horde | PHP | 175 lines
                    
1#!/usr/bin/env php
                    
2<?php
                    
7// Do CLI checks and environment setup first.
                    
8require_once HORDE_BASE . '/lib/core.php';
                    
9require_once 'Horde/CLI.php';
                    
20// Include needed libraries.
                    
21require_once HORDE_BASE . '/lib/base.php';
                    
22require_once 'Horde/Perms.php';
                    
22require_once 'Horde/Perms.php';
                    
23require_once 'Horde/Share.php';
                    
24require_once 'Horde/String.php';
                    
24require_once 'Horde/String.php';
                    
25require_once 'Benchmark/Timer.php';
                    
26require_once 'Console/Getopt.php';
                    
30$getopt = new Console_Getopt();
                    
31$argv = $getopt->readPHPArgv();
                    
32if (is_a($argv, 'PEAR_Error')) {
                    
                
RUCommon.php https://github.com/mvdkleijn/registered_users.git | PHP | 312 lines
                    
1<?php
                    
2
                    
213                for ($i=0; $i < $len; $i++) {
                    
214                    $str .= substr($pool, mt_rand(0, strlen($pool) -1), 1);
                    
215                }
                    
217                break;
                    
218            case 'unique' : return md5(uniqid(mt_rand()));
                    
219                break;
                    
                
CFileCache.php http://chenjin.googlecode.com/svn/trunk/ | PHP | 223 lines
                    
1<?php
                    
2/**
                    
23 * @author Qiang Xue <qiang.xue@gmail.com>
                    
24 * @version $Id: CFileCache.php 242 2012-03-29 15:18:01Z mole1230 $
                    
25 * @package system.caching
                    
126	{
                    
127		if(!$this->_gced && mt_rand(0,1000000)<$this->_gcProbability)
                    
128		{
                    
                
resend.php http://snowcms.googlecode.com/svn/trunk/ | PHP | 189 lines
                    
1<?php
                    
2////////////////////////////////////////////////////////////////////////////
                    
66		$form->add('resend_form', array(
                    
67																'action' => baseurl('index.php?action=resend'),
                    
68																'method' => 'post',
                    
142		{
                    
143			$errors[] = l('That account is already activated and you can <a href="%s">log in</a> if it is your account.', baseurl('index.php?action=login'));
                    
144
                    
154		// Well, let's regenerate your activation code.
                    
155		$member_acode = sha1($members->rand_str(mt_rand(30, 40)));
                    
156
                    
166		{
                    
167			require_once(coredir. '/register.php');
                    
168		}
                    
                
user_model.php https://github.com/mattwire/emoncms3.git | PHP | 291 lines
                    
1<?php
                    
2/*
                    
125  $hash = hash('sha256', $password);
                    
126  $string = md5(uniqid(mt_rand(), true));
                    
127  $salt = substr($string, 0, 3);
                    
129
                    
130  $apikey_write = md5(uniqid(mt_rand(), true));
                    
131  $apikey_read = md5(uniqid(mt_rand(), true));
                    
                
Encrypt.php https://bitbucket.org/redmallorca/ci2_system.git | PHP | 508 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP 5.1.6 or newer
                    
6 *
                    
246		{
                    
247			$rand .= mt_rand(0, mt_getrandmax());
                    
248		}
                    
506
                    
507/* End of file Encrypt.php */
                    
508/* Location: ./system/libraries/Encrypt.php */
                    
                
mapfile.php http://phpfor.googlecode.com/svn/trunk/ | PHP | 375 lines
                    
1<?php
                    
2define('DF_BEGIN',0);
                    
19        $this->infoKey = array('hs'=>1,'is'=>1,'bs'=>1,'seq'=>1,'maxsize'=>1);
                    
20        $this->pid = mt_rand(0,32768);
                    
21        $this->now = time();
                    
                
test_system_config.php http://buddypress-media.googlecode.com/svn/bp_media/trunk/ | PHP | 0 lines
                    
1<?php
                    
2
                    
80				$valid_types = array("bool", "int", "float", "string");
                    
81				$current_type = $valid_types[mt_rand(0,3)];
                    
82
                    
88						// Write a value to config class and original array
                    
89						$val = mt_rand(0,1);
                    
90						$val = (bool)$val;
                    
94						// Write a new value to the $post_array, $check_array, and $names_array
                    
95						$val = mt_rand(0,1);
                    
96						$val = (bool)$val;
                    
105						// Write a value to config class and original array
                    
106						$val = mt_rand(-2000000,2000000);
                    
107						$val = (int)$val;
                    
111						// Write a new value to the $post_array, $check_array, and $names_array
                    
112						$val = mt_rand(-2000000,2000000);
                    
113						$val = (int)$val;
                    
                
lmbIniTest.class.php git://github.com/limb-php-framework/limb.git | PHP | 378 lines
                    
1<?php
                    
2/*
                    
2/*
                    
3 * Limb PHP Framework
                    
4 *
                    
8 */
                    
9lmb_require('limb/config/src/lmbIni.class.php');
                    
10lmb_require('limb/fs/src/lmbFs.class.php');
                    
27  {
                    
28    file_put_contents($file = lmb_var_dir() . '/tmp_ini/' . mt_rand() . '.ini', $contents);
                    
29    return new lmbIni($file);
                    
                
Checkbox.php http://devj.googlecode.com/svn/trunk/ | PHP | 117 lines
                    
1<?php
                    
2/**
                    
92		if (empty($name)) {
                    
93			$id = $name.'_'.mt_rand(0,99);
                    
94		}
                    
                
Attribute.php git://github.com/zendframework/zf2.git | PHP | 371 lines
                    
1<?php
                    
2/**
                    
257            case self::PASSWORD_HASH_SSHA:
                    
258                $salt    = substr(sha1(uniqid(mt_rand(), true), true), 0, 4);
                    
259                $rawHash = sha1($password . $salt, true) . $salt;
                    
266            case self::PASSWORD_HASH_SMD5:
                    
267                $salt    = substr(sha1(uniqid(mt_rand(), true), true), 0, 4);
                    
268                $rawHash = md5($password . $salt, true) . $salt;
                    
                
UpdateApiEntityDefinitionUpdateTest.php git://github.com/drupal/drupal.git | PHP | 210 lines
                    
1<?php
                    
2
                    
56    // Create a test entity.
                    
57    $user_ids = [mt_rand(), mt_rand()];
                    
58    $entity = EntityTest::create(['name' => $this->randomString(), 'user_id' => $user_ids]);
                    
107    // Create a test entity.
                    
108    $user_ids = [mt_rand(), mt_rand()];
                    
109    $entity = EntityTest::create(['name' => $this->randomString(), 'user_id' => $user_ids]);
                    
138    // Create a test entity.
                    
139    $entity = EntityTest::create(['name' => $this->randomString(), 'user_id' => mt_rand()]);
                    
140    $entity->save();
                    
                
file.php http://webbudget.googlecode.com/svn/trunk/ | PHP | 202 lines
                    
1<?php
                    
2require_once "json.php";
                    
2require_once "json.php";
                    
3require_once "xml.php";
                    
4require_once "session.php";
                    
4require_once "session.php";
                    
5require_once "message.php";
                    
6class NewBudget_File{
                    
24			return array("result"=>0,"reason"=>"???????????");//0:failure 1:success
                    
25		$fileName=chr(mt_rand(65,90)).chr(mt_rand(65,90)).chr(mt_rand(65,90)).mktime();
                    
26		mkdir("../db/budget/".$fileName,0766);//copy from book/oiltest/*.xml
                    
                
encryption.php git://github.com/jawngee/HeavyMetal.git | PHP | 214 lines
                    
39 * 
                    
40 * http://www.opensource.org/licenses/bsd-license.php
                    
41 */
                    
49 * @subpackage	utility
                    
50 * @link          http://wiki.getheavy.info/index.php/Encryption
                    
51 */
                    
147		while (strlen($rand) < 32)
                    
148			$rand .= mt_rand(0, mt_getrandmax());
                    
149
                    
                
C4Masterserver.php https://bitbucket.org/mortimer/openclonk2 | PHP | 200 lines
                    
1<?php
                    
2
                    
136          }
                    
137          $csid = sha1(uniqid(mt_rand(), true));
                    
138          mysql_query('INSERT INTO `' . ParseINI::parseValue('mysql_prefix', $this->config) . 'games` (`id`, `ip`,`csid`, `data`, `start`, `time`, `valid`) VALUES (\'\', \'' . $_SERVER['REMOTE_ADDR'] . '\', \'' . $csid . '\', \'' . $reference . '\', \'' . time() . '\', \'' . time() . '\', \'1\')', $this->link);
                    
                
Common.php git://github.com/imagecms/ImageCMS.git | PHP | 560 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
43	{
                    
44		static $_is_php;
                    
45		$version = (string)$version;
                    
48		{
                    
49			$_is_php[$version] = (version_compare(PHP_VERSION, $version) < 0) ? FALSE : TRUE;
                    
50		}
                    
81		{
                    
82			$file = rtrim($file, '/').'/'.md5(mt_rand(1,100).mt_rand(1,100));
                    
83
                    
165			// self-referencing loop with the Excptions class
                    
166			exit('Unable to locate the specified class: '.$class.'.php');
                    
167		}
                    
559/* End of file Common.php */
                    
560/* Location: ./system/core/Common.php */
                    
                
apiBatchRequest.php https://github.com/HGF/CS440.git | PHP | 110 lines
                    
1<?php
                    
2/*
                    
28  public function __construct($boundary = false) {
                    
29    $boundary = (false == $boundary) ? mt_rand() : $boundary;
                    
30    $this->boundary = str_replace('"', '', $boundary);
                    
34    if (false == $key) {
                    
35      $key = mt_rand();
                    
36    }
                    
                
Word.php http://digitalus-site-manager.googlecode.com/svn/trunk/ | PHP | 357 lines
                    
1<?php
                    
2/**
                    
22/** Zend_Captcha_Base */
                    
23require_once 'Zend/Captcha/Base.php';
                    
24
                    
312    {
                    
313        return md5(mt_rand(0, 1000) . microtime(true));
                    
314    }
                    
                
general.php http://kv-webme.googlecode.com/svn/trunk/ | PHP | 258 lines
                    
1<?php
                    
2/**
                    
4	*
                    
5	* PHP version 5.3
                    
6	*
                    
97// { form
                    
98echo '<form method="post" action="siteoptions.php?page=general" enctype="mu'
                    
99	.'ltipart/form-data"><input type="hidden" name="MAX_FILE_SIZE" value="999'
                    
120if (file_exists(USERBASE.'/f/skin_files/logo.png')) {
                    
121	echo '<img src="/f/skin_files/logo.png?rand='.mt_rand(0, 9999).'" /><a hre'
                    
122		.'f="/ww.admin/siteoptions.php?action=remove_logo" onclick="return conf'
                    
131if (file_exists(USERBASE.'/f/skin_files/favicon.ico')) {
                    
132	echo '<img src="/f/skin_files/favicon.ico?rand='.mt_rand(0, 9999)
                    
133		.'" /><a href="/ww.admin/siteoptions.php?action=remove_favicon" '
                    
                
captcha.php https://code.google.com/p/ezrpg/ | PHP | 82 lines
                    
1<?php
                    
2define('IN_EZRPG', true);
                    
3
                    
4require_once('init.php');
                    
5
                    
7$code_length = 4;
                    
8$rand_start = mt_rand(0, 250);
                    
9$font = 'static/fonts/Capture_it.ttf';
                    
57
                    
58$angle = mt_rand(-3, 3);
                    
59$captchaImage = imagerotate($captchaImage, $angle, $backgroundColor);
                    
65{
                    
66    $xStart = mt_rand(0, $containerWidth);
                    
67    $yStart = mt_rand(0, $containerHeight);
                    
67    $yStart = mt_rand(0, $containerHeight);
                    
68    $xEnd = mt_rand(0, $containerWidth);
                    
69    $yEnd = mt_rand(0, $containerHeight);
                    
                
HttpClient.php https://bitbucket.org/skajdo/zf1.git | PHP | 353 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: HttpClient.php 24593 2012-01-05 20:35:02Z matthew $
                    
21 */
                    
25 */
                    
26//require_once 'Zend/Http/Client.php';
                    
27
                    
100        if (!$fp) {
                    
101            //require_once 'Zend/Gdata/App/InvalidArgumentException.php';
                    
102            throw new Zend_Gdata_App_InvalidArgumentException('Failed to open private key file for AuthSub.');
                    
115     *
                    
116     * In order to call this method, openssl must be enabled in your PHP
                    
117     * installation.  Otherwise, a Zend_Gdata_App_InvalidArgumentException
                    
126        if ($key != null && !function_exists('openssl_pkey_get_private')) {
                    
127            //require_once 'Zend/Gdata/App/InvalidArgumentException.php';
                    
128            throw new Zend_Gdata_App_InvalidArgumentException(
                    
                
Encrypt.php git://github.com/prashants/webzash.git | PHP | 484 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP 4.3.2 or newer
                    
6 *
                    
179		{
                    
180			$rand .= mt_rand(0, mt_getrandmax());
                    
181		}
                    
482
                    
483/* End of file Encrypt.php */
                    
484/* Location: ./system/libraries/Encrypt.php */
                    
                
cp_click.php https://zport.svn.codeplex.com/svn | PHP | 187 lines
                    
1<?php
                    
2/*
                    
3	[UCenter Home] (C) 2007-2008 Comsenz Inc.
                    
4	$Id: cp_blog.php 11934 2009-04-10 07:54:59Z liguode $
                    
5*/
                    
15//点击器
                    
16include_once(S_ROOT.'./data/data_click.php');
                    
17
                    
103			$fs['title_data'] = array(
                    
104				'touser' => "<a href=\"space.php?uid=$item[uid]\">{$_SN[$item['uid']]}</a>",
                    
105				'subject' => "<a href=\"space.php?uid=$item[uid]&do=blog&id=$item[blogid]\">$item[subject]</a>",
                    
108			$note_type = 'clickblog';
                    
109			$q_note = cplang('note_click_blog', array("space.php?uid=$item[uid]&do=blog&id=$item[blogid]", $item['subject']));
                    
110			break;
                    
113			$fs['title_data'] = array(
                    
114				'touser' => "<a href=\"space.php?uid=$item[uid]\">{$_SN[$item['uid']]}</a>",
                    
115				'subject' => "<a href=\"space.php?uid=$item[uid]&do=thread&id=$item[tid]\">$item[subject]</a>",
                    
                
tags.php git://github.com/MightyGorgon/icy_phoenix.git | PHP | 82 lines
                    
1<?php
                    
2/**
                    
6* @copyright (c) 2008 Icy Phoenix
                    
7* @license http://opensource.org/licenses/gpl-license.php GNU Public License
                    
8*
                    
53			$row_class = ip_zebra_rows($row_class);
                    
54			$tag_font_size = intval(mt_rand(8, 12));
                    
55			$template->assign_block_vars('tags_loop', array(
                    
                
view_render_php.php http://enaj.googlecode.com/svn/trunk/ | PHP | 479 lines
                    
1<?php
                    
2// $Id: view_render_php.php 2445 2009-04-27 08:12:19Z dualface $
                    
3
                    
9 * @license New BSD License {@link http://qeephp.com/license/}
                    
10 * @version $Id: view_render_php.php 2445 2009-04-27 08:12:19Z dualface $
                    
11 * @package mvc
                    
17 * @author YuLei Liao <liaoyulei@qeeyuan.com>
                    
18 * @version $Id: view_render_php.php 2445 2009-04-27 08:12:19Z dualface $
                    
19 * @package mvc
                    
67     *
                    
68     * @var QView_Render_PHP_Parser
                    
69     */
                    
234 * @author YuLei Liao <liaoyulei@qeeyuan.com>
                    
235 * @version $Id: view_render_php.php 2445 2009-04-27 08:12:19Z dualface $
                    
236 * @package mvc
                    
                
password.php https://bitbucket.org/vervcreations/projectis.at.git | PHP | 224 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * A Compatibility library with PHP 5.5's simplified password hashing API.
                    
4 *
                    
4 *
                    
5 * @author Anthony Ferrara <ircmaxell@php.net>
                    
6 * @license http://www.opensource.org/licenses/mit-license.html MIT License
                    
38			case PASSWORD_BCRYPT:
                    
39				// Note that this is a C constant, but not exposed to PHP, so we don't define it here.
                    
40				$cost = 10;
                    
114					if ($i < $bl) {
                    
115						$buffer[$i] = $buffer[$i] ^ chr(mt_rand(0, 255));
                    
116					} else {
                    
116					} else {
                    
117						$buffer .= chr(mt_rand(0, 255));
                    
118					}
                    
                
utils.class.php http://adminserv.googlecode.com/svn/trunk/ | PHP | 272 lines
                    
1<?php
                    
2/*
                    
15		$host = $_SERVER['HTTP_HOST'];
                    
16		$uri  = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
                    
17		if($auto){
                    
17		if($auto){
                    
18			$page = basename($_SERVER['PHP_SELF']);
                    
19		}
                    
82	*
                    
83	* @require showcaptcha.php dans un dossier "./includes/captcha/"
                    
84	*/
                    
89		for($i = 0; $i < 4; $i++) {
                    
90			$code .= $chars[mt_rand(0, 35)];
                    
91		}
                    
95		session_write_close();
                    
96		return '<img src="./includes/captcha/showcaptcha.php" height="40" width="145" alt="Impossible d\'afficher le code !" />';
                    
97	}
                    
                
php_rand.h git://github.com/infusion/PHP.git | C Header | 60 lines
                    
25#ifndef PHP_RAND_H
                    
26#define	PHP_RAND_H
                    
27
                    
46/* MT Rand */
                    
47#define PHP_MT_RAND_MAX ((long) (0x7FFFFFFF)) /* (1<<31) - 1 */ 
                    
48
                    
48
                    
49#ifdef PHP_WIN32
                    
50#define GENERATE_SEED() (((long) (sapi_get_request_time(TSRMLS_C) * GetCurrentProcessId())) ^ ((long) (1000000.0 * php_combined_lcg(TSRMLS_C))))
                    
55PHPAPI void php_srand(long seed TSRMLS_DC);
                    
56PHPAPI long php_rand(TSRMLS_D);
                    
57PHPAPI void php_mt_srand(php_uint32 seed TSRMLS_DC);
                    
57PHPAPI void php_mt_srand(php_uint32 seed TSRMLS_DC);
                    
58PHPAPI php_uint32 php_mt_rand(TSRMLS_D);
                    
59
                    
                
tag.lib.php http://jqbird.googlecode.com/svn/trunk/ | PHP | 86 lines
                    
1<?php
                    
2//function GetTags($num,$ltype='new',$InnerText='')
                    
60		$row['tag'] = htmlspecialchars($row['tag']);
                    
61		$row['link'] = $cfg_cmsurl."/tags.php?/".urlencode($row['keyword'])."/";
                    
62		$row['highlight'] = 0;
                    
64		{
                    
65			$row['highlight'] = mt_rand(3,4);
                    
66		}
                    
68		{
                    
69			$row['highlight'] = mt_rand(5,6);
                    
70		}
                    
72		{
                    
73			$row['highlight'] = mt_rand(1,2);
                    
74		}
                    
                
CommentItem.php git://github.com/drupal/drupal.git | PHP | 212 lines
                    
1<?php
                    
2
                    
207    return [
                    
208      'status' => $statuses[mt_rand(0, count($statuses) - 1)],
                    
209    ];
                    
                
admin.php http://cartonbank.googlecode.com/svn/trunk/ | PHP | 209 lines
                    
45			require_once( ABSPATH . WPINC . '/http.php' );
                    
46			$response = wp_remote_get( admin_url( 'upgrade.php?step=1' ), array( 'timeout' => 120, 'httpversion' => '1.1' ) );
                    
47			do_action( 'after_mu_upgrade', $response );
                    
107		// backwards compatibility for plugins using add_management_page
                    
108		if ( empty( $page_hook ) && 'edit.php' == $pagenow && '' != get_plugin_page_hook($plugin_page, 'tools.php') ) {
                    
109			// There could be plugin specific params on the URL, so we need the whole query string
                    
135		if (! isset($_GET['noheader']))
                    
136			require_once(ABSPATH . 'wp-admin/admin-header.php');
                    
137
                    
149		if ( !isset($_GET['noheader']))
                    
150			require_once(ABSPATH . 'wp-admin/admin-header.php');
                    
151
                    
168	if ( validate_file($importer) )
                    
169		wp_redirect( admin_url( 'import.php?invalid=' . $importer ) );
                    
170
                    
                
paul.php https://bitbucket.org/babab/paul.git | PHP | 437 lines
                    
1<?php
                    
2/*
                    
40        global $paul_conf;
                    
41        include_once 'config.php';
                    
42
                    
49            $this->error("Could not load config file. Please copy "
                    
50                    . "'config.example.php' to 'config.php' and edit it.");
                    
51
                    
74    {
                    
75        $token = md5($this->secret_key . mt_rand());
                    
76        $_SESSION['paul']['token'] = $token;
                    
418    {
                    
419        return hash('sha256', mt_rand() . $this->secret_key);
                    
420    }
                    
                
xcache.php git://github.com/fuel/core.git | PHP | 375 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * Fuel is a fast, lightweight, community driven PHP 5.4+ framework.
                    
4 *
                    
9 * @copyright  2010 - 2019 Fuel Development Team
                    
10 * @link       https://fuelphp.com
                    
11 */
                    
42
                    
43		// do we have the PHP XCache extension available
                    
44		if ( ! function_exists('xcache_set') )
                    
45		{
                    
46			throw new \FuelException('Your PHP installation doesn\'t have XCache loaded.');
                    
47		}
                    
313		{
                    
314			$key .= mt_rand(0, mt_getrandmax());
                    
315		}
                    
                
Map.php https://github.com/ckwalsh/LibSprite.git | PHP | 253 lines
                    
1<?php
                    
2/**
                    
4* @copyright (c) 2011 Cullen Walsh
                    
5* @license http://www.opensource.org/licenses/bsd-license.php BSD License
                    
6*/
                    
89		if ($id === false) {
                    
90			$id = sprintf("%06x", mt_rand(0, 0xffffff));
                    
91		}
                    
                
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
                    
                
NestedFormTest.php git://github.com/drupal/drupal.git | PHP | 169 lines
                    
1<?php
                    
2
                    
44      'description' => '[site:name]_description',
                    
45      'weight' => mt_rand(0, 127),
                    
46      'settings' => array(
                    
                
usermanager_class.php https://bitbucket.org/itoxable/chiron-gaming.git | PHP | 469 lines
                    
1<?php 	
                    
2
                    
378
                    
379						$randval = mt_rand();
                    
380
                    
                
submit.php http://ownerpress.googlecode.com/svn/trunk/ | PHP | 80 lines
                    
1<?php
                    
2if($_FANWE['uid'] == 0)
                    
53	$data['data_name'] = $goods['name'];
                    
54	$data['sn'] = fToDate(TIME_UTC,'ymdHis').mt_rand(0,100);
                    
55	$data['goods_status'] = 0;
                    
67	{
                    
68		$order['sn'] = fToDate(TIME_UTC,'ymdHis').mt_rand(0,100);
                    
69		$order_id = FDB::insert('order',$data,true);
                    
                
Request.php git://github.com/abraham/twitteroauth.git | PHP | 289 lines
                    
1<?php
                    
2
                    
32        $parameters = array_merge(
                    
33            Util::parseParameters(parse_url($httpUrl, PHP_URL_QUERY)),
                    
34            $parameters,
                    
286    {
                    
287        return md5(microtime() . mt_rand());
                    
288    }
                    
                
lib.captcha.class.php http://php-ppcms.googlecode.com/svn/trunk/ | PHP | 356 lines
                    
1<?php
                    
2/***************************************************************
                    
23    /** Dictionary word file (empty for randnom text) */
                    
24    var $wordsFile = 'words/en.php';
                    
25
                    
165        // Foreground color
                    
166        $color           = $this->colors[mt_rand(0, sizeof($this->colors)-1)];
                    
167        $this->GdFgColor = imagecolorallocate($this->im, $color[0], $color[1], $color[2]);
                    
209            if ($vocal) {
                    
210                $text .= substr($vocals, mt_rand(0, 4), 1);
                    
211            } else {
                    
211            } else {
                    
212                $text .= substr($words, mt_rand(0, 22), 1);
                    
213            }
                    
253            foreach($text as $i => $char) {
                    
254                if (mt_rand(0, 1) && in_array($char, $vocals)) {
                    
255                    $text[$i] = $vocals[mt_rand(0, 4)];
                    
                
CSecurityManager.php http://chenjin.googlecode.com/svn/trunk/ | PHP | 330 lines
                    
1<?php
                    
2/**
                    
29 * To encrypt and decrypt data, call {@link encrypt()} and {@link decrypt()}
                    
30 * respectively, which uses 3DES encryption algorithm.  Note, the PHP Mcrypt
                    
31 * extension must be installed and loaded.
                    
42 * @author Qiang Xue <qiang.xue@gmail.com>
                    
43 * @version $Id: CSecurityManager.php 242 2012-03-29 15:18:01Z mole1230 $
                    
44 * @package system.base
                    
53	 * @var string the name of the hashing algorithm to be used by {@link computeHMAC}.
                    
54	 * See {@link http://php.net/manual/en/function.hash-algos.php hash-algos} for the list of possible
                    
55	 * hash algorithms. Note that if you are using PHP 5.1.1 or below, you can only use 'sha1' or 'md5'.
                    
62	 * @var mixed the name of the crypt algorithm to be used by {@link encrypt} and {@link decrypt}.
                    
63	 * This will be passed as the first parameter to {@link http://php.net/manual/en/function.mcrypt-module-open.php mcrypt_module_open}.
                    
64	 *
                    
87	{
                    
88		return sprintf('%08x%08x%08x%08x',mt_rand(),mt_rand(),mt_rand(),mt_rand());
                    
89	}
                    
                
Black.php git://github.com/ushahidi/Ushahidi_Web.git | PHP | 72 lines
                    
1<?php defined('SYSPATH') OR die('No direct access allowed.');
                    
2/**
                    
4 *
                    
5 * $Id: Black.php 3917 2009-01-21 03:06:22Z zombor $
                    
6 *
                    
9 * @copyright  (c) 2007-2008 Kohana Team
                    
10 * @license    http://kohanaphp.com/license.html
                    
11 */
                    
40		{
                    
41			imagesetthickness($this->image, mt_rand(1, 2));
                    
42			$color = imagecolorallocatealpha($this->image, 255, 255, 255, mt_rand(0, 120));
                    
42			$color = imagecolorallocatealpha($this->image, 255, 255, 255, mt_rand(0, 120));
                    
43			imagearc($this->image, mt_rand(-Captcha::$config['width'], Captcha::$config['width']), mt_rand(-Captcha::$config['height'], Captcha::$config['height']), mt_rand(-Captcha::$config['width'], Captcha::$config['width']), mt_rand(-Captcha::$config['height'], Captcha::$config['height']), mt_rand(0, 360), mt_rand(0, 360), $color);
                    
44		}
                    
50		$size = (int) min(Captcha::$config['height'] / 2, Captcha::$config['width'] * 0.8 / strlen($this->response));
                    
51		$angle = mt_rand(-15 + strlen($this->response), 15 - strlen($this->response));
                    
52		$x = mt_rand(1, Captcha::$config['width'] * 0.9 - $size * strlen($this->response));
                    
                
Auth.php https://bitbucket.org/gyo/authentication-library | PHP | 450 lines
                    
1<?php
                    
2/**
                    
295		return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
                    
296			mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),
                    
297			mt_rand( 0, 0x0fff ) | 0x4000,
                    
298			mt_rand( 0, 0x3fff ) | 0x8000,
                    
299			mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ) );
                    
300	}
                    
449
                    
450// EOF: Auth.php
                    
                
string.test.php git://github.com/mfriesen/kaching-php.git | PHP | 290 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * PHP versions 4 and 5
                    
6 *
                    
6 *
                    
7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
8 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
13 * @copyright     Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
14 * @link          http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests
                    
15 * @package       cake
                    
16 * @subpackage    cake.tests.cases.libs
                    
17 * @since         CakePHP(tm) v 1.2.0.5432
                    
18 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
                    
50		$check = array();
                    
51		$count = mt_rand(10, 1000);
                    
52		$pattern = "/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/";
                    
                
string_helper.php git://github.com/imagecms/ImageCMS.git | PHP | 308 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP 5.1.6 or newer
                    
6 *
                    
130 *
                    
131 * http://www.some-site.com//index.php
                    
132 *
                    
134 *
                    
135 * http://www.some-site.com/index.php
                    
136 *
                    
200		{
                    
201			case 'basic'	: return mt_rand();
                    
202				break;
                    
222					{
                    
223						$str .= substr($pool, mt_rand(0, strlen($pool) -1), 1);
                    
224					}
                    
                
String.php git://github.com/pmjones/php-framework-benchmarks.git | PHP | 374 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * Lithium: the most rad php framework
                    
4 *
                    
6 *                Copyright 2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
7 * @license       http://opensource.org/licenses/mit-license.php The MIT License
                    
8 */
                    
48		$pid = function_exists('zend_thread_id') ? zend_thread_id() : getmypid();
                    
49		$pid = (!$pid || $pid > 65535) ? mt_rand(0, 0xfff) | 0x4000 : $pid;
                    
50		list($timeMid, $timeLow) = explode(' ', microtime());
                    
54			(integer) $timeLow, (integer) substr($timeMid, 2) & 0xffff, mt_rand(0, 0xfff) | 0x4000,
                    
55			mt_rand(0, 0x3f) | 0x80, mt_rand(0, 0xff), $pid, $node
                    
56		);
                    
                
User.php git://github.com/centurion-project/Centurion.git | PHP | 195 lines
                    
1<?php
                    
2/**
                    
189        while( strlen($newstring) < $length ) {
                    
190            $newstring .= $list[mt_rand(0, $max)];
                    
191        }
                    
                
captcha.php https://bitbucket.org/GeCk0/ilchshop.git | PHP | 368 lines
                    
1<?php
                    
2# www.ilch.de
                    
32    {
                    
33        include 'memory.php';
                    
34        $this->memory = new Memory();
                    
230        for ( $i = 1; $i < $this->scraches_amount; $i++ ) {
                    
231            $randPixSpaceLeft = mt_rand( 0, $this->width );
                    
232            $randPixSpaceTop  = mt_rand( 0, $this->height );
                    
232            $randPixSpaceTop  = mt_rand( 0, $this->height );
                    
233            $style            = mt_rand( 0, 2 );
                    
234            if ( 0 == $style ) {
                    
235                $txtColor = array(
                    
236                     mt_rand( 0, 255 ),
                    
237                    mt_rand( 0, 255 ),
                    
237                    mt_rand( 0, 255 ),
                    
238                    mt_rand( 0, 255 )
                    
239                );
                    
                
AclProviderBenchmarkTest.php git://github.com/fabpot/symfony.git | PHP | 263 lines
                    
1<?php
                    
2
                    
22 */
                    
23class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase
                    
24{
                    
235        while (strlen($s) < $length) {
                    
236            $s .= $chars[mt_rand(0, $cLength-1)];
                    
237        }
                    
                
Template.php git://github.com/concrete5/concrete5.git | PHP | 360 lines
                    
1<?php
                    
2namespace Concrete\Core\Gathering\Item\Template;
                    
215
                    
216        return mt_rand($wb, $wt);
                    
217    }
                    
243
                    
244        return mt_rand($hb, $ht);
                    
245    }
                    
                
MarketingListMembersDemoDataMaker.php https://bitbucket.org/zurmo/zurmo/ | PHP | 88 lines
                    
1<?php
                    
2    /*********************************************************************************
                    
62                {
                    
63                    $interval               = mt_rand(1, 30) * 86400;
                    
64                    $member                 = new MarketingListMember();
                    
                
Utils.php git://pkgs.fedoraproject.org/php-pluf | PHP | 309 lines
                    
1<?php
                    
2/* -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
                    
4# ***** BEGIN LICENSE BLOCK *****
                    
5# This file is part of Plume Framework, a simple PHP Application Framework.
                    
6# Copyright (C) 2001-2007 Loic d'Anterroches and contributors.
                    
44        while ($i<$len) { 
                    
45            $string .= substr($chars, mt_rand(0, $lchars-1), 1);
                    
46            $i++;
                    
67        while ($i<$len) { 
                    
68            $string .= substr($chars, mt_rand(0, $lchars-1), 1);
                    
69            $i++;
                    
217     * @credits dk at brightbyte dot de
                    
218     * @source http://www.php.net/manual/en/function.shell-exec.php
                    
219     * @see proc_open
                    
267     *
                    
268     * @link http://www.php.net/manual/en/function.base64-encode.php#63543
                    
269     */
                    
                
common.php http://miacms.googlecode.com/svn/trunk/ | PHP | 93 lines
                    
1<?php
                    
2/**
                    
4* @package MiaCMS
                    
5* @author MiaCMS see README.php
                    
6* @copyright see README.php
                    
6* @copyright see README.php
                    
7* See COPYRIGHT.php for copyright notices and details.
                    
8* @license GNU/GPL Version 2, see LICENSE.php
                    
19
                    
20require_once('../includes/phpgettext/phpgettext.class.php');
                    
21
                    
52	for ($i = 0; $i < $length; $i++)
                    
53	$makepass .= $salt[mt_rand(0,$len - 1)];
                    
54	return $makepass;
                    
                
PseudoClass.php git://github.com/technosophos/querypath.git | PHP | 421 lines
                    
1<?php
                    
2/**
                    
70        // Because sometimes screwing with people is fun.
                    
71        return (boolean) mt_rand(0, 1);
                    
72      case 'lang':
                    
416    $url = $node->getAttribute('href');
                    
417    $scheme = parse_url($url, PHP_URL_SCHEME);
                    
418    return empty($scheme) || $scheme == 'file';
                    
                
mcrypt.php git://github.com/joomla/joomla-platform.git | PHP | 175 lines
                    
1<?php
                    
2/**
                    
22	 * @var    integer  The mcrypt cipher constant.
                    
23	 * @see    http://www.php.net/manual/en/mcrypt.ciphers.php
                    
24	 * @since  12.1
                    
29	 * @var    integer  The mcrypt block cipher mode.
                    
30	 * @see    http://www.php.net/manual/en/mcrypt.constants.php
                    
31	 * @since  12.1
                    
120		// Get the salt and password setup.
                    
121		$salt = (isset($options['salt'])) ? $options['salt'] : substr(pack("h*", md5(mt_rand())), 0, 16);
                    
122		$password = (isset($options['password'])) ? $options['password'] : 'J00ml4R0ck$!';
                    
                
facebook.php git://github.com/q2a/question2answer.git | PHP | 160 lines
                    
1<?php
                    
2/**
                    
17
                    
18require_once "base_facebook.php";
                    
19
                    
21 * Extends the BaseFacebook class with the intent of using
                    
22 * PHP sessions to store user ids and access tokens.
                    
23 */
                    
36   * Identical to the parent constructor, except that
                    
37   * we start a PHP session to store the user ID and
                    
38   * access token if during the course of execution
                    
44   * shares the domain with other apps).
                    
45   * @see BaseFacebook::__construct in facebook.php
                    
46   */
                    
73    $base_domain = $this->getBaseDomain();
                    
74    $this->sharedSessionID = md5(uniqid(mt_rand(), true));
                    
75    $cookie_value = $this->makeSignedRequest(
                    
                
ifile_it.php https://github.com/gartz/RapidLeetch.git | PHP | 77 lines
                    
1<?php
                    
2if (!defined('RAPIDLEECH'))
                    
20
                    
21insert_location("$PHP_SELF?cookie=".urlencode($cook)."&filename=".urlencode($FileName)."&host=".$Url["host"]."&path=".urlencode($Url["path"].($Url["query"] ? "?".$Url["query"] : ""))."&referer=".urlencode($Referer)."&email=".($_GET["domail"] ? $_GET["email"] : "")."&partSize=".($_GET["split"] ? $_GET["partSize"] : "")."&method=".$_GET["method"]."&proxy=".($_GET["useproxy"] ? $_GET["proxy"] : "")."&saveto=".$_GET["path"]."&link=".urlencode($LINK).($_GET["add_comment"] == "on" ? "&comment=".urlencode($_GET["comment"]) : "")."&auth=".$auth.($pauth ? "&pauth=$pauth" : "").(isset($_GET["audl"]) ? "&audl=doum" : ""));
                    
22
                    
53
                    
54insert_location("$PHP_SELF?cookie=".urlencode($cook)."&filename=".urlencode($FileName)."&host=".$Url["host"]."&path=".urlencode($Url["path"].($Url["query"] ? "?".$Url["query"] : ""))."&referer=".urlencode($Referer)."&email=".($_GET["domail"] ? $_GET["email"] : "")."&partSize=".($_GET["split"] ? $_GET["partSize"] : "")."&method=".$_GET["method"]."&proxy=".($_GET["useproxy"] ? $_GET["proxy"] : "")."&saveto=".$_GET["path"]."&link=".urlencode($LINK).($_GET["add_comment"] == "on" ? "&comment=".urlencode($_GET["comment"]) : "")."&auth=".$auth.($pauth ? "&pauth=$pauth" : "").(isset($_GET["audl"]) ? "&audl=doum" : ""));
                    
55
                    
56} elseif (strpos($page,'show_captcha')){
                    
57$rnd=mt_rand(10000000,99999999);
                    
58$rnd='0.'.$rnd.($rnd>>1);
                    
59$access_image_url='http://ifile.it/download:captcha?'.$rnd;
                    
60$capimg = $PHP_SELF."?image=".urlencode($access_image_url)."&cookie=".urlencode($cook);
                    
61$link ="http://ifile.it/download:dl_request?it=".$file_key.",type=simple,esn=0,0d149=";
                    
62		
                    
63	print 	"<form method=\"post\" action=\"".$PHP_SELF.(isset($_GET["audl"]) ? "?audl=doum" : "")."\">$nn";
                    
64	print	"<b>Please enter code:</b><br>$nn";
                    
                
Challenge.php http://digitalus-cms.googlecode.com/svn/trunk/ | PHP | 230 lines
                    
1<?php
                    
2/**
                    
19 * @license     http://digitalus-media.com/license/new-bsd     New BSD License
                    
20 * @version     $Id: Challenge.php Mon Dec 24 20:38:38 EST 2007 20:38:38 forrest lyman $
                    
21 * @link        http://www.digitaluscms.com
                    
140        // create challengeId (double mersenne twister)
                    
141        $this->_challengeId = md5(mt_rand() . mt_rand());
                    
142    }
                    
                
remind.php http://lansuite.googlecode.com/svn/trunk/ | PHP | 51 lines
                    
1<?php
                    
2
                    
10        if ($user_data['username'] == "LS_SYSTEM"){
                    
11            $func->information(t('Für den System-Account darf kein neues Passwort generiert werden'), "index.php?mod=usrmgr&action=pwrecover&step=1");
                    
12        } else if ($user_data['username']){
                    
13            $fcode = '';
                    
14            for ($x=0; $x<=24; $x++) $fcode.=chr(mt_rand(65,90));
                    
15
                    
17
                    
18            $path = substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], "index.php"));
                    
19
                    
19
                    
20            include_once("modules/mail/class_mail.php");
                    
21            $mail = new mail();
                    
21            $mail = new mail();
                    
22            $mail->create_inet_mail($user_data['username'], $_POST['pwr_mail'], $cfg['usrmgr_pwrecovery_subject'], str_replace("%USERNAME%", $user_data['username'], str_replace("%PATH%", "http://{$_SERVER['SERVER_NAME']}:{$_SERVER['SERVER_PORT']}{$path}index.php?mod=usrmgr&action=pwrecover&step=3&fcode=$fcode", $cfg['usrmgr_pwrecovery_text'])));
                    
23
                    
                
securehash.class.php https://bitbucket.org/hugolm84/php-login.git | PHP | 105 lines
                    
1<?php
                    
2
                    
36        if (!function_exists('hash') || !in_array('sha512', hash_algos())) {
                    
37            throw new Exception('You must have the PHP PECL hash module installed or use PHP 5.1.2+');
                    
38        }
                    
80        for ($i = 0; $i < $length; $i++) {
                    
81            $sha = hash('sha256', $sha . mt_rand());
                    
82            $chr = mt_rand(0, 62);
                    
                
votingapi.drush.inc git://pkgs.fedoraproject.org/drupal7-votingapi | Pascal | 200 lines
                    
1<?php
                    
2
                    
129          'timestamp' => REQUEST_TIME - rand(0, REQUEST_TIME - $timestamp),
                    
130          'value' => mt_rand(1, 5) * 20,
                    
131          'tag' => $tags[mt_rand(0, 30)],
                    
                
lock.inc https://github.com/Crell/drupal-oo-hooks.git | Pascal | 253 lines
                    
1<?php
                    
2// $Id$
                    
81    // Assign a unique id.
                    
82    $lock_id = uniqid(mt_rand(), TRUE);
                    
83    // We only register a shutdown function if a lock is used.
                    
                
RandomTest.php https://bitbucket.org/chamilo/chamilo-dev/ | PHP | 116 lines
                    
1<?php
                    
2# Copyright (C) 2004 Brion Vibber <brion@pobox.com>
                    
21/**
                    
22 * Test feeds random 16-byte strings to both the pure PHP and ICU-based
                    
23 * UtfNormal::cleanUp() code paths, and checks to see if there's a
                    
29
                    
30if (php_sapi_name() != 'cli')
                    
31{
                    
35/** */
                    
36require_once ('UtfNormal.php');
                    
37require_once ('../DifferenceEngine.php');
                    
38
                    
39dl('php_utfnormal.so');
                    
40
                    
47    for($i = 0; $i < $length; $i ++)
                    
48        $out .= chr(mt_rand($nullOk ? 0 : 1, $ascii ? 127 : 255));
                    
49    return $out;
                    
                
HttpClient.php git://github.com/michael-romer/zf-boilerplate.git | PHP | 352 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: HttpClient.php 23775 2011-03-01 17:25:24Z ralph $
                    
21 */
                    
25 */
                    
26require_once 'Zend/Http/Client.php';
                    
27
                    
100        if (!$fp) {
                    
101            require_once 'Zend/Gdata/App/InvalidArgumentException.php';
                    
102            throw new Zend_Gdata_App_InvalidArgumentException('Failed to open private key file for AuthSub.');
                    
115     *
                    
116     * In order to call this method, openssl must be enabled in your PHP
                    
117     * installation.  Otherwise, a Zend_Gdata_App_InvalidArgumentException
                    
126        if ($key != null && !function_exists('openssl_pkey_get_private')) {
                    
127            require_once 'Zend/Gdata/App/InvalidArgumentException.php';
                    
128            throw new Zend_Gdata_App_InvalidArgumentException(
                    
                
securityUser.class.php https://github.com/rollmax/read2read.git | PHP | 347 lines
                    
1<?php
                    
2class securityUser extends sfBasicSecurityUser
                    
148    {
                    
149      return base_convert(sha1(uniqid(mt_rand(), true)), 16, 36);
                    
150    }
                    
                
 

Source

Language