PageRenderTime 2172ms queryFilters 49ms Sphinxql 482ms GetByIds 1562ms meta 0ms repositoryFilters 16ms languageFilters 1ms sourceFilters 2ms

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

Source

Language

Repository

Subs-Sound.php https://github.com/dekoza/openshift-smf-2.0.7.git | PHP | 114 lines
8 * @copyright 2011 Simple Machines
9 * @license http://www.simplemachines.org/about/smf/license.php BSD
10 *
24		- Returns false on failure.
25		- used by VerificationCode() (Register.php).
26*/
64		$sound_letter = substr($sound_letter, strpos($sound_letter, 'data') + 8);
65		switch ($word{$i} === 's' ? 0 : mt_rand(0, 2))
66		{
68				for ($j = 0, $n = strlen($sound_letter); $j < $n; $j++)
69					for ($k = 0, $m = round(mt_rand(15, 25) / 10); $k < $m; $k++)
70						$sound_word .= $word{$i} === 's' ? $sound_letter{$j} : chr(mt_rand(max(ord($sound_letter{$j}) - 1, 0x00), min(ord($sound_letter{$j}) + 1, 0xFF)));
74				for ($j = 0, $n = strlen($sound_letter) - 1; $j < $n; $j += 2)
75					$sound_word .= (mt_rand(0, 3) == 0 ? '' : $sound_letter{$j}) . (mt_rand(0, 3) === 0 ? $sound_letter{$j + 1} : $sound_letter{$j}) . (mt_rand(0, 3) === 0 ? $sound_letter{$j} : $sound_letter{$j + 1}) . $sound_letter{$j + 1} . (mt_rand(0, 3) == 0 ? $sound_letter{$j + 1} : '');
76				$sound_word .= str_repeat($sound_letter{$n}, 2);
class-wc-api-helpers.php https://github.com/Acekid88/website.git | PHP | 1,464 lines
1<?php
2
74
75						if ( get_option( 'wc_api_manager_software_add_on_license_key' ) == 'yes' && self::is_plugin_active( 'woocommerce-software-add-on/woocommerce-software.php' ) ) {
76							// Get the order_id
189
190						if ( get_option( 'wc_api_manager_software_add_on_license_key' ) == 'yes' && self::is_plugin_active( 'woocommerce-software-add-on/woocommerce-software.php' ) ) {
191							// Get the order_id
513			'%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
514			mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),
515			mt_rand( 0, 0x0fff ) | 0x4000,
516			mt_rand( 0, 0x3fff ) | 0x8000,
517			mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )
518		);
738
739		} else if ( self::is_plugin_active( 'woocommerce-software-add-on/woocommerce-software.php' ) ) {
740
uuid.php https://github.com/mmarinero/ProjectManagementExample.git | PHP | 160 lines
1<?php
2
7 * UUIDs generated validate using the OSSP UUID Tool, and the output for named-based UUIDs are 
8 * exactly the same. This is a pure PHP implementation.
9 *
21 *
22 * Originally found at: http://www.php.net/manual/en/function.uniqid.php#94959
23 *
26 *
27 * Modifications made by Henry Merriam <php@henrymerriam.com> on 2009-12-20:
28 *
91            // 32 bits for "time_low"
92            mt_rand(0, 0xffff), mt_rand(0, 0xffff),
93
106            // 48 bits for "node"
107            mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)
108        );
PwGDCode.php https://github.com/cuijinquan/nextwind.git | PHP | 282 lines
72		if (!$imbg) return false;
73		imagecopymerge(self::$_image, $imbg, 0, 0, mt_rand(0,450-self::$verifyWidth), mt_rand(0,150-self::$verifyHeight), self::$verifyWidth, self::$verifyHeight, 100);
74		imagedestroy($imbg);
100		} else {
101			self::$_color =  imagecolorallocate(self::$_image, mt_rand(0, 255), mt_rand(0, 120), mt_rand(0, 255));
102		}
155			$_y = mt_rand(0, self::$verifyHeight);
156			$_color = imagecolorallocate(self::$_image, mt_rand(50, 255), mt_rand(50, 200), mt_rand(25, 200));
157			imageline ( self::$_image, $_x, $_y, mt_rand(($_x-10), ($_x+5)), mt_rand(($_y+5), ($_y+20)), $_color);
163		for ($i = 0; $i < $_tmp; $i++) {
164			$_color = imagecolorallocate(self::$_image, mt_rand(50, 255), mt_rand(50, 200), mt_rand(25, 200));
165			imagesetpixel(self::$_image, mt_rand(0, self::$verifyWidth), mt_rand(0, self::$verifyHeight), $_color);	
171			$_color = imagecolorallocate(self::$_image, mt_rand(50, 255), mt_rand(50, 200), mt_rand(25, 200));
172			imagearc(self::$_image, mt_rand(0, self::$verifyWidth), mt_rand(10,self::$verifyHeight), mt_rand(10, self::$verifyWidth), mt_rand(self::$verifyHeight, self::$verifyHeight*2), mt_rand(0, 90), mt_rand(0,90), $_color);
173		}
GATracking.php https://github.com/michanismus/google-measurement-php-client.git | PHP | 409 lines
1<?php
2namespace Racecore\GATracking;
188     *
189     * @author Andrew Moore http://www.php.net/manual/en/function.uniqid.php#94959
190     * @return string
194            // 32 bits for "time_low"
195            mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),
196
197            // 16 bits for "time_mid"
198            mt_rand( 0, 0xffff ),
199
201            // four most significant bits holds version number 4
202            mt_rand( 0, 0x0fff ) | 0x4000,
203
209            // 48 bits for "node"
210            mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )
211        );
contact.php https://github.com/swatCap/banan.git | PHP | 1,205 lines
1<?php
2
17 * 
18 * PHP version >= 5.3
19 *
25 * @version   Release 1.9
26 * @link      http://demos.thebestfreelancer.in/phpcontact/
27 * @tutorial  http://demos.thebestfreelancer.in/phpcontact/documentation/
45     * @version   Release 1.9
46     * @link      http://demos.thebestfreelancer.in/phpcontact/
47     * @tutorial  http://demos.thebestfreelancer.in/phpcontact/documentation/
291            /*
292             * define captcha type as php
293             * you may use javascript captcha too
293             * you may use javascript captcha too
294             * possible values: php, js
295             */
captcha.php https://github.com/FannyCayzeele/examen-de-php.git | PHP | 140 lines
1<?php
2/*
85{
86	ImageLine($image, mt_rand(0,40), mt_rand(0,100), mt_rand(280, 320), mt_rand(0,100), $noir);
87	$i++;
90//définition des lignes colorées.
91$nb_lignes = mt_rand(3,7);
92$i = 1;
94{
95	ImageLine($image, mt_rand(0,40), mt_rand(0,100), mt_rand(280,320), mt_rand(0,100), $colors[mt_rand(0,$Tcolors-1)]);
96	$i++;
103{
104	ImageEllipse($image, mt_rand(0,320), mt_rand(0,100), 25+mt_rand(0,15), 25+mt_rand(0,15), $colors[mt_rand(0,$Tcolors-1)]);
105	$i++;
112{
113	$array = Array(mt_rand(0,300), mt_rand(0,100), mt_rand(0,300), mt_rand(0,100), mt_rand(0,300), mt_rand(0,100));
114	ImagePolygon($image, $array, 3, $colors[mt_rand(0,$Tcolors-1)]);
CakeTimeTest.php https://bitbucket.org/sommers/cs295.git | PHP | 1,088 lines
6 *
7 * CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
8 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
15 * @link          http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
16 * @package       Cake.Test.Case.View.Helper
630		$this->assertTrue($result);
631		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') - mt_rand(1, 12)));
632		$this->assertFalse($result);
632		$this->assertFalse($result);
633		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') + mt_rand(1, 12)));
634		$this->assertFalse($result);
644		$this->assertTrue($result);
645		$result = $this->Time->isThisYear(mktime(0, 0, 0, mt_rand(1, 12), mt_rand(1, 28), date('Y')));
646		$this->assertTrue($result);
drupal_web_test_case.php https://github.com/jacobSingh/drupal.git | PHP | 2,768 lines
144   * This is useful for inserting assertions that can only be recorded after
145   * the test case has been destroyed, such as PHP fatal errors. The caller
146   * information is not automatically gathered since the caller is most likely
230   * @param $group
231   *   The type of assertion - examples are "Browser", "PHP".
232   * @return
246   * @param $group
247   *   The type of assertion - examples are "Browser", "PHP".
248   * @return
378   * @param $group
379   *   The type of assertion - examples are "Browser", "PHP".
380   * @return
1820   *   format and return values see the SimpleXML documentation,
1821   *   http://us.php.net/manual/function.simplexml-element-xpath.php.
1822   */
captcha.class.php https://github.com/gesf/captcha.class.php.git | PHP | 271 lines
1<?php
2
11 *
12 * @package PHP Captcha Class
13 * @author  Gonรงalo Fontoura gesf
15 * @license Licensed under the GNU L-GPL
16 * @link https://github.com/gesf/captcha.class.php
17 * @version 1.1 
179		for($i = 0; $i < $this->_capLength; $i ++) {
180			$this->_capString .= $char_pool [mt_rand ( 0, $pool_length )];
181		}
223				for($i = 0; $i <= 10; $i ++) {
224					imageline ( $image, $i * 20 + mt_rand ( 4, 26 ), 0, $i * 20 - mt_rand ( 4, 26 ), 39, $captcha_image_lcolor [mt_rand ( 0, 2 )] );
225				}
227				for($i = 0; $i <= 10; $i ++) {
228					imageline ( $image, $i * 20 + mt_rand ( 4, 26 ), 39, $i * 20 - mt_rand ( 4, 26 ), 0, $captcha_image_lcolor [mt_rand ( 0, 2 )] );
229				}
functions.php https://github.com/erikfrerejean/phpbb3.git | PHP | 4,947 lines
736			// If we are unable to get owner/group, then do not try to set them by guessing
737			if (!$php_uid || empty($php_gids) || !$common_php_owner || !$common_php_group)
738			{
3105			$message = ($l_success) ? $l_success : $user->lang['LOGIN_REDIRECT'];
3106			$l_redirect = ($admin) ? $user->lang['PROCEED_TO_ACP'] : (($redirect === "{$phpbb_root_path}index.$phpEx" || $redirect === "index.$phpEx") ? $user->lang['RETURN_INDEX'] : $user->lang['RETURN_PAGE']);
3107
3595	{
3596		$unicode_support = ((version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>='))) && @preg_match('/\p{L}/u', 'a') !== false) ? true : false;
3597	}
3991			echo '	<div id="page-footer">';
3992			echo '		Powered by <a href="https://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Group';
3993			echo '	</div>';
4811		'TRANSLATION_INFO'		=> (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '',
4812		'CREDIT_LINE'			=> $user->lang('POWERED_BY', '<a href="https://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Group'),
4813
functions.php https://github.com/GreyTeardrop/socionicasys-forum.git | PHP | 4,877 lines
654			// If we are unable to get owner/group, then do not try to set them by guessing
655			if (!$php_uid || empty($php_gids) || !$common_php_owner || !$common_php_group)
656			{
3538	{
3539		$unicode_support = ((version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>='))) && @preg_match('/\p{L}/u', 'a') !== false) ? true : false;
3540	}
3914			echo '	<div id="page-footer">';
3915			echo '		Powered by <a href="http://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Group';
3916			echo '	</div>';
4378		$template->assign_vars( array(
4379			'PHPBB_FULL_URL' => $phpbb_seo->seo_path['phpbb_url'],
4380		'SEO_BASE_HREF' => $phpbb_seo->seo_opt['seo_base_href'],
4587		// www.phpBB-SEO.com SEO TOOLKIT BEGIN
4588		'UA_POPUP_PM'			=> addslashes(append_sid((!empty($phpbb_seo) ? $phpbb_seo->seo_path['phpbb_url'] : $phpbb_root_path) . "ucp.$phpEx", 'i=pm&amp;mode=popup')),
4589		// www.phpBB-SEO.com SEO TOOLKIT END
index.php https://bitbucket.org/roser137/turkerreklam | PHP | 201 lines
1<?php
2/*
7 hiç bir ţekilde yardým etmeyeceđimi de bilmelisiniz. Bu yüzden bana ulaţmaya çalýţmayýn. Ayrýca scriptin bazý dosyalarýnda
8 bazý mail fonksiyonlarý silinmiţtir. Bu bölümleri bulup düzenlemeniz gerekmektedir. Bu da belli bir seviyede PHP bilgisi gerektirir.
9 Özetle, script bu haliyle ,tam olarak deđilsede, çalýţmaktadýr. Bu scripti özgürce kullandýđýnýz için her türlü sorumluluđu size
17session_start();
18include_once("load/funcs.php");
19if (@empty($_SESSION['uid'])) {
25		// Create a random number between 1 and 3
26		$IMGVER_RandVal = mt_rand(1,3);
27		// If the random number was 1, we generate a lowercase
33	  	  	// case characters from a to z.
34		        $IMGVER_RandVal = mt_rand(97, 122); 
35	        	break;
38	  	  	// numbers from 0 to 9.
39		        $IMGVER_RandVal = mt_rand(48, 57);
40	        	break;
CakeTimeTest.php https://bitbucket.org/linuxdream/agent-j | PHP | 1,075 lines
6 *
7 * CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
8 * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
13 * @copyright     Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @link          http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
15 * @package       Cake.Test.Case.View.Helper
629		$this->assertTrue($result);
630		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') - mt_rand(1, 12)));
631		$this->assertFalse($result);
631		$this->assertFalse($result);
632		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') + mt_rand(1, 12)));
633		$this->assertFalse($result);
643		$this->assertTrue($result);
644		$result = $this->Time->isThisYear(mktime(0, 0, 0, mt_rand(1, 12), mt_rand(1, 28), date('Y')));
645		$this->assertTrue($result);
Session.php https://bitbucket.org/gbouthenot/dmwikimap | PHP | 263 lines
1<?php
2/**
12} elseif (_GB_PATH !== dirname(__FILE__).DIRECTORY_SEPARATOR) {
13    throw new Exception("gbphpdb roots mismatch");
14}
15
16require_once(_GB_PATH."Exception.php");
17require_once(_GB_PATH."Glue.php");
17require_once(_GB_PATH."Glue.php");
18require_once(_GB_PATH."String.php");
19require_once(_GB_PATH."Log.php");
113        self::$grandTimeOutMinutes=$grandTimeOutMinutes;
114        session_name(Gb_Glue::getProjectName()."_PHPID");
115        self::getSessionDir();
191        $a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
192        $u=$a{mt_rand(0, 61)}; $u.=$a{mt_rand(0, 61)}; $u.=$a{mt_rand(0, 61)}; $u.=$a{mt_rand(0, 61)}; $u.=$a{mt_rand(0, 61)};
193        $uniqId=$u;
Session.php https://bitbucket.org/gbouthenot/gbphpdb | PHP | 264 lines
1<?php
2/**
12} elseif (_GB_PATH !== dirname(__FILE__).DIRECTORY_SEPARATOR) {
13    throw new Exception("gbphpdb roots mismatch");
14}
15
16require_once(_GB_PATH."Exception.php");
17require_once(_GB_PATH."Glue.php");
17require_once(_GB_PATH."Glue.php");
18require_once(_GB_PATH."String.php");
19require_once(_GB_PATH."Log.php");
113        self::$grandTimeOutMinutes=$grandTimeOutMinutes;
114        session_name(Gb_Glue::getProjectName()."_PHPID");
115        self::getSessionDir();
191        $a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
192        $u=$a{mt_rand(0, 61)}; $u.=$a{mt_rand(0, 61)}; $u.=$a{mt_rand(0, 61)}; $u.=$a{mt_rand(0, 61)}; $u.=$a{mt_rand(0, 61)};
193        $uniqId=$u;
wp-cache-phase2.php https://bitbucket.org/sergiohzlz/reportaprod | PHP | 1,098 lines
170
171	$auto_rejected = array( '/wp-admin/', 'xmlrpc.php', 'wp-app.php' );
172	foreach( $auto_rejected as $u ) {
475			} elseif ( isset( $fr2 ) ) { // supercache active
476				$php_fname = "{$dir}index.html.php";
477				$tmp_php_filename = $dir . uniqid( mt_rand(), true ) . '.tmp';
583			} elseif ( filesize( $tmp_php_filename ) == 0 ) {
584				if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Warning! The file $tmp_php_filename was empty. Did not rename to {$php_fname}", 5 );
585				@unlink( $tmp_php_filename );
586			} else {
587				if ( !@rename( $tmp_php_filename, $php_fname ) ) {
588					@unlink( $php_fname );
588					@unlink( $php_fname );
589					@rename( $tmp_php_filename, $php_fname );
590				}
CakeTimeTest.php https://bitbucket.org/praveen_excell/opshop | PHP | 1,068 lines
6 *
7 * CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
8 * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
13 * @copyright     Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @link          http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
15 * @package       Cake.Test.Case.View.Helper
622		$this->assertTrue($result);
623		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') - mt_rand(1, 12)));
624		$this->assertFalse($result);
624		$this->assertFalse($result);
625		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') + mt_rand(1, 12)));
626		$this->assertFalse($result);
636		$this->assertTrue($result);
637		$result = $this->Time->isThisYear(mktime(0, 0, 0, mt_rand(1, 12), mt_rand(1, 28), date('Y')));
638		$this->assertTrue($result);
securimage.php https://gitlab.com/redring-co-in/redring_website.git | PHP | 2,412 lines
1<?php
2
6 * Project:     Securimage: A PHP class for creating and managing form CAPTCHA images<br />
7 * File:        securimage.php<br />
8 *
38 *
39 * @link http://www.phpcaptcha.org Securimage PHP CAPTCHA
40 * @link http://www.phpcaptcha.org/latest.zip Download Latest Version
40 * @link http://www.phpcaptcha.org/latest.zip Download Latest Version
41 * @link http://www.phpcaptcha.org/Securimage_Docs/ Online Documentation
42 * @copyright 2013 Drew Phillips
643.2RC3
65- Fix canSendHeaders() check which was breaking if a PHP startup error was issued
66
165	// They can be passed as an array to the Securimage constructor, set below,
166	// or set from securimage_show.php and securimage_play.php
167
securimage.php https://gitlab.com/Yishagerew/GDA.git | PHP | 2,412 lines
1<?php
2
6 * Project:     Securimage: A PHP class for creating and managing form CAPTCHA images<br />
7 * File:        securimage.php<br />
8 *
38 *
39 * @link http://www.phpcaptcha.org Securimage PHP CAPTCHA
40 * @link http://www.phpcaptcha.org/latest.zip Download Latest Version
40 * @link http://www.phpcaptcha.org/latest.zip Download Latest Version
41 * @link http://www.phpcaptcha.org/Securimage_Docs/ Online Documentation
42 * @copyright 2013 Drew Phillips
643.2RC3
65- Fix canSendHeaders() check which was breaking if a PHP startup error was issued
66
165	// They can be passed as an array to the Securimage constructor, set below,
166	// or set from securimage_show.php and securimage_play.php
167
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21