PageRenderTime 812ms queryFilters 0ms Sphinxql 194ms GetByIds 549ms meta 0ms repositoryFilters 24ms languageFilters 1ms sourceFilters 1ms

50,276 results for 'php mt_rand' (812 ms)

Source

Language

Repository

PortalUtil.php http://pradoportal.googlecode.com/svn/trunk/ | PHP | 898 lines
144				$path_parts = pathinfo($file);
145				if($path_parts['extension'] == "php")
146				{
147
148					$clsName = basename($path_parts['basename'],".php");
149
366				{
367					$layouts[] = array("name" => "Admin." . basename($path_parts['basename'],".php"));
368				}
703		return sprintf(/*'%04x%04x-%04x-%03x4-%04x-%04x%04x%04x'*/ '%04x%04x-%04x-4%03x-%04x-%04x%04x%04x',
704				        mt_rand(0, 65535), mt_rand(0, 65535), // 32 bits for "time_low"
705				        mt_rand(0, 65535), // 16 bits for "time_mid"
710        	    		// 8 bits for "clk_seq_low"
711	    			    mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535) // 48 bits for "node"
712    				);
captcha_gd.php http://seo-phpbb.googlecode.com/svn/trunk/ | PHP | 1,567 lines
1<?php
2/**
6* @copyright (c) 2006 phpBB Group
7* @license http://opensource.org/licenses/gpl-license.php GNU Public License
8*
13*/
14if (!defined('IN_PHPBB'))
15{
51
52		$bg_colours = array_splice($scheme, mt_rand(6, 12));
53
87				$current_colour = $scheme[array_rand($scheme)];
88				imageline($img, mt_rand(0,4), mt_rand($y - 3, $y), mt_rand($this->width - 5, $this->width), mt_rand($y - 3, $y), $current_colour);
89			}
97				$current_colour = $scheme[array_rand($scheme)];
98				imagedashedline($img, mt_rand($x -3, $x + 3), mt_rand(0, 4), mt_rand($x -3, $x + 3), mt_rand($this->height - 5, $this->height), $current_colour);
99			}
utilities.class.php http://webpagetest.googlecode.com/svn/trunk/ | PHP | 395 lines
1<?php
2/*
26 * @copyright See the included NOTICE.md file for more information.
27 * @link http://aws.amazon.com/php/ PHP Developer Center
28 */
190	 * @author Ryan Parman <ryan@getcloudfusion.com>
191	 * @license http://www.php.net/license/3_01.txt PHP License
192	 * @param integer $size (Required) Filesize in bytes.
291	 * @deprecated Use <php:json_encode()> instead.
292	 * @param mixed $obj (Required) The PHP object to convert into a JSON string.
293	 * @return string A JSON string.
329	 *
330	 * @license http://us.php.net/manual/en/function.base64-decode.php#81425 PHP License
331	 * @param string $s (Required) The string to test.
376	 * @author Alix Axel <http://www.php.net/manual/en/function.com-create-guid.php#99425>
377	 * @license http://www.php.net/license/3_01.txt PHP License
378	 * @return string A random GUID.
utilities.class.php http://webpagetest.googlecode.com/svn/trunk/ | PHP | 395 lines
1<?php
2/*
26 * @copyright See the included NOTICE.md file for more information.
27 * @link http://aws.amazon.com/php/ PHP Developer Center
28 */
190	 * @author Ryan Parman <ryan@getcloudfusion.com>
191	 * @license http://www.php.net/license/3_01.txt PHP License
192	 * @param integer $size (Required) Filesize in bytes.
291	 * @deprecated Use <php:json_encode()> instead.
292	 * @param mixed $obj (Required) The PHP object to convert into a JSON string.
293	 * @return string A JSON string.
329	 *
330	 * @license http://us.php.net/manual/en/function.base64-decode.php#81425 PHP License
331	 * @param string $s (Required) The string to test.
376	 * @author Alix Axel <http://www.php.net/manual/en/function.com-create-guid.php#99425>
377	 * @license http://www.php.net/license/3_01.txt PHP License
378	 * @return string A random GUID.
test_config.system.php http://buddypress-media.googlecode.com/svn/bp_media/trunk/ | text | 0 lines
1<?php
2
45
46			$current_type = $valid_types[mt_rand(0,6)];
47		}
64
65				$val = mt_rand(0,1);
66				$val = (bool)$val;
71
72				$val = mt_rand(-100,100);
73				$val = (int)$val;
78
79				$val = (mt_rand(-100,100) / 17);
80				$val = (float)$val;
85
86				$width = mt_rand(0, 87);
87				$val = BPM_sUtil::random_string($width);
class_digicode.php http://malleo-cms.googlecode.com/svn/trunk/ | PHP | 262 lines
25
26require_once($root.'class/class_image.php');
27class digicode extends image
84		$couleur_motifs = ImageColorAllocate($this->image, $rgb[0],$rgb[1],$rgb[2]);
85		$position = mt_rand(0,$this->largeur_cases);
86		imagefilledrectangle($this->image, $position, $position, ($position+20), ($position+10), $couleur_motifs);
96			$couleur_motifs = ImageColorAllocate($this->image, $rgb[0],$rgb[1],$rgb[2]);
97			imageline($this->image, mt_rand(0,$this->largeur_cases), mt_rand(0,$this->largeur_cases), mt_rand(0,$this->largeur_cases), mt_rand(0,$this->largeur_cases), $couleur_motifs);
98			$couleur_motifs = ImageColorAllocate($this->image, $rgb[0],$rgb[1],$rgb[2]);
98			$couleur_motifs = ImageColorAllocate($this->image, $rgb[0],$rgb[1],$rgb[2]);
99			imageline($this->image, mt_rand(0,$this->largeur_cases), mt_rand(0,$this->largeur_cases), mt_rand(0,$this->largeur_cases), mt_rand(0,$this->largeur_cases), $couleur_motifs);
100			$couleur_motifs = ImageColorAllocate($this->image, $rgb[0],$rgb[1],$rgb[2]);
100			$couleur_motifs = ImageColorAllocate($this->image, $rgb[0],$rgb[1],$rgb[2]);
101			imageline($this->image, mt_rand(0,$this->largeur_cases), mt_rand(0,$this->largeur_cases), mt_rand(0,$this->largeur_cases), mt_rand(0,$this->largeur_cases), $couleur_motifs);
102		}
utilities.class.php git://github.com/amazonwebservices/aws-sdk-for-php.git | PHP | 399 lines
1<?php
2/*
26 * @copyright See the included NOTICE.md file for more information.
27 * @link http://aws.amazon.com/php/ PHP Developer Center
28 */
195	 * @author Ryan Parman <ryan@getcloudfusion.com>
196	 * @license http://www.php.net/license/3_01.txt PHP License
197	 * @param integer $size (Required) Filesize in bytes.
296	 * @deprecated Use <php:json_encode()> instead.
297	 * @param mixed $obj (Required) The PHP object to convert into a JSON string.
298	 * @return string A JSON string.
334	 *
335	 * @license http://us.php.net/manual/en/function.base64-decode.php#81425 PHP License
336	 * @param string $s (Required) The string to test.
381	 * @author Alix Axel <http://www.php.net/manual/en/function.com-create-guid.php#99425>
382	 * @license http://www.php.net/license/3_01.txt PHP License
383	 * @return string A random GUID.
utilities.class.php http://mollify.googlecode.com/svn/trunk/ | PHP | 516 lines
27 * See Also:
28 * 	[PHP Developer Center](http://aws.amazon.com/php/)
29 */
254	 * License:
255	 * 	[PHP License](http://www.php.net/license/3_01.txt)
256	 *
441	 * License:
442	 * 	[PHP License](http://us.php.net/manual/en/function.base64-decode.php#81425)
443	 *
489	 * Author:
490	 * 	Alix Axel <http://www.php.net/manual/en/function.com-create-guid.php#99425>
491	 *
492	 * License:
493	 * 	[PHP License](http://www.php.net/license/3_01.txt)
494	 *
Framework.Functions.php http://lussumo-vanilla.googlecode.com/svn/trunk/ | PHP | 1,017 lines
46/**
47 * Appends code to a php file, typically used for configuration.
48 *
48 *
49 * The php ending tag "?>" should be either on its own line,
50 * or be ommited all together
91
92// Make sure objects can be cloned in PHP 4 and 5.
93// Example: $NewObject = clone ($ObjectName);
271			mt_rand(0, 65535),
272			mt_rand(0, 4095),
273			bindec(substr_replace(sprintf('%016b', mt_rand(0, 65535)), '01', 6, 2)),
732		if (!$Handle) {
733			$Context->WarningCollector->Add(str_replace('\\1', $Host, $Context->GetDefinition("ErrorFopen")).($php_errormsg ? str_replace('\\1', $php_errormsg, $Context->GetDefinition('ErrorFromPHP')) : ''));
734		} else {
Image.class.php http://thinkphp.googlecode.com/svn/trunk/ | PHP | 520 lines
284        $borderColor = imagecolorallocate($im, 100, 100, 100);                    //???
285        $pointColor = imagecolorallocate($im, mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255));                 //???
286
297                for ($i = 0; $i < 10; $i++) {
298                    imagearc($im, mt_rand(-10, $width), mt_rand(-10, $height), mt_rand(30, 300), mt_rand(20, 200), 55, 44, $pointColor);
299                }
342        for ($i = 0; $i < 10; $i++) {
343            imagearc($im, mt_rand(-10, $width), mt_rand(-10, $height), mt_rand(30, 300), mt_rand(20, 200), 55, 44, $stringColor);
344        }
367            $fontcolor = imagecolorallocate($im, mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255));
368            imagearc($im, mt_rand(-10, $width), mt_rand(-10, $height), mt_rand(30, 300), mt_rand(20, 200), 55, 44, $fontcolor);
369        }
370        for ($i = 0; $i < 255; $i++) {
371            $fontcolor = imagecolorallocate($im, mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255));
372            imagesetpixel($im, mt_rand(0, $width), mt_rand(0, $height), $fontcolor);
ZarafaBridge.php http://sabre-zarafa.googlecode.com/svn/trunk/ | PHP | 692 lines
1<?php
2/*
28	include (BASE_PATH . "config.inc.php");
29	include (BASE_PATH . "version.inc.php");
30	include (BASE_PATH . "common.inc.php");
32	// Logging
33	include_once ("log4php/Logger.php");
34	Logger::configure("log4php.xml");
35	
36	// PHP-MAPI
37	require_once("mapi/mapi.util.php");
37	require_once("mapi/mapi.util.php");
38	require_once("mapi/mapicode.php");
39	require_once("mapi/mapidefs.php");
39	require_once("mapi/mapidefs.php");
40	require_once("mapi/mapitags.php");
41	require_once("mapi/mapiguid.php");
sparkplug.php https://code.google.com/p/sparkplug-framework/ | PHP | 3,789 lines
1<?php
2
253/**
254 * The SparkPHPException class is used to automatically convert PHP errors to exceptions.
255 * This is one of the few *final* core classes in Spark/Plug (not extensible by plugs).
263   /**
264    * Convert PHP error to equivalent exception.
265    *
672		{
673			$nonce .= sha1(uniqid(mt_rand(), true));
674		} while (strlen($nonce) < $length);
688			$format,
689			mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff),
690			mt_rand(0, 0x0fff) | 0x4000,
691			mt_rand(0, 0x3fff) | 0x8000,
692			mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)
693		);
utilities.class.php git://github.com/punkave/aS3StreamWrapper.git | PHP | 399 lines
1<?php
2/*
26 * @copyright See the included NOTICE.md file for more information.
27 * @link http://aws.amazon.com/php/ PHP Developer Center
28 */
195	 * @author Ryan Parman <ryan@getcloudfusion.com>
196	 * @license http://www.php.net/license/3_01.txt PHP License
197	 * @param integer $size (Required) Filesize in bytes.
296	 * @deprecated Use <php:json_encode()> instead.
297	 * @param mixed $obj (Required) The PHP object to convert into a JSON string.
298	 * @return string A JSON string.
334	 *
335	 * @license http://us.php.net/manual/en/function.base64-decode.php#81425 PHP License
336	 * @param string $s (Required) The string to test.
381	 * @author Alix Axel <http://www.php.net/manual/en/function.com-create-guid.php#99425>
382	 * @license http://www.php.net/license/3_01.txt PHP License
383	 * @return string A random GUID.
utilities.class.php git://github.com/liip/php-osx.git | PHP | 380 lines
1<?php
2/*
26 * @copyright See the included NOTICE.md file for more information.
27 * @link http://aws.amazon.com/php/ PHP Developer Center
28 */
187	 * @author Ryan Parman <ryan@getcloudfusion.com>
188	 * @license http://www.php.net/license/3_01.txt PHP License
189	 * @param integer $size (Required) Filesize in bytes.
288	 * @deprecated Use <php:json_encode()> instead.
289	 * @param mixed $obj (Required) The PHP object to convert into a JSON string.
290	 * @return string A JSON string.
326	 *
327	 * @license http://us.php.net/manual/en/function.base64-decode.php#81425 PHP License
328	 * @param string $s (Required) The string to test.
362	 * @author Alix Axel <http://www.php.net/manual/en/function.com-create-guid.php#99425>
363	 * @license http://www.php.net/license/3_01.txt PHP License
364	 * @return string A random GUID.
captcha_helper.php git://github.com/claudehohl/Stikked.git | PHP | 412 lines
1<?php if (!defined('BASEPATH')) {
2    exit('No direct script access allowed');
113            for ($i = 0; $i < 8; $i++) {
114                $str .= substr($pool, mt_rand(0, strlen($pool) - 1), 1);
115            }
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            }
293        $length = strlen($word);
294        $angle = ($length >= 6) ? mt_rand(-($length - 6), ($length - 6)) : 0;
295        $angle = 10;
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
usercp_confirm.php git://github.com/MightyGorgon/icy_phoenix.git | PHP | 779 lines
1<?php
2/**
94	//$absolute_root_path = IP_ROOT_PATH; //Why this doesn't work???
95	$absolute_root_path = str_replace('index.' . PHP_EXT, '', realpath(IP_ROOT_PATH . 'index.' . PHP_EXT));
96
220	//$x_char_position = (round($total_width/6));
221	$x_char_position = (round(($total_width - 12) / strlen($code)) + mt_rand(-3, 5));
222
227		$char = $code{$i};
228		//$size = mt_rand(18, ceil($total_height / 2.8));
229		$size = mt_rand(floor($total_height / 3.5), ceil($total_height / 2.8));
230		$font = ($rnd_font) ? rand(0, (sizeof($fonts)-1)) : $font;
231		$angle = mt_rand(-30, 30);
232
418// Function  gdVersion by Hagan Fox
419// http://de3.php.net/manual/en/function.gd-info.php#52481
420function gdVersion($user_ver = 0)
Client.php git://github.com/getsentry/raven-php.git | PHP | 967 lines
1<?php
2/*
240    {
241        $has_chained_exceptions = version_compare(PHP_VERSION, '5.3.0', '>=');
242
281
282            // manually trigger autoloading, as it's not done in some edge cases due to PHP bugs (see #60149)
283            if (!class_exists('Raven_Stacktrace')) {
336    {
337        return isset($_SERVER['REQUEST_METHOD']) && PHP_SAPI !== 'cli';
338    }
786            // 32 bits for "time_low"
787            mt_rand(0, 0xffff), mt_rand(0, 0xffff),
788
801            // 48 bits for "node"
802            mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)
803        );
utilities.class.php git://github.com/joebeeson/amazon.git | PHP | 515 lines
27 * See Also:
28 * 	[PHP Developer Center](http://aws.amazon.com/php/)
29 */
254	 * License:
255	 * 	[PHP License](http://www.php.net/license/3_01.txt)
256	 *
441	 * License:
442	 * 	[PHP License](http://us.php.net/manual/en/function.base64-decode.php#81425)
443	 *
489	 * Author:
490	 * 	Alix Axel <http://www.php.net/manual/en/function.com-create-guid.php#99425>
491	 *
492	 * License:
493	 * 	[PHP License](http://www.php.net/license/3_01.txt)
494	 *
utilities.class.php git://github.com/splittingred/phpThumbOf.git | PHP | 500 lines
1<?php
2/*
27 * See Also:
28 * 	[PHP Developer Center](http://aws.amazon.com/php/)
29 */
150		// Explicitly pass a third parameter.
151		// <http://php.net/manual/en/function.http-build-query.php#74781>
152		return http_build_query($array, '', '&');
245	 * License:
246	 * 	[PHP License](http://www.php.net/license/3_01.txt)
247	 *
256	 * See Also:
257	 * 	Original Function - http://aidanlister.com/repos/v/function.size_readable.php
258	 */
432	 * License:
433	 * 	[PHP License](http://us.php.net/manual/en/function.base64-decode.php#81425)
434	 *
fsource_PHPExcel__PHPExcelSharedJAMAexamplespolyfit.php.html git://github.com/shimondoodkin/node_spreadsheet.git | HTML | 148 lines
109<li><div class="src-line"><a name="a47"></a><span class="src-var">$points</span><span class="src-sym">-&gt;</span><span class="src-id">toHTML</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
110<li><div class="src-line"><a name="a48"></a><a href="../PHPExcel/_PHPExcel---Shared---JAMA---examples---polyfit.php.html#functionprintpoly">printpoly</a><span class="src-sym">(</span><a href="../PHPExcel/_PHPExcel---Shared---JAMA---examples---polyfit.php.html#functionpolyfit">polyfit</a><span class="src-sym">(</span><span class="src-var">$X</span><span class="src-sym">,&nbsp;</span><span class="src-var">$Y</span><span class="src-sym">,&nbsp;</span><span class="src-num">4</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
111<li><div class="src-line"><a name="a49"></a>&nbsp;</div></li>
117<li><div class="src-line"><a name="a55"></a><span class="src-var">$points</span><span class="src-sym">-&gt;</span><span class="src-id">toHTML</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
118<li><div class="src-line"><a name="a56"></a><a href="../PHPExcel/_PHPExcel---Shared---JAMA---examples---polyfit.php.html#functionprintpoly">printpoly</a><span class="src-sym">(</span><a href="../PHPExcel/_PHPExcel---Shared---JAMA---examples---polyfit.php.html#functionpolyfit">polyfit</a><span class="src-sym">(</span><span class="src-var">$X</span><span class="src-sym">,&nbsp;</span><span class="src-var">$Y</span><span class="src-sym">,&nbsp;</span><span class="src-num">2</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
119<li><div class="src-line"><a name="a57"></a>&nbsp;</div></li>
125<li><div class="src-line"><a name="a63"></a><span class="src-var">$points</span><span class="src-sym">-&gt;</span><span class="src-id">toHTML</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
126<li><div class="src-line"><a name="a64"></a><a href="../PHPExcel/_PHPExcel---Shared---JAMA---examples---polyfit.php.html#functionprintpoly">printpoly</a><span class="src-sym">(</span><a href="../PHPExcel/_PHPExcel---Shared---JAMA---examples---polyfit.php.html#functionpolyfit">polyfit</a><span class="src-sym">(</span><span class="src-var">$X</span><span class="src-sym">,&nbsp;</span><span class="src-var">$Y</span><span class="src-sym">,&nbsp;</span><span class="src-num">5</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
127<li><div class="src-line"><a name="a65"></a>&nbsp;</div></li>
130<li><div class="src-line"><a name="a68"></a><span class="src-var">$X&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">1</span><span class="src-sym">,</span><span class="src-num">2</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">,</span><span class="src-num">4</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
131<li><div class="src-line"><a name="a69"></a><span class="src-var">$Y&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><a href="http://www.php.net/mt_rand">mt_rand</a><span class="src-sym">(</span><span class="src-num">0</span><span class="src-sym">,&nbsp;</span><span class="src-num">10</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/mt_rand">mt_rand</a><span class="src-sym">(</span><span class="src-num">40</span><span class="src-sym">,&nbsp;</span><span class="src-num">80</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/mt_rand">mt_rand</a><span class="src-sym">(</span><span class="src-num">240</span><span class="src-sym">,&nbsp;</span><span class="src-num">400</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/mt_rand">mt_rand</a><span class="src-sym">(</span><span class="src-num">1800</span><span class="src-sym">,&nbsp;</span><span class="src-num">2215</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/mt_rand">mt_rand</a><span class="src-sym">(</span><span class="src-num">8000</span><span class="src-sym">,&nbsp;</span><span class="src-num">9000</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
132<li><div class="src-line"><a name="a70"></a><span class="src-var">$points&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../JAMA/Matrix.html">Matrix</a></span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$X</span><span class="src-sym">,&nbsp;</span><span class="src-var">$Y</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
133<li><div class="src-line"><a name="a71"></a><span class="src-var">$points</span><span class="src-sym">-&gt;</span><span class="src-id">toHTML</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
134<li><div class="src-line"><a name="a72"></a><a href="../PHPExcel/_PHPExcel---Shared---JAMA---examples---polyfit.php.html#functionprintpoly">printpoly</a><span class="src-sym">(</span><a href="../PHPExcel/_PHPExcel---Shared---JAMA---examples---polyfit.php.html#functionpolyfit">polyfit</a><span class="src-sym">(</span><span class="src-var">$X</span><span class="src-sym">,&nbsp;</span><span class="src-var">$Y</span><span class="src-sym">,&nbsp;</span><span class="src-num">3</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
135<li><div class="src-line"><a name="a73"></a><span class="src-php">?&gt;</span></div></li>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21