PageRenderTime 636ms queryFilters 2ms Sphinxql 269ms GetByIds 262ms meta 0ms repositoryFilters 18ms languageFilters 1ms sourceFilters 1ms

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

Source

Language

Repository

functions.php http://viet-group.googlecode.com/svn/trunk/ | PHP | 1,712 lines
1<?php
2
13require_once ( NV_ROOTDIR . '/includes/utf8/utf8_functions.php' );
14require_once ( NV_ROOTDIR . '/includes/core/filesystem_functions.php' );
15require_once ( NV_ROOTDIR . '/includes/core/cache_functions.php' );
167    global $global_config;
168    if ( file_exists( NV_ROOTDIR . "/" . NV_DATADIR . "/banip.php" ) )
169    {
169    {
170        include ( NV_ROOTDIR . "/" . NV_DATADIR . "/banip.php" );
171        $array_banip = ( defined( 'NV_ADMIN' ) ) ? $array_banip_admin : $array_banip_site;
541        $probab = mt_rand( 1, 10 );
542        $pass .= ( $probab <= 8 ) ? chr( mt_rand( 97, 122 ) ) : chr( mt_rand( 48, 57 ) );
543    }
984    $sendmail_from = ini_get( 'sendmail_from' );
985    require_once ( NV_ROOTDIR . '/includes/phpmailer/class.phpmailer.php' );
986    try
CaptchaSecurityImages.php git://github.com/Mythos94/Minimanager-for-TrinityCore.git | PHP | 98 lines
22/*
23* File: CaptchaSecurityImages.php
24* Author: Simon Jarvis
28* Requirements: PHP 4/5 with GD and FreeType libraries
29* Link: http://www.white-hat-web-design.co.uk/articles/php-captcha.php
30*
53        for($i=0; $i<$characters; ++$i)
54            $code .= substr($possible, mt_rand(0, strlen($possible)-1), 1);
55            
70        for($i=0; $i<($width*$height)/3; ++$i)
71          imagefilledellipse($image, mt_rand(0,$width), mt_rand(0,$height), 1, 1, $noise_color);
72
74        for($i=0; $i<($width*$height)/150; ++$i)
75          imageline($image, mt_rand(0,$width), mt_rand(0,$height), mt_rand(0,$width), mt_rand(0,$height), $noise_color);
76
captcha_helper.php git://github.com/claudehohl/Stikked.git | PHP | 341 lines
1<?php
2/**
131
132			// PHP7 or a suitable polyfill
133			if (function_exists('random_int'))
155			//
156			// No, I do not care that the fallback to mt_rand() can
157			// handle it; if you trigger this, you're very obviously
195						{
196							// Sadly, this means fallback to mt_rand()
197							$word = '';
217			{
218				$word .= $pool[mt_rand(0, $rand_max)];
219			}
231		$x_axis	= mt_rand(6, (360/$length)-16);
232		$y_axis = ($angle >= 0) ? mt_rand($img_height, $img_width) : mt_rand(6, $img_height);
233
Adaptor.php git://github.com/funkatron/barstool.git | PHP | 220 lines
1<?php
2
151    /**
152     * from comments for http://php.net/manual/en/function.uniqid.php
153     *
160            // 32 bits for "time_low"
161            mt_rand(0, 0xffff), mt_rand(0, 0xffff),
162
163            // 16 bits for "time_mid"
164            mt_rand(0, 0xffff),
165
167            // four most significant bits holds version number 4
168            mt_rand(0, 0x0fff) | 0x4000,
169
175            // 48 bits for "node"
176            mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)
177        );
security2.lib.php git://github.com/Dolibarr/dolibarr.git | PHP | 524 lines
1<?php
2/* Copyright (C) 2008-2011 Laurent Destailleur  <eldy@users.sourceforge.net>
20/**
21 *  \file		htdocs/core/lib/security2.lib.php
22 *  \ingroup    core
23 *  \brief		Set of function used for dolibarr security (not common functions).
24 *  			Warning, this file must not depends on other library files, except function.lib.php
25 *  			because it is used at low code level.
73    		    $mode = trim($mode);
74        		$authfile = 'functions_'.$mode.'.php';
75        		$fullauthfile = '';
82
83    		        // Check if file found (do not use dol_is_file to avoid loading files.lib.php)
84    		        $tmpnewauthfile = $newdir.(preg_match('/\/$/', $newdir) ? '' : '/').$authfile;
125     * Show Dolibarr default login page.
126     * Part of this code is also duplicated into main.inc.php::top_htmlhead
127     *
drupal_web_test_case.php git://pkgs.fedoraproject.org/drupal7 | PHP | 3,510 lines
1<?php
2
270   * @param $group
271   *   The type of assertion - examples are "Browser", "PHP".
272   * @return
286   * @param $group
287   *   The type of assertion - examples are "Browser", "PHP".
288   * @return
302   * @param $group
303   *   The type of assertion - examples are "Browser", "PHP".
304   * @return
1597   *   defined by the cURL library. For a list of valid options, see
1598   *   http://www.php.net/manual/function.curl-setopt.php
1599   * @param $redirect
2383   *   format and return values see the SimpleXML documentation,
2384   *   http://us.php.net/manual/function.simplexml-element-xpath.php.
2385   */
Config.php git://pkgs.fedoraproject.org/horde | PHP | 1,465 lines
1<?php
2/**
13 */
14include_once 'Horde/Form.php';
15
18 */
19include_once 'Horde/Form/Renderer.php';
20
22 * The Config:: package provides a framework for managing the
23 * configuration of Horde applications, writing conf.php files from
24 * conf.xml source files, generating user interfaces, etc.
25 *
26 * $Horde: framework/Horde/Horde/Config.php,v 1.80.2.40 2009/02/25 05:35:42 chuck Exp $
27 *
219
220        $this->_phpConfig = "<?php\n";
221        $this->_phpConfig .= $this->_preConfig;
addtask.php https://git01.codeplex.com/task | PHP | 70 lines
1<?php
2require_once "init.php";
45
46header('Location: index.php');
47
50        // 32 bits for "time_low"
51        mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),
52
53        // 16 bits for "time_mid"
54        mt_rand( 0, 0xffff ),
55
57        // four most significant bits holds version number 4
58        mt_rand( 0, 0x0fff ) | 0x4000,
59
65        // 48 bits for "node"
66        mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )
67    );
drupal_web_test_case.php https://hg.codeplex.com/webstart | PHP | 3,632 lines
1<?php
2
274   * @param $group
275   *   The type of assertion - examples are "Browser", "PHP".
276   * @return
290   * @param $group
291   *   The type of assertion - examples are "Browser", "PHP".
292   * @return
306   * @param $group
307   *   The type of assertion - examples are "Browser", "PHP".
308   * @return
1719   *   defined by the cURL library. For a list of valid options, see
1720   *   http://www.php.net/manual/function.curl-setopt.php
1721   * @param $redirect
2505   *   format and return values see the SimpleXML documentation,
2506   *   http://us.php.net/manual/function.simplexml-element-xpath.php.
2507   */
drupal_web_test_case.php https://bitbucket.org/olragon/drupal_demo.git | PHP | 3,428 lines
1<?php
2
250   * @param $group
251   *   The type of assertion - examples are "Browser", "PHP".
252   * @return
266   * @param $group
267   *   The type of assertion - examples are "Browser", "PHP".
268   * @return
282   * @param $group
283   *   The type of assertion - examples are "Browser", "PHP".
284   * @return
1550   *   defined by the cURL library. For a list of valid options, see
1551   *   http://www.php.net/manual/function.curl-setopt.php
1552   * @param $redirect
2315   *   format and return values see the SimpleXML documentation,
2316   *   http://us.php.net/manual/function.simplexml-element-xpath.php.
2317   */
drupal_web_test_case.php https://bitbucket.org/andytruong/drupal.git | PHP | 3,439 lines
1<?php
2
250   * @param $group
251   *   The type of assertion - examples are "Browser", "PHP".
252   * @return
266   * @param $group
267   *   The type of assertion - examples are "Browser", "PHP".
268   * @return
282   * @param $group
283   *   The type of assertion - examples are "Browser", "PHP".
284   * @return
1550   *   defined by the cURL library. For a list of valid options, see
1551   *   http://www.php.net/manual/function.curl-setopt.php
1552   * @param $redirect
2325   *   format and return values see the SimpleXML documentation,
2326   *   http://us.php.net/manual/function.simplexml-element-xpath.php.
2327   */
drupal_web_test_case.php https://bitbucket.org/twinbit/ddayroma2011.git | PHP | 3,423 lines
1<?php
2
250   * @param $group
251   *   The type of assertion - examples are "Browser", "PHP".
252   * @return
266   * @param $group
267   *   The type of assertion - examples are "Browser", "PHP".
268   * @return
282   * @param $group
283   *   The type of assertion - examples are "Browser", "PHP".
284   * @return
1545   *   defined by the cURL library. For a list of valid options, see
1546   *   http://www.php.net/manual/function.curl-setopt.php
1547   * @param $redirect
2310   *   format and return values see the SimpleXML documentation,
2311   *   http://us.php.net/manual/function.simplexml-element-xpath.php.
2312   */
drupal_web_test_case.php https://bitbucket.org/sineo/cunningham.git | PHP | 3,439 lines
1<?php
2
250   * @param $group
251   *   The type of assertion - examples are "Browser", "PHP".
252   * @return
266   * @param $group
267   *   The type of assertion - examples are "Browser", "PHP".
268   * @return
282   * @param $group
283   *   The type of assertion - examples are "Browser", "PHP".
284   * @return
1550   *   defined by the cURL library. For a list of valid options, see
1551   *   http://www.php.net/manual/function.curl-setopt.php
1552   * @param $redirect
2325   *   format and return values see the SimpleXML documentation,
2326   *   http://us.php.net/manual/function.simplexml-element-xpath.php.
2327   */
drupal_web_test_case.php https://bitbucket.org/NemesisVex/vigilant-media-network.git | PHP | 3,651 lines
1<?php
2
274   * @param $group
275   *   The type of assertion - examples are "Browser", "PHP".
276   * @return
290   * @param $group
291   *   The type of assertion - examples are "Browser", "PHP".
292   * @return
306   * @param $group
307   *   The type of assertion - examples are "Browser", "PHP".
308   * @return
1731   *   defined by the cURL library. For a list of valid options, see
1732   *   http://www.php.net/manual/function.curl-setopt.php
1733   * @param $redirect
2524   *   format and return values see the SimpleXML documentation,
2525   *   http://us.php.net/manual/function.simplexml-element-xpath.php.
2526   */
ts.php https://bitbucket.org/jonarano/joneame.git | PHP | 134 lines
4/*
5* File: CaptchaSecurityImages.php
6* Author: Simon Jarvis
8* Date: 03/08/06
9* Link: http://www.white-hat-web-design.co.uk/articles/php-captcha.php
10* 
56		//$text_color = imagecolorallocate($image, 20, 40, 100);
57		$text_color = imagecolorallocate($image, mt_rand(140,148),mt_rand(72,80),mt_rand(0,5));
58		//$noise_color = imagecolorallocate($image, 100, 120, 180);
58		//$noise_color = imagecolorallocate($image, 100, 120, 180);
59		$noise_color = imagecolorallocate($image, mt_rand(250,255), mt_rand(95,105), mt_rand(0,5));
60		/* generate random dots in background */
67		for( $i=0; $i<($width*$height)/150; $i++ ) {
68			imageline($image, mt_rand(0,$width), mt_rand(0,$height), mt_rand(0,$width), mt_rand(0,$height), $noise_color);
69		}
ts.php https://bitbucket.org/jonarano/joneame.git | PHP | 134 lines
4/*

5* File: CaptchaSecurityImages.php

6* Author: Simon Jarvis

8* Date: 03/08/06

9* Link: http://www.white-hat-web-design.co.uk/articles/php-captcha.php

10* 

56		//$text_color = imagecolorallocate($image, 20, 40, 100);

57		$text_color = imagecolorallocate($image, mt_rand(140,148),mt_rand(72,80),mt_rand(0,5));

58		//$noise_color = imagecolorallocate($image, 100, 120, 180);

58		//$noise_color = imagecolorallocate($image, 100, 120, 180);

59		$noise_color = imagecolorallocate($image, mt_rand(250,255), mt_rand(95,105), mt_rand(0,5));

60		/* generate random dots in background */

67		for( $i=0; $i<($width*$height)/150; $i++ ) {

68			imageline($image, mt_rand(0,$width), mt_rand(0,$height), mt_rand(0,$width), mt_rand(0,$height), $noise_color);

69		}

Transparent.php https://bitbucket.org/vladimiraleksiev/mhbg | PHP | 187 lines
1<?php
2/**
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
20 * @version    $Id: Image.php 16971 2009-07-22 18:05:45Z mikaelkael $
21 */
102        for ($i=0; $i<$this->_dotNoiseLevel; $i++) {
103           imagefilledellipse($img, mt_rand(0,$w), mt_rand(0,$h), 2, 2, $text_color);
104        }
105        for($i=0; $i<$this->_lineNoiseLevel; $i++) {
106           imageline($img, mt_rand(0,$w), mt_rand(0,$h), mt_rand(0,$w), mt_rand(0,$h), $text_color);
107        }
169        for ($i=0; $i<$this->_dotNoiseLevel; $i++) {
170            imagefilledellipse($img2, mt_rand(0,$w), mt_rand(0,$h), 2, 2, $text_color);
171        }
172        for ($i=0; $i<$this->_lineNoiseLevel; $i++) {
173           imageline($img2, mt_rand(0,$w), mt_rand(0,$h), mt_rand(0,$w), mt_rand(0,$h), $text_color);
174        }
captchac_code.php https://bitbucket.org/ElecTriNo/bbbweb | PHP | 263 lines
1<?php
2
3// -------------------------------------------------------------------------------------
4// Captcha Creator PHP Image Displaying Script.
5// Copyright (c) 2007 Alexandru Marias. All rights reserved
13
14include_once('captchac_config.php'); // Security functions
15include_once('captchac_lib.php'); // Security functions
39
40$fontno = mt_rand(0,$FontsNo-1);
41$font = $fontl[$fontno];
57
58  $size = mt_rand($CFontSizeMin, $CFontSizeMax);
59  $angle = mt_rand($CFontRotMin, $CFontRotMax);
95$im = ImageCreate($image_width, $image_height);
96$cs = mt_rand(1,3);
97
DBManagerTest.php https://github.com/mikmagic/sugarcrm_dev.git | PHP | 1,418 lines
1<?php
2/*********************************************************************************
37 
38require_once 'include/database/DBManagerFactory.php';
39require_once 'modules/Contacts/Contact.php';
40
41class DBManagerTest extends Sugar_PHPUnit_Framework_TestCase
42{
67            $bean = new Contact();
68            $bean->id = "$i-test" . mt_rand();
69            $bean->last_name = "foobar";
134        $bean = new Contact();
135        $bean->last_name = 'foobar' . mt_rand();
136        $bean->id   = 'test' . mt_rand();
149        $bean = new Contact();
150        $bean->last_name = 'foobar' . mt_rand();
151        $bean->id   = 'test' . mt_rand();
PartKeepr.php https://github.com/scrupeus/PartKeepr.git | PHP | 469 lines
1<?php
2namespace PartKeepr;
78				"CreateStatisticSnapshot.php",
79				"UpdatePartCacheData.php",
80				"UpdateTipsOfTheDay.php",
80				"UpdateTipsOfTheDay.php",
81				"CheckForUpdates.php"
82				);
97		if ($environment != null) {
98			$config = self::getRootDirectory()."/config-$environment.php";
99		} else {
396	      // 32 bits for "time_low"
397	      mt_rand(0, 0xffff), mt_rand(0, 0xffff),
398	
411	      // 48 bits for "node"
412	      mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)
413	    );
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21