100+ results results for 'php mt_rand repo:enormego/EightPHP' (580 ms)
1<?php 2class ControllerPaymentFirstdata extends Controller { 24 $data['timestamp'] = date('Y:m:d-H:i:s'); 25 $data['order_id'] = 'CON-' . $this->session->data['order_id'] . 'T' . $data['timestamp'] . mt_rand(1, 999); 26 $data['url_success'] = $this->url->link('checkout/success', '', 'SSL');index.php https://gitlab.com/endomorphosis/jeffersonsmithmayor | PHP | 172 lines
15 <?php if (wptouch_get_comment_count() && !is_archive() && !is_search() && bnc_can_show_comments() ) { ?> 16 <div class="<?php if ($wptouch_settings['post-cal-thumb'] == 'nothing-shown') { echo 'nothing-shown ';} ?>comment-bubble<?php if ( wptouch_get_comment_count() > 99 ) echo '-big'; ?>"> 17 <?php comments_number('0','1','%'); ?> 37 <div id="arc-top" class="archive-top-left month-<?php echo get_the_time('m') ?>"> 38 <?php echo get_the_time('M') ?> <?php echo get_the_time('j') ?>, <?php echo get_the_time('Y') ?> 39 </div> 126 <div class="post-author"> 127 <?php if ($wptouch_settings['post-cal-thumb'] != 'calendar-icons') { ?><span class="lead"><?php _e("Written on", "wptouch"); ?></span> <?php echo get_the_time('d.m.Y') ?> <?php _e("at", "wptouch"); ?> <?php echo get_the_time('G:i') ?><br /><?php if (!bnc_show_author()) { echo '<br />';} ?><?php } ?> 128 <?php if (bnc_show_author()) { ?><span class="lead"><?php _e("By", "wptouch"); ?></span> <?php the_author(); ?><br /><?php } ?> 132 <div class="clearer"></div> 133 <div id="entry-<?php the_ID(); ?>" <?php if (bnc_excerpt_enabled()) { ?>style="display:none"<?php } ?> class="mainentry <?php echo $wptouch_settings['style-text-justify']; ?>"> 134 <?php the_excerpt(); ?> 144 <div id="spinner<?php echo md5($_SERVER['REQUEST_URI']); ?>" class="spin" style="display:none"></div> 145 <a class="ajax" href="javascript:return false;" onclick="$wpt('#spinner<?php echo md5($_SERVER['REQUEST_URI']); ?>').fadeIn(200); $wpt('#ajaxentries<?php echo md5($_SERVER['REQUEST_URI']); ?>').load('<?php echo get_next_posts_page_link(); ?>', {}, function(){ $wpt('#call<?php echo md5($_SERVER['REQUEST_URI']); ?>').fadeOut();});"> 146 <?php _e( "Load more entries...", "wptouch" ); ?>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('<', '>'), array('<', '>'), $str); 179 $str = str_replace(array('<?php', '?>', '\\'), 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('<?php', '?>', '\\'), $str); 190 return $str;VarCloner.php https://gitlab.com/alamgircsejnu/AMS-Project-Laravel | PHP | 324 lines
1<?php 2 40 $cookie = (object) array(); // Unique object used to detect hard references 41 $gid = uniqid(mt_rand(), true); // Unique string used to detect the special $GLOBALS variable 42 $a = null; // Array cast for nested structures 148 case 'object': 149 if (empty($objRefs[$h = $zval['object_handle'] ?: ($hashMask ^ hexdec(substr(spl_object_hash($v), $hashOffset, PHP_INT_SIZE)))])) { 150 $stub = new Stub(); 164 } else { 165 $h = $hashMask ^ hexdec(substr(spl_object_hash($stub->value), $hashOffset, PHP_INT_SIZE)); 166 } 300 $obj = (object) array(); 301 self::$hashOffset = 16 - PHP_INT_SIZE; 302 self::$hashMask = -1; 321 322 self::$hashMask ^= hexdec(substr(spl_object_hash($obj), self::$hashOffset, PHP_INT_SIZE)); 323 }Google_MediaFileUpload.php https://gitlab.com/meixnertobias/thaimaidaiproductionwp | PHP | 262 lines
1<?php 2/** 125 // This is a multipart/related upload. 126 $boundary = isset($params['boundary']['value']) ? $params['boundary']['value'] : mt_rand(); 127 $boundary = str_replace('"', '', $boundary);PwFindPassword.php https://gitlab.com/wuhang2003/phpwind | PHP | 323 lines
1<?php 2Wind::import('LIB:utility.PwMail'); 7 * @author xiaoxia.xu <xiaoxia.xuxx@aliyun-inc.com> 8 * @copyright ©2003-2103 phpwind.com 9 * @license http://www.phpwind.com 9 * @license http://www.phpwind.com 10 * @version $Id: PwFindPassword.php 24177 2013-01-22 10:36:09Z xiaoxia.xuxx $ 11 * @package src.service.user.srv 70 //TODO 产生激活码的方法 71 $code = substr(md5(Pw::getTime()), mt_rand(1, 8), 8); 72 $url = WindUrlHelper::createUrl('u/findPwd/resetpwd', array('code' => $code, '_statu' => $state));DirectoryResourceTest.php https://gitlab.com/merial/WETE_Ryhma3 | PHP | 166 lines
1<?php 2 15 16class DirectoryResourceTest extends \PHPUnit_Framework_TestCase 17{ 70 71 $resource = new DirectoryResource('/____foo/foobar'.mt_rand(1, 999999)); 72 $this->assertFalse($resource->isFresh(time()), '->isFresh() returns false if the resource does not exist');WaxSession.php https://gitlab.com/sheldonels/phpwax | PHP | 163 lines
1<?php 2 9 //garbage collection 10 $cmd = "php ".__FILE__." "; 11 $run_garbage_collection = true; 49 } 50 }else $this->id = $this->safe_encrypt($_SERVER['REMOTE_ADDR'].microtime().mt_rand()); 51 115 $itoa64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789./'; 116 $random = substr(md5(mt_rand()), 0, 16); 117 if($iterations < 4 || $iterations > 31) $iterations = 8;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) ] ); 143PAN.generate.ts git://github.com/benkeen/generatedata.git | TypeScript | 250 lines
58 $jcbCards = array("jcb15", "jcb16"); 59 $selectedCard = $jcbCards[mt_rand(0, 1)]; 60 } 141 for ($i=0; $i<$len; $i++) { 142 if ($currFormat[$i] == "X") { // PHP version of a charAt 143 $count_X++; 153 } else { 154 $chosenFormat = $matchingFormats[mt_rand(0, count($matchingFormats)-1)]; 155 return trim($chosenFormat); 180 if (count($lengths) >= 1) { 181 $chosenLength = $lengths[mt_rand(0, count($lengths)-1)]; 182 } 214// while ($count < ($length - 1)) { 215// $ccNumber .= mt_rand(0, 9); 216// $count++;Tools.php https://bitbucket.org/thuctapgridy/muagium.git | PHP | 268 lines
1<?php 2 25 for ($i = 0; $i < $length; $i++) { 26 $str .= substr($chars, mt_rand(0, strlen($chars) - 1), 1); 27 }Validation.inc.php https://github.com/goblebun/235real.git | PHP | 415 lines
1<?php 2 3/** 4 * @file classes/security/Validation.inc.php 5 * 245 for ($i=0; $i<$length; $i++) { 246 $password .= mt_rand(1, 4) == 4 ? $numbers[mt_rand(0,strlen($numbers)-1)] : $letters[mt_rand(0, strlen($letters)-1)]; 247 }37611.php https://bitbucket.org/DinoRex99/exploit-database.git | PHP | 196 lines
25 26PoC code follows. In PHP because lol. PoC works on at least 5.x (latest). 27*/ 28 29<?php 30// Impero Education Pro SYSTEM-RCE PoC 38 for ($i = 1; $i < $pad; $i++) 39 $padstr .= chr(mt_rand(0,255)); 40 return $str.$padstr.chr($pad);Encrypt.php https://github.com/pussbb/CI_DEV_CMS.git | PHP | 547 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 * 242 { 243 $rand .= mt_rand(0, mt_getrandmax()); 244 } 545 546/* End of file Encrypt.php */ 547/* Location: ./system/libraries/Encrypt.php */account.php https://gitlab.com/oslc-cm-server/olbergers-ff5-oslc.git | PHP | 245 lines
1<?php 2/** 2/** 3 * account.php - A library of common account management functions. 4 * 127 mt_srand((double)microtime()*1000000); 128 $num = mt_rand(46,122); 129 return $num; 190 // ncommander: Support clear password hashing 191 // for usergroup_plain.php 192 global $unix_cipher;Profiler.php https://gitlab.com/galaxy-pidev/AllForDealWeb | PHP | 295 lines
1<?php 2 177 * 178 * @see http://php.net/manual/en/datetime.formats.php for the supported date/time formats 179 */ 199 200 $profile = new Profile(substr(hash('sha256', uniqid(mt_rand(), true)), 0, 6)); 201 $profile->setTime(time());PHP.php https://gitlab.com/18runt88/cdb | PHP | 241 lines
1<?php 2 9/** 10 * This is a port of D.J. Bernstein's CDB to PHP. It's based on the copy that 11 * appears in PHP 5.3. Changes are: 36 */ 37class PHP extends Writer { 38 protected $hplist; 48 $this->realFileName = $fileName; 49 $this->tmpFileName = $fileName . '.tmp.' . mt_rand( 0, 0x7fffffff ); 50 $this->handle = fopen( $this->tmpFileName, 'wb' );contacts.inc https://github.com/wrobel/horde-fw3.git | PHP | 203 lines
134</script> 135<form method="post" name="contacts" onsubmit="passAddresses();" action="contacts.php?nocache=<?php echo md5(mt_rand()) ?>"> 136<input type="hidden" name="sa" /> 149 <?php foreach ($source_list as $key => $select): ?> 150 <option value="<?php echo htmlspecialchars($key) ?>"<?php if ($key == $source) echo ' selected="selected"' ?>><?php echo htmlspecialchars($select) ?></option> 151 <?php endforeach; ?> 166 <?php else: ?> 167 <option value="<?php echo rawurlencode($addr['email']) ?>"><?php echo htmlspecialchars($addr['name']) ?></option> 168 <?php endif; endforeach; ?> 179 <?php foreach ($selected_addresses as $value => $text): ?> 180 <option value="<?php echo htmlspecialchars($value) ?>"><?php echo htmlspecialchars($text) ?></option> 181 <?php endforeach; ?> 189 <option value="name"<?php echo $display == 'name' ? ' selected="selected"' : '' ?>><?php echo _("Name") ?></option> 190 <option value="email"<?php echo $display == 'email' ? ' selected="selected"' : '' ?>><?php echo _("Email Address") ?></option> 191 </select>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/>SecureRandom.php https://gitlab.com/TouirMohamedMarwen/Symfony2 | PHP | 114 lines
1<?php 2 45 // determine whether to use OpenSSL 46 if (defined('PHP_WINDOWS_VERSION_BUILD') && PHP_VERSION_ID < 50304) { 47 $this->useOpenSsl = false; 84 } else { 85 $this->seed = uniqid(mt_rand(), true); 86 $this->updateSeed(); 92 static $incr = 1; 93 $bytes .= hash('sha512', $incr++.$this->seed.uniqid(mt_rand(), true).$nbBytes, true); 94 $this->seed = base64_encode(hash('sha512', $this->seed.$bytes.$nbBytes, true)); 107 { 108 if (!$this->seedUpdated && $this->seedLastUpdatedAt < time() - mt_rand(1, 10)) { 109 file_put_contents($this->seedFile, json_encode(array($this->seed, microtime(true))));realex_remote.php https://gitlab.com/m.mirsamie/opencart | PHP | 341 lines
1<?php 2class ControllerPaymentRealexRemote extends Controller { 92 93 $order_ref = $order_id.'T'.strftime("%Y%m%d%H%M%S").mt_rand(1, 999); 94MY_Upload.php https://bitbucket.org/IceElect/slsocial.git | PHP | 364 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 * 69 mt_srand(); 70 $filename = md5(uniqid(mt_rand())).$this->file_ext; 71 }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();edit-image-size.php https://bitbucket.org/studioparkers/spinozacentre.2018.nl.git | PHP | 218 lines
84 <div class="media-frame wp-core-ui"> 85 <div class="media-frame-title"><h1><?php _e( 'Edit crop formats from full image', YOIMG_DOMAIN ); ?> (<?php echo $full_image_attributes[1]; ?>x<?php echo $full_image_attributes[2]; ?>)</h1></div> 86 <div class="media-frame-router"> 118 <div id="yoimg-replace-restore-wrapper"> 119 <div id="yoimg-replace-img-btn" style="display:none;" title="<?php _e( 'Replace image source for', YOIMG_DOMAIN ); ?> <?php echo $yoimg_image_size; ?>" class="button button-primary button-large"><?php _e( 'Replace', YOIMG_DOMAIN ); ?></div> 120 <?php if ( $has_replacement ) {?> 120 <?php if ( $has_replacement ) {?> 121 <div id="yoimg-restore-img-btn" title="<?php _e( 'Restore original image source for', YOIMG_DOMAIN ); ?> <?php echo $yoimg_image_size; ?>" class="button button-large"><?php _e( 'Restore', YOIMG_DOMAIN ); ?></div> 122 <?php } ?> 134 ?> 135 <h3><?php _e( 'Current', YOIMG_DOMAIN ); ?> <?php echo $cropped_image_sizes['name']; ?> (<?php echo $attachment_metadata['sizes'][$yoimg_image_size]['width']; ?>x<?php echo $attachment_metadata['sizes'][$yoimg_image_size]['height']; ?>)</h3> 136 <?php 138 ?> 139 <h3><?php _e( 'Current', YOIMG_DOMAIN ); ?> <?php echo $cropped_image_sizes['name']; ?> (<?php echo $curr_size_width; ?>x<?php echo $curr_size_height; ?>)</h3> 140 <?phpcaptcha_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 */HttpClient.php https://gitlab.com/hop23typhu/list-theme | PHP | 352 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 */ 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(EmailAuthenticateUser.php https://github.com/yinhm/sugarcrm.git | PHP | 164 lines
1<?php 2if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); 43 */ 44require_once('modules/Users/authentication/SugarAuthenticate/SugarAuthenticateUser.php'); 45class EmailAuthenticateUser extends SugarAuthenticateUser { 76 for($i = 0; $i < $this->passwordLength; $i++){ 77 $_SESSION['emailAuthToken'] .= chr(mt_rand(48,90)); 78 } 116 117 require_once("include/SugarPHPMailer.php"); 118 global $locale; 119 $OBCharset = $locale->getPrecedentPreference('default_email_charset'); 120 $notify_mail = new SugarPHPMailer(); 121 $notify_mail->CharSet = $sugar_config['default_charset'];IntegrationTestCase.php https://bitbucket.org/jteppa/access_test.git | PHP | 237 lines
1<?php 2 11 12use PHPUnit\Framework\TestCase; 13 111 if ($legacyTests && empty($tests)) { 112 // add a dummy test to avoid a PHPUnit message 113 return array(array('not', '-', '', array(), '', array())); 161 162 // avoid using the same PHP class name for different cases 163 // only for PHP 5.2+ 163 // only for PHP 5.2+ 164 if (PHP_VERSION_ID >= 50300) { 165 $p = new ReflectionProperty($twig, 'templateClassPrefix'); 200 list($class) = explode(':', $exception); 201 $constraintClass = class_exists('PHPUnit\Framework\Constraint\Exception') ? 'PHPUnit\Framework\Constraint\Exception' : 'PHPUnit_Framework_Constraint_Exception'; 202 $this->assertThat(null, new $constraintClass($class));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')order.base.php https://github.com/wallage/ecmall.git | PHP | 405 lines
1<?php 2 184 $z = date('z', $timestamp); 185 $order_sn = $y . str_pad($z, 3, '0', STR_PAD_LEFT) . str_pad(mt_rand(1, 99999), 5, '0', STR_PAD_LEFT); 186LibraryInstallerTest.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();captcha_helper.php https://gitlab.com/sops21/mt-rubidoux.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 */PhpdocToCommentFixerTest.php git://github.com/fabpot/PHP-CS-Fixer.git | PHP | 533 lines
1<?php 2 3/* 4 * This file is part of PHP CS Fixer. 5 * 17/** 18 * @author Ceeram <ceeram@cakephp.org> 19 */ 19 */ 20class PhpdocToCommentFixerTest extends AbstractFixerTestBase 21{ 30 /** 31 * @requires PHP 5.4 32 * @dataProvider provideTraits 43 $cases[] = array( 44 '<?php 45/**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 }SessionManager.inc.php https://github.com/mcrider/pkp-lib.git | PHP | 256 lines
1<?php 2 3/** 4 * @file classes/session/SessionManager.inc.php 5 * 11 * 12 * @brief Implements PHP methods for a custom session storage handler (see http://php.net/session). 13 */ 25 * Constructor. 26 * Initialize session configuration and set PHP session handlers. 27 * Attempts to rejoin a user's session if it exists, or create a new session otherwise. 33 34 // Configure PHP session parameters 35 ini_set('session.use_trans_sid', 0); 36 ini_set('session.save_handler', 'user'); 37 ini_set('session.serialize_handler', 'php'); 38 ini_set('session.use_cookies', 1);FancyCaptcha.class.php https://github.com/brion/mediawiki-svn.git | PHP | 249 lines
1<?php 2 103 104 $place = mt_rand( 0, count( $dirs ) - 1 ); 105 // In case all dirs are not filled, 124 } 125 $n = mt_rand( 0, $this->countFiles( $directory ) - 1 ); 126 $dir = opendir( $directory ); 193 global $IP; 194 require_once "$IP/includes/StreamFile.php"; 195 header( "Cache-Control: private, s-maxage=0, max-age=3600" );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) {PrettyPrinterAbstract.php https://gitlab.com/xolotsoft/pumasruiz | PHP | 262 lines
75 * 76 * @param PHPParser_Node[] $stmts Array of statements 77 * 88 * 89 * @param PHPParser_Node_Expr $node Expression node 90 * 119 * 120 * @param PHPParser_Node[] $nodes Array of nodes 121 */ 134 * 135 * @param PHPParser_Node[] $nodes Array of nodes 136 * @param bool $indent Whether to indent the printed nodes 169 170 protected function pInfixOp($type, PHPParser_Node $leftNode, $operatorString, PHPParser_Node $rightNode) { 171 list($precedence, $associativity) = $this->precedenceMap[$type];Profiler.php https://github.com/Shumkov/TimeRanger.git | PHP | 251 lines
1<?php 2 30 if (self::$_enabled) { 31 require_once 'TimeRanger/Exception.php'; 32 throw new TimeRanger_Exception('Profiler already started'); 35 if ($probability !== false && !is_integer($probability) && $probability <= 0) { 36 require_once 'TimeRanger/Exception.php'; 37 throw new TimeRanger_Exception('Probability must be a positive integer or false'); 41 if (!extension_loaded('xhprof')) { 42 require_once 'TimeRanger/Exception.php'; 43 throw new TimeRanger_Exception("The xhprof extension is required: http://pecl.php.net/package/xhprof"); 50 51 if (!$probability || mt_rand(1, $probability) == 1) { 52 $flags = 0; 76 if (!self::$_enabled) { 77 require_once 'Geometria/Profile/Exception.php'; 78 throw new TimeRanger_Exception('Profiler not started');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 }OAuth1.php https://bitbucket.org/ushakovteam/tour.temnikova.ru.git | PHP | 402 lines
1<?php 2/** 19 * 20 * ```php 21 * use yii\authclient\OAuth1; 263 { 264 return md5(microtime() . mt_rand()); 265 } 344 $url, 345 http_build_query($params, '', '&', PHP_QUERY_RFC3986) 346 ];file.php https://github.com/mjsilva/mjs.me.git | PHP | 349 lines
1<?php 2/** 2/** 3 * Fuel is a fast, lightweight, community driven PHP5 framework. 4 * 9 * @copyright 2010 - 2011 Fuel Development Team 10 * @link http://fuelphp.com 11 */ 165 // do some garbage collection 166 if (mt_rand(0,100) < $this->config['gc_probability']) 167 {Parser.php https://gitlab.com/andriaripratama/dkppu-payment-gateway | PHP | 399 lines
1<?php 2 51 { 52 return sprintf('__internal_%s', hash('sha256', uniqid(mt_rand(), true), false)); 53 } 292 { 293 $template->setIndex(mt_rand()); 294CacheBase.php https://gitlab.com/x0139/sstu.gov39.ru | PHP | 368 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 voidWord.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 }CourseController.php https://bitbucket.org/coderpick/bdtutorial.git | PHP | 183 lines
1<?php 2 177 if (Course::withTrashed()->where('slug', $slug)->exists()) { 178 $slug = $slug . mt_rand(10, 99); 179 $this->_slug($slug);UserRepository.php https://bitbucket.org/ghanu/chope.git | PHP | 362 lines
1<?php 2 110 'active' => isset($data['active']) && $data['active'] == '1' ? 1 : 0, 111 'confirmation_code' => md5(uniqid(mt_rand(), true)), 112 'confirmed' => isset($data['confirmed']) && $data['confirmed'] == '1' ? 1 : 0,debug.php https://github.com/ngonchan/fuel.git | PHP | 324 lines
1<?php 2/** 4 * 5 * Fuel is a fast, lightweight, community driven PHP5 framework. 6 * 11 * @copyright 2010 Dan Horrigan 12 * @link http://fuelphp.com 13 */ 37 // If being called from within, show the file above in the backtrack 38 if (strpos($backtrace[0]['file'], 'core/classes/debug.php') !== FALSE) 39 { 89 { 90 $id = 'fuel_debug_'.mt_rand(); 91 if (count($var) > 0) 141 { 142 $id = 'fuel_debug_'.mt_rand(); 143 $vars = get_object_vars($var);file.php https://github.com/jpsullivan/Warehoused.git | PHP | 351 lines
1<?php 2/** 4 * 5 * Fuel is a fast, lightweight, community driven PHP5 framework. 6 * 11 * @copyright 2010 - 2011 Fuel Development Team 12 * @link http://fuelphp.com 13 */ 167 // do some garbage collection 168 if (mt_rand(0,100) < $this->config['gc_probability']) 169 { 350 351/* End of file file.php */ 352CFileCache.php https://github.com/jefftulsa/TrackStar.git | PHP | 217 lines
1<?php 2/** 20 * @author Qiang Xue <qiang.xue@gmail.com> 21 * @version $Id: CFileCache.php 1942 2010-03-21 00:48:04Z alexander.makarow $ 22 * @package system.caching 121 { 122 if(!$this->_gced && mt_rand(0,1000000)<$this->_gcProbability) 123 {CommentItem.php https://bitbucket.org/currentdesign/bcch-annual-report.git | PHP | 212 lines
1<?php 2 207 return [ 208 'status' => $statuses[mt_rand(0, count($statuses) - 1)], 209 ];class-wp-cli.php https://gitlab.com/clakeb/wp-cli | PHP | 468 lines
37 if ( !$configurator ) { 38 $configurator = new WP_CLI\Configurator( WP_CLI_ROOT . '/php/config-spec.php' ); 39 } 81 // clean older files on shutdown with 1/50 probability 82 if ( 0 === mt_rand( 0, 50 ) ) { 83 register_shutdown_function( function () use ( $cache ) { 393 394 $php_bin = self::get_php_binary(); 395 400 401 $full_command = "{$php_bin} {$script_path} {$command} {$args} {$assoc_args}"; 402 411 */ 412 private static function get_php_binary() { 413 if ( defined( 'PHP_BINARY' ) )db.php https://github.com/enygma/fuel.git | PHP | 260 lines
1<?php 2/** 4 * 5 * Fuel is a fast, lightweight, community driven PHP5 framework. 6 * 11 * @copyright 2010 Dan Horrigan 12 * @link http://fuelphp.com 13 */ 157 // do some garbage collection 158 if (mt_rand(0,100) < $this->config['gc_probability']) 159 { 259 260/* End of file db.php */ 261MediaWikiGadgetsDefinitionRepo.php https://bitbucket.org/andersus/querytalogo.git | PHP | 247 lines
1<?php 2use MediaWiki\MediaWikiServices; 97 // Set a modest TTL to keep the WAN key in cache 98 $t1Cache->set( $key, $value, mt_rand( 300, 600 ) ); 99 }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 *FileServ.php https://bitbucket.org/jasechen/ea-alfa-api.git | PHP | 286 lines
1<?php 2 76 77 $filename = Carbon::now()->timestamp . mt_rand(100000, 999999); 78 $fileExtension = empty($extension) ? $file->extension() : $extension;test-deprecated.php https://gitlab.com/aristath/mdl | PHP | 55 lines
1<?php 2 23 public function test_kirki_sanitize_hex() { 24 $random_color = str_pad( dechex( mt_rand( 0, 255 ) ), 2, '0', STR_PAD_LEFT) . str_pad( dechex( mt_rand( 0, 255 ) ), 2, '0', STR_PAD_LEFT) . str_pad( dechex( mt_rand( 0, 255 ) ), 2, '0', STR_PAD_LEFT); 25 $this->assertEquals( kirki_sanitize_hex( $random_color ), Kirki_Color::sanitize_hex( $random_color ) ); 28 public function test_kirki_get_rgb() { 29 $random_color = str_pad( dechex( mt_rand( 0, 255 ) ), 2, '0', STR_PAD_LEFT) . str_pad( dechex( mt_rand( 0, 255 ) ), 2, '0', STR_PAD_LEFT) . str_pad( dechex( mt_rand( 0, 255 ) ), 2, '0', STR_PAD_LEFT); 30 $this->assertEquals( kirki_get_rgb( $random_color ), Kirki_Color::get_rgb( $random_color ) ); 33 public function test_kirki_get_rgba() { 34 $random_color = str_pad( dechex( mt_rand( 0, 255 ) ), 2, '0', STR_PAD_LEFT) . str_pad( dechex( mt_rand( 0, 255 ) ), 2, '0', STR_PAD_LEFT) . str_pad( dechex( mt_rand( 0, 255 ) ), 2, '0', STR_PAD_LEFT); 35 $this->assertEquals( kirki_get_rgba( $random_color ), Kirki_Color::get_rgba( $random_color ) ); 38 public function test_kirki_get_brightness() { 39 $random_color = str_pad( dechex( mt_rand( 0, 255 ) ), 2, '0', STR_PAD_LEFT) . str_pad( dechex( mt_rand( 0, 255 ) ), 2, '0', STR_PAD_LEFT) . str_pad( dechex( mt_rand( 0, 255 ) ), 2, '0', STR_PAD_LEFT); 40 $this->assertEquals( kirki_get_brightness( $random_color ), Kirki_Color::get_brightness( $random_color ) );ldap.php https://github.com/Studio182/Crystal-Mail.git | PHP | 186 lines
1<?php 2 6 * Driver for passwords stored in LDAP 7 * This driver use the PEAR Net_LDAP2 class (http://pear.php.net/package/Net_LDAP2). 8 * 11 * 12 * function hashPassword based on code from the phpLDAPadmin development team (http://phpldapadmin.sourceforge.net/). 13 * function randomSalt based on code from the phpLDAPadmin development team (http://phpldapadmin.sourceforge.net/). 19 $cmail = cmail::get_instance(); 20 require_once ('Net/LDAP2.php'); 21 74 * Code originaly from the phpLDAPadmin development team 75 * http://phpldapadmin.sourceforge.net/ 76 * 115 if( function_exists('sha1') ) { 116 // use php 4.3.0+ sha1 function, if it is available. 117 $cryptedPassword = '{SHA}' . base64_encode( pack( 'H*' , sha1( $passwordClear) ) );SwimRenderingManagerTest.php https://gitlab.com/src-run/teavee-scribble-down-bundle | PHP | 74 lines
1<?php 2 45 46 $rand1 = mt_rand(10000, 40000); 47 $rand2 = mt_rand(50000, 100000);index.php https://bitbucket.org/phpshouut/superadmin.git | PHP | 319 lines
1<?php 2date_default_timezone_set('Asia/Kolkata'); 2date_default_timezone_set('Asia/Kolkata'); 3//$salt = substr("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" ,mt_rand( 0 ,5 ) ,2 ) .substr( md5( time() ), 1, 5); 4//$password = "123456"; 8 * 9 * An open source application development framework for PHP 10 * 79 ini_set('display_errors', 0); 80 if (version_compare(PHP_VERSION, '5.3', '>=')) 81 { 143 * 144 * Normally you will set your default controller in the routes.php file. 145 * You can, however, force a custom routing by hard-coding a 175 * config class when initialized. This allows you to set custom config 176 * items or override any default config values found in the config.php file. 177 * This can be handy as it permits you to share one application betweenExplosion.php https://gitlab.com/wesleyvanneck/ImagicalMine | PHP | 277 lines
1<?php 2/** 2/** 3 * src/pocketmine/level/Explosion.php 4 * 126 127 for ($blastForce = $this->size * (mt_rand(700, 1300) / 1000); $blastForce > 0; $blastForce -= $this->stepLen * 0.75) { 128 $x = (int) $pointerX; 236 ]), 237 "Fuse" => new ByteTag("Fuse", mt_rand(10, 30)) 238 ])); 239 $tnt->spawnToAll(); 240 } elseif (mt_rand(0, 100) < $yield) { 241 foreach ($block->getDrops($air) as $drop) {Rand.php https://gitlab.com/yousafsyed/easternglamor | PHP | 212 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,CustomOptions.php https://gitlab.com/blingbang2016/shop | PHP | 386 lines
1<?php 2/** 9 * It is also available through the world-wide-web at this URL: 10 * http://opensource.org/licenses/osl-3.0.php 11 * If you did not receive a copy of the license and are unable to 23 * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com) 24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 25 */ 65 if (isset($data['preset'])) { 66 $preset = $this->replaceData($this->getPreset($data['preset']), mt_rand()); 67 unset($data['preset']); 107 * 108 * @SuppressWarnings(PHPMD.UnusedFormalParameter) 109 */ 130 * 131 * @SuppressWarnings(PHPMD.ExcessiveMethodLength) 132 */Payu.php https://bitbucket.org/Beingvinaygupta/attendenceschool.git | PHP | 140 lines
1<?php 2 19 $pre_session_data = $this->session->userdata('params'); 20 $txnid = substr(hash('sha256', mt_rand() . microtime()), 0, 20); 21 $pre_session_data['txn_id'] = $txnid;Internet.php https://gitlab.com/alamgircsejnu/AMS-Project-Laravel | PHP | 339 lines
1<?php 2 152 if ($variableNbWords) { 153 $nbWords = (int) ($nbWords * mt_rand(60, 140) / 100) + 1; 154 } 164 { 165 return long2ip(mt_rand(0, 1) == 0 ? mt_rand(-2147483648, -2) : mt_rand(16777216, 2147483647)); 166 } 174 for ($i=0; $i < 8; $i++) { 175 $res []= dechex(mt_rand(0, "65535")); 176 }AbstractTrait.php https://github.com/stof/symfony.git | PHP | 283 lines
1<?php 2 109 if ($cleared = $this->versioningIsEnabled) { 110 $namespaceVersion = substr_replace(base64_encode(pack('V', mt_rand())), ':', 5); 111 try {AdminController.php https://gitlab.com/sawmainek/528Express-Server | PHP | 423 lines
1<?php 2 235 'phone' => $request->phone, 236 'code' => mt_rand(100000, 999999), 237 'photo' => isset($safeName)?$safeName:$request->photo,LockBackendAbstract.php https://gitlab.com/geeta7/drupal | PHP | 79 lines
1<?php 2 74 if (!isset($this->lockId)) { 75 $this->lockId = uniqid(mt_rand(), TRUE); 76 }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']))Captcha.php https://gitlab.com/lcp0578/yaf-1.git | PHP | 113 lines
1<?php 2 40 41 $color = imagecolorallocate($image, mt_rand(0, 100), mt_rand(20, 120), mt_rand(50, 150)); 42 $rand = 0; 72 $b = Array(225, 236, 166, 125); 73 $key = mt_rand(0, 3); 74 80 81 $string = imagecolorallocate($canvas, mt_rand(0, 200), mt_rand(0, 120), mt_rand(0, 120)); 82 83 for ($i = 0; $i < 10; $i++) 84 imagearc($canvas, mt_rand(-10, $width), mt_rand(-10, $height), mt_rand(30, 200), mt_rand(20, 200), 55, 44, $string); 85 for ($i = 0; $i < 25; $i++) 85 for ($i = 0; $i < 25; $i++) 86 imagesetpixel($canvas, mt_rand(0, $width), mt_rand(0, $height), $string); 87 for ($i = 0; $i < $len; $i++)BundleProductsFixture.php https://bitbucket.org/KholoshaMaxim/kms_someapi2.git | PHP | 261 lines
1<?php 2/** 24 * @see setup/performance-toolkit/profiles/ce/small.xml 25 * @SuppressWarnings(PHPMD.CouplingBetweenObjects) 26 */ 102 * {@inheritdoc} 103 * @SuppressWarnings(PHPMD.UnusedLocalVariable) 104 */ 167 return $priceTypeClosure($index) === LinkInterface::PRICE_TYPE_PERCENT 168 ? mt_rand(10, 90) 169 : $this->priceProvider->getPrice($index);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); 116string_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 }gbengine.php https://github.com/gobingoo/Listbingo.git | PHP | 225 lines
1<?php 2 47 { 48 $code .= substr($possible, mt_rand(0, strlen($possible)-1), 1); 49 $i++; 75 { 76 imagefilledellipse($image, mt_rand(0,$this->width), mt_rand(0,$this->height), 1, 1, $this->noise_color); 77 } 80 { 81 imageline($image, mt_rand(0,$this->width), mt_rand(0,$this->height), mt_rand(0,$this->width), mt_rand(0,$this->height), $this->noise_color); 82 } 85 { 86 imagefilledellipse($image, mt_rand(0,$this->width), mt_rand(0,$this->height), 1, 1, $this->noise_color); 87 } 90 { 91 imageline($image, mt_rand(0,$this->width), mt_rand(0,$this->height), mt_rand(0,$this->width), mt_rand(0,$this->height), $this->noise_color); 92 }basic.php https://gitlab.com/BGCX262/zys-blog-svn-to-git.git | PHP | 423 lines
1<?php 2// $Id: basic.php 11 2012-02-08 06:05:02Z zys4416@gmail.com $ 3 4require_once dirname(__FILE__) . '/_setup.php'; 5 44 $author = new Author(); 45 $author->name = 'name - ' . mt_rand(); 46 $author->save(); 65 { 66 $name = 'name - ' . mt_rand(); 67 $author = new Author(array('name' => $name)); 72 73 $new_name = 'name - new - ' . mt_rand(); 74 $author->name = $new_name; 89 $author = new Author(array( 90 'name' => 'congcong - ' . mt_rand(), 91 ));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 305Batch.php https://gitlab.com/meixnertobias/thaimaidaiproductionwp | PHP | 143 lines
1<?php 2/* 18if (!class_exists('Google_Client')) { 19 require_once dirname(__FILE__) . '/../autoload.php'; 20} 44 $this->expected_classes = array(); 45 $boundary = (false == $boundary) ? mt_rand() : $boundary; 46 $this->boundary = str_replace('"', '', $boundary); 51 if (false == $key) { 52 $key = mt_rand(); 53 }YaffmapGlobalUpdate.php https://github.com/wurststulle/yaffmap-backend.git | PHP | 201 lines
1<?php 2class YaffmapGlobalUpdate extends Yaffmap{ 42 $addrMap = new AddrMap(); 43 $addrMap->setId(md5(mt_rand(1, 100000).$if->ipv4Addr.$if->ipv6Addr.date('U'))); 44 $addrMap->setIpv4addr($if->ipv4Addr); 48 $wlIf = new WlIface(); 49 $wlIf->setId(md5(mt_rand(1, 100000).$if->ipv4Addr.$if->ipv6Addr.date('U'))); 50 $wlIf->setIsDummy(1); 69 // add random nodeID 70 $node->setId(md5($item->latitude.$item->longitude.mt_rand(1, 1000).$item->name.date('U'))); 71 $node->setIsGlobalUpdated(true);TExpander.php https://bitbucket.org/jacklan/bloglps.git | PHP | 122 lines
1<?php 2namespace Adianti\Widget\Container; 30 parent::__construct('div'); 31 $this->{'id'} = 'texpander_'.mt_rand(1000000000, 1999999999); 32 $this->{'class'} = 'dropdown'; 36 $this->button->{'type'} = 'button'; 37 $this->button->{'id'} = 'button_'.mt_rand(1000000000, 1999999999); 38 $this->button->{'data-toggle'} = 'dropdown';Gauss.php https://gitlab.com/maxauvy/XG_Project_v2.git | PHP | 128 lines
1<?php 2 38 { 39 $x = (float)mt_rand() / (float)mt_getrandmax(); 40 $y = (float)mt_rand() / (float)mt_getrandmax(); 84 { 85 return mt_rand($min, $max); 86 }Simple.php git://github.com/centurion-project/Centurion.git | PHP | 117 lines
1<?php 2/** 113 114 $this->_setPointer(mt_rand(1, $wordlen)); 115 }FileDownloaderTest.php https://gitlab.com/yousafsyed/easternglamor | PHP | 215 lines
1<?php 2 17 18class FileDownloaderTest extends \PHPUnit_Framework_TestCase 19{ 105 do { 106 $path = sys_get_temp_dir().'/'.md5(time().mt_rand()); 107 } while (file_exists($path)); 190 do { 191 $path = sys_get_temp_dir().'/'.md5(time().mt_rand()); 192 } while (file_exists($path));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 }globalpay_remote.php https://gitlab.com/firstrate/firstrate | PHP | 352 lines
1<?php 2class ControllerPaymentGlobalpayRemote extends Controller { 93 94 $order_ref = $order_id . 'T' . strftime("%Y%m%d%H%M%S") . mt_rand(1, 999); 95NodeTranslationUITest.php https://bitbucket.org/aswinvk28/smartpan-stock-drupal.git | PHP | 269 lines
1<?php 2 154 'uid' => $user->id(), 155 'created' => REQUEST_TIME - mt_rand(0, 1000), 156 );index.php https://gitlab.com/alexprowars/bitrix | PHP | 321 lines
18 19 include(__DIR__.'/version.php'); 20 151 if(!COption::GetOptionString("security", "ipcheck_disable_file")) 152 COption::SetOptionString("security", "ipcheck_disable_file", "/bitrix/modules/ipcheck_disable_".md5(mt_rand())); 153 208 { 209 include($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/security/install/events.php"); 210 } 257 { 258 $APPLICATION->IncludeAdminFile(GetMessage("SEC_INSTALL_TITLE"), $_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/security/install/step1.php"); 259 } 267 $GLOBALS["errors"] = $this->errors; 268 $APPLICATION->IncludeAdminFile(GetMessage("SEC_INSTALL_TITLE"), $_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/security/install/step2.php"); 269 }php.js https://gitlab.com/Mirros/cdnjs | JavaScript | 132 lines
23 atoms: keywords("true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__"), 24 builtin: keywords("func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once"), 25 multiLineStrings: true, 54 var htmlMode = CodeMirror.getMode(config, "text/html"); 55 var phpMode = CodeMirror.getMode(config, phpConfig); 56 82 return style; 83 } else if (isPHP && state.php.tokenize == null && stream.match("?>")) { 84 state.curMode = htmlMode; 103 var html = state.html, htmlNew = CodeMirror.copyState(htmlMode, html), 104 php = state.php, phpNew = CodeMirror.copyState(phpMode, php), cur; 105 if (state.curMode == htmlMode) cur = htmlNew; 130 CodeMirror.defineMIME("application/x-httpd-php-open", {name: "php", startOpen: true}); 131 CodeMirror.defineMIME("text/x-php", phpConfig); 132})();CryptUtil.php https://github.com/lshepard/php-openid-bak.git | PHP | 108 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 }Parser.php https://bitbucket.org/mmahdy/opencart-modules-app.git | PHP | 399 lines
1<?php 2 51 { 52 return sprintf('__internal_%s', hash('sha256', uniqid(mt_rand(), true), false)); 53 } 65 // push all variables into the stack to keep the current state of the parser 66 // using get_object_vars() instead of foreach would lead to https://bugs.php.net/71336 67 $vars = array(); 292 { 293 $template->setIndex(mt_rand()); 294Leaves.php https://gitlab.com/wesleyvanneck/ImagicalMine | PHP | 248 lines
1<?php 2/** 2/** 3 * src/pocketmine/block/Leaves.php 4 * 237 } else { 238 if (mt_rand(1, 20) === 1) { //Saplings 239 $drops[] = [Item::SAPLING, $this->meta & 0x03, 1]; 240 } 241 if (($this->meta & 0x03) === self::OAK and mt_rand(1, 200) === 1) { //Apples 242 $drops[] = [Item::APPLE, 0, 1];class-fs-user-lock.php https://bitbucket.org/RickCalder/durawp_new.git | PHP | 126 lines
1<?php 2 /** 52 $this->_wp_user_id = Freemius::get_current_wp_user_id(); 53 $this->_thread_id = mt_rand( 0, 32000 ); 54 }admin.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 203 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 ); 102 // backwards compatibility for plugins using add_management_page 103 if ( empty( $page_hook ) && 'edit.php' == $pagenow && '' != get_plugin_page_hook($plugin_page, 'tools.php') ) { 104 // There could be plugin specific params on the URL, so we need the whole query string 130 if (! isset($_GET['noheader'])) 131 require_once(ABSPATH . 'wp-admin/admin-header.php'); 132 144 if ( !isset($_GET['noheader'])) 145 require_once(ABSPATH . 'wp-admin/admin-header.php'); 146 163 if ( validate_file($importer) ) 164 wp_redirect( admin_url( 'import.php?invalid=' . $importer ) ); 165admin.php https://gitlab.com/Gashler/dp | PHP | 230 lines
66 67require_once(ABSPATH . 'wp-admin/includes/admin.php'); 68 118 // backwards compatibility for plugins using add_management_page 119 if ( empty( $page_hook ) && 'edit.php' == $pagenow && '' != get_plugin_page_hook($plugin_page, 'tools.php') ) { 120 // There could be plugin specific params on the URL, so we need the whole query string 167 168 include(ABSPATH . 'wp-admin/admin-footer.php'); 169 183 if ( ! isset($wp_importers[$importer]) || ! is_callable($wp_importers[$importer][2]) ) { 184 wp_redirect( admin_url( 'import.php?invalid=' . $importer ) ); 185 exit; 213 do_action("load-$pagenow"); 214 // Backwards compatibility with old load-page-new.php, load-page.php, 215 // and load-categories.php actions.CaveCommand.php https://gitlab.com/ArrowDCA/genisys | PHP | 335 lines
56 $caves[1] = isset($args[1]) ? $args[1] : mt_rand(10, 300); 57 $caves[2] = isset($args[2]) ? $args[2] : mt_rand(1, 6); 58 $caves[4] = isset($args[3]) ? $args[3] : mt_rand(1, 10); 94 }else{ 95 $yaw = mt_rand(0, 100) * 72; 96 } 132 //$exPos = new Position($s2[0], $s2[1], $s2[2], $level); 133 //$this->explodeBlocks($exPos, mt_rand(2, 4), mt_rand(1, 4)); 134 143 144 //$i = 5 + mt_rand(0, 100) * 0.05; 145 $x = $s1[0]; 285 $l = (mt_rand(0, 1) == 0) ? new Water() : new Lava(); 286 $i = mt_rand(3, 6); 287 $level->setBlock(new Vector3($x + $i - 3, $y + 1, $z + 3), $l);add_config_settings.php https://github.com/bantu/phpbb.git | PHP | 372 lines
5 * 6 * @copyright (c) phpBB Limited <https://www.phpbb.com> 7 * @license GNU General Public License, version 2 (GPL-2.0) 20 */ 21class add_config_settings extends \phpbb\install\task_base 22{ 93 * @param \phpbb\install\helper\iohandler\iohandler_interface $iohandler Installer's input-output handler 94 * @param \phpbb\install\helper\container_factory $container Installer's DI container 95 * @param \phpbb\language\language $language Language service 95 * @param \phpbb\language\language $language Language service 96 * @param string $phpbb_root_path Path to phpBB's root 97 */ 110 $this->password_manager = $container->get('passwords.manager'); 111 $this->phpbb_root_path = $phpbb_root_path; 112CacheBase.php git://github.com/jasonhinkle/phreeze.git | PHP | 318 lines
4 * 5 * Copyright (c) 2006 - 2013 PHPExcel 6 * 22 * @package PHPExcel_CachedObjectStorage 23 * @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 33 * @package PHPExcel_CachedObjectStorage 34 * @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 35 */ 47 * 48 * @var PHPExcel_Cell 49 */ 293 * 294 * @param PHPExcel_Worksheet $parent The new worksheet 295 * @return voidStartSession.php https://gitlab.com/Laolballs/evotting | PHP | 248 lines
1<?php namespace Illuminate\Session\Middleware; 2 52 // so that the data is ready for an application. Note that the Laravel sessions 53 // do not make use of PHP "native" sessions in any way since they are crappy. 54 if ($this->sessionConfigured()) 164 { 165 return mt_rand(1, $config['lottery'][1]) <= $config['lottery'][0]; 166 }ext_spl.cpp https://gitlab.com/Blueprint-Marketing/hhvm | C++ | 381 lines
2 +----------------------------------------------------------------------+ 3 | HipHop for PHP | 4 +----------------------------------------------------------------------+ 5 | Copyright (c) 2010-2014 Facebook, Inc. (http://www.facebook.com) | 6 | Copyright (c) 1997-2010 The PHP Group | 7 +----------------------------------------------------------------------+ 7 +----------------------------------------------------------------------+ 8 | This source file is subject to version 3.01 of the PHP license, | 9 | that is bundled with this package in the file LICENSE, and is | 10 | available through the world-wide-web at the following url: | 11 | http://www.php.net/license/3_01.txt | 12 | If you did not receive a copy of the PHP license and are unable to | 13 | obtain it through the world-wide-web, please send a note to | 14 | license@php.net so we can mail you a copy immediately. | 15 +----------------------------------------------------------------------+HtmlDumper.php https://gitlab.com/Urtekin/ertexAdmin | PHP | 452 lines
1<?php 2 23{ 24 public static $defaultOutput = 'php://output'; 25 53 AbstractDumper::__construct($output, $charset); 54 $this->dumpId = 'sf-dump-'.mt_rand(); 55 } 105 parent::dump($data, $output); 106 $this->dumpId = 'sf-dump-'.mt_rand(); 107 }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 }admin.php https://bitbucket.org/w1nterheart/nmm-nature-is-lit-wp.git | PHP | 386 lines
73 */ 74 if ( $c <= 50 || ( $c > 50 && mt_rand( 0, (int) ( $c / 50 ) ) == 1 ) ) { 75 require_once( ABSPATH . WPINC . '/http.php' ); 161 * Note, this does not just run on user-facing admin screens. 162 * It runs on admin-ajax.php and admin-post.php as well. 163 * 179 // Back-compat for plugins using add_management_page(). 180 if ( empty( $page_hook ) && 'edit.php' == $pagenow && '' != get_plugin_page_hook( $plugin_page, 'tools.php' ) ) { 181 // There could be plugin specific params on the URL, so we need the whole query string 263 if ( ! isset( $_GET['noheader'] ) ) { 264 require_once( ABSPATH . 'wp-admin/admin-header.php' ); 265 } 368 } 369 } elseif ( 'term.php' === $pagenow ) { 370 do_action( 'load-edit-tags.php' );reset_password.php https://github.com/davidma/ICRO-Web-Tool.git | PHP | 88 lines
1<?php 2 3 // Start the page 4 require("template/header.php"); 5 echo "<div class='newsbox'>"; 24 { 25 $pw_random .= $characters[mt_rand(0, strlen($characters))]; 26 } 35 { 36 print 'Error adding user to DB - '.$theDB->lasterror().' - <a href="user_add.php">try again?</a>'; 37 } 57 echo "Select a User to modify:<br/><br/>"; 58 echo "<form action='reset_password.php' method='post'>"; 59Dropper.php https://gitlab.com/ArrowDCA/genisys | PHP | 287 lines
1<?php 2 210 elseif($max == 0) $itemArr = $itemIndex[0]; 211 else $itemArr = $itemIndex[mt_rand(0, $max)]; 212cls_session.php https://bitbucket.org/huanteng/touyou.git | PHP | 290 lines
1<?php 2 12 * $Author: liubo $ 13 * $Id: cls_session.php 17217 2011-01-19 06:29:08Z liubo $ 14*/ 123 { 124 $this->session_id = md5(uniqid(mt_rand(), true)); 125 235 /* 闅忔満瀵 sessions_data 鐨勫簱杩涜?鍒犻櫎鎿嶄綔 */ 236 if (mt_rand(0, 2) == 2) 237 {ContentTranslationSyncUnitTest.php https://bitbucket.org/razum-io/ns-hub.git | PHP | 260 lines
1<?php 2 116 $field_values = $this->unchangedFieldValues; 117 $sync_delta = mt_rand(0, count($field_values[$sync_langcode]) - 1); 118 unset($field_values[$sync_langcode][$sync_delta]);Token.php https://github.com/koriym/BEAR.Saturday.git | PHP | 141 lines
1<?php 2/** 4 * 5 * @license http://opensource.org/licenses/bsd-license.php BSD 6 */ 72 $csrfToken = $this->_getRndToken(session_id(), self::SESSION_CSRF_LEN); 73 $poeToken = $this->_getRndToken(uniqid(mt_rand(), true), self::SESSION_POE_LEN); 74 $token = $csrfToken . $poeToken;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();playlist_localizations.php https://bitbucket.org/huuvan20/api-samples.git | PHP | 272 lines
1<?php 2 51// Call set_include_path() as needed to point to your client library. 52 require_once 'Google/Client.php'; 53 require_once 'Google/Service/YouTube.php'; 83$client->setScopes('https://www.googleapis.com/auth/youtube'); 84$redirect = filter_var('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'], 85 FILTER_SANITIZE_URL); 133 // If the user hasn't authorized the app, initiate the OAuth flow 134 $state = mt_rand(); 135 $client->setState($state);example.php https://github.com/ryantenney/php7.git | PHP | 205 lines
1<?php 2/*********************************************************************** 16 17require_once(dirname(__FILE__) . '/std_header.php'); 18 124echo 'rand(100) = ', bi_to_str($c), "<br/>\n"; 125$c = bi_rand(100, 'mt_rand'); // use mt_rand() as random generator 126echo 'rand(100, "mt_rand") = ', bi_to_str($c), "<br/>\n";email.reservation.php https://gitlab.com/kotishe/Warcry-CMS | PHP | 235 lines
1<?php 2if (!defined('init_engine')) 18 //generate the key 19 $key = uniqid(mt_rand(), true) . uniqid(mt_rand(), true); 20pp_express.php https://gitlab.com/firstrate/firstrate | PHP | 358 lines
1<?php 2class ModelPaymentPPExpress extends Model { 75 while (strlen($activate_code)<$len+1) { 76 $activate_code .= $base{mt_rand(0, $max)}; 77 }forgotten.php https://gitlab.com/firstrate/firstrate | PHP | 130 lines
1<?php 2class ControllerAccountForgotten extends Controller { 18 19 $password = substr(sha1(uniqid(mt_rand(), true)), 0, 10); 20session.php git://github.com/bcosca/fatfree.git | PHP | 194 lines
1<?php 2 185 implode(unpack('L',openssl_random_pseudo_bytes(4))): 186 mt_rand() 187 );Attribute.php https://gitlab.com/blingbang2016/shop | PHP | 417 lines
1<?php 2/** 24 */ 25#require_once 'Zend/Ldap/Converter.php'; 26 214 /** 215 * Converts a PHP data type into its LDAP representation 216 * 218 * @param mixed $value 219 * @return string|null - null if the PHP data type cannot be converted. 220 */ 226 /** 227 * Converts an LDAP value into its PHP data type 228 * 313 case self::PASSWORD_HASH_SSHA: 314 $salt = substr(sha1(uniqid(mt_rand(), true), true), 0, 4); 315 $rawHash = sha1($password . $salt, true) . $salt;function_happyhour.php https://github.com/cybernet/CyBerFuN-CoDeX.git | PHP | 101 lines
1<?php 2if(!defined('PUBLIC_ACCESS')) die('Fuck off - You cant access scripts directly fool !'); 9$nextDay = date("Y-m-d" , time()+86400 ); 10$nextHoura = mt_rand(0,2); 11if ($nextHoura == 2) 11if ($nextHoura == 2) 12$nextHourb = mt_rand(0,3); 13else 13else 14$nextHourb = mt_rand(0,9); 15$nextHour = $nextHoura.$nextHourb; 15$nextHour = $nextHoura.$nextHourb; 16$nextMina = mt_rand(0,5); 17$nextMinb = mt_rand(0,9);Facebook.php https://gitlab.com/dinhkk/muabanchungcu24 | PHP | 386 lines
1<?php 2/*! 10 * 11 * Hybrid_Providers_Facebook use the Facebook PHP SDK created by Facebook 12 * 33 34 require_once realpath( dirname( __FILE__ ) ) . "/../thirdparty/Facebook/base_facebook.php"; 35 require_once realpath( dirname( __FILE__ ) ) . "/../thirdparty/Facebook/facebook.php"; 61 if($parameter == "auth_type"){ 62 $nonce = md5(uniqid(mt_rand(), true)); 63 $parameters['auth_nonce'] = $nonce; 71 $parameters[ 'auth_type' ] = 'reauthenticate'; 72 $parameters[ 'auth_nonce' ] = md5( uniqid( mt_rand(), true ) ); 73 268 $uc->displayName = (array_key_exists("name",$item))?$item["name"]:""; 269 $uc->profileURL = (array_key_exists("link",$item))?$item["link"]:"https://www.facebook.com/profile.php?id=" . $uc->identifier; 270 $uc->photoURL = "https://graph.facebook.com/" . $uc->identifier . "/picture?width=150&height=150";Common.php https://gitlab.com/dhayu-shadow/dhayu | 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 */7185.php https://bitbucket.org/DinoRex99/exploit-database.git | PHP | 139 lines
1#!/usr/bin/php 2<?php 14+---------------------------------------------------------------------------+ 15Usage: php '.$argv[0].' host path user mail uid 16host: target server (ip/hostname) 21Example: 22php '.$argv[0].' localhost /discuz/ 80vul 80vul@80vul.com 2 23+---------------------------------------------------------------------------+ 38 39$data = "GET ".$path."viewthread.php HTTP/1.1\r\n"; 40$data .= "Host: $host\r\n"; 56$cmd = 'action=lostpasswd&username='.urlencode($user).'&email='.urlencode($mail).'&lostpwsubmit=true&formhash='.$hash[1]; 57$data = "POST ".$path."member.php HTTP/1.1\r\n"; 58$data .= "Content-Type: application/x-www-form-urlencoded\r\n"; 82random(); 83mt_rand(); 84$id = random();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 }admin.php https://bitbucket.org/lpservice-it/ljmc.git | PHP | 361 lines
71 if ( $c <= 50 || ( $c > 50 && mt_rand( 0, (int)( $c / 50 ) ) == 1 ) ) { 72 require_once( ABSPATH . LJMCINC . '/http.php' ); 73 $response = ljmc_remote_get( admin_url( 'upgrade.php?step=1' ), array( 'timeout' => 120, 'httpversion' => '1.1' ) ); 151 * Note, this does not just run on user-facing admin screens. 152 * It runs on admin-ajax.php and admin-post.php as well. 153 * 168 // Backwards compatibility for plugins using add_management_page(). 169 if ( empty( $page_hook ) && 'edit.php' == $pagenow && '' != get_plugin_page_hook($plugin_page, 'tools.php') ) { 170 // There could be plugin specific params on the URL, so we need the whole query string 248 if ( !isset($_GET['noheader'])) 249 require_once(ABSPATH . 'ljmc-admin/admin-header.php'); 250 256 257 include(ABSPATH . 'ljmc-admin/admin-footer.php'); 258HttpClient.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(Common.php https://gitlab.com/stevie007/frontiertrading | PHP | 540 lines
45 { 46 static $_is_php; 47 $version = (string)$version; 50 { 51 $_is_php[$version] = (version_compare(PHP_VERSION, $version) < 0) ? FALSE : TRUE; 52 } 83 { 84 $file = rtrim($file, '/').'/'.md5(mt_rand(1,100).mt_rand(1,100)); 85 158 { 159 require(APPPATH.$directory.'/'.config_item('subclass_prefix').$class.'.php'); 160 } 205/** 206* Loads the main config.php file 207*feed.php https://bitbucket.org/paulsnar/river.git | PHP | 438 lines
1<?php declare(strict_types=1); 2 115 116 $next += mt_rand(-FEED_JITTER, FEED_JITTER); 117profils.php https://gitlab.com/pancard/nuXt.git | PHP | 227 lines
1<?php 2function xAfficherProfils() { 75 for($i = 0; $i < count($droits); $i++) { 76 //$people[$i]['salt'] = mt_rand(000000, 999999); 77 $droit = explode("-",$droits[$i]); 105 for($i = 0; $i < count($droits); $i++) { 106 //$people[$i]['salt'] = mt_rand(000000, 999999); 107 $droit = explode("-",$droits[$i]);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;string_helper.php https://github.com/holsinger/openfloor.git | PHP | 154 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 * 57 * 58 * http://www.some-site.com//index.php 59 * 61 * 62 * http://www.some-site.com/index.php 63 * 105 { 106 $str .= substr($pool, mt_rand(0, strlen($pool) -1), 1); 107 } 109 break; 110 case 'unique' : return md5(uniqid(mt_rand())); 111 break;UsersFormTest.php https://github.com/waynegraham/Omeka.git | PHP | 199 lines
1<?php 2/** 86 { 87 $expectedUsername = 'newuser' . mt_rand(); 88 $this->_authenticateUser($this->superUser); 91 'name' => 'foobar', 92 'email' => 'admin' . mt_rand() . '@example.com', 93 'role' => 'admin', 109 'name' => 'foobar foobar', 110 'email' => 'foobar' . mt_rand() . '@example.com', 111 'active' => '1',journal2_side_blocks.php https://bitbucket.org/learn1thing/learn1thing.git | PHP | 145 lines
1<?php 2/* @property ModelCatalogManufacturer model_catalog_manufacturer */ 52 if ($cache === null || self::$CACHEABLE !== true) { 53 $module = mt_rand(); 54 $this->data['module_id'] = $setting['module_id']; 90 $this->data['type'] = 'block'; 91 $this->data['url'] = 'index.php?route=module/journal2_side_blocks/load&module_id=' . $setting['module_id']; 92 $this->data['content_padding'] = Journal2Utils::getProperty($module_data, 'module_data.content_padding', 0) . 'px';captcha_helper.php https://bitbucket.org/hoytei/emervet.git | PHP | 254 lines
1<?php 2/** 4 * 5 * An open source application development framework for PHP 5.2.4 or newer 6 * 125 $word = ''; 126 for ($i = 0, $mt_rand_max = strlen($pool) - 1; $i < $word_length; $i++) 127 { 127 { 128 $word .= $pool[mt_rand(0, $mt_rand_max)]; 129 } 139 $length = strlen($word); 140 $angle = ($length >= 6) ? mt_rand(-($length-6), ($length-6)) : 0; 141 $x_axis = mt_rand(6, (360/$length)-16); 141 $x_axis = mt_rand(6, (360/$length)-16); 142 $y_axis = ($angle >= 0) ? mt_rand($img_height, $img_width) : mt_rand(6, $img_height); 143UserActions.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 }captcha.php https://github.com/crocus/virpl.git | PHP | 91 lines
1<?php 2session_start (); 2session_start (); 3$_SESSION['code'] = substr(md5(uniqid(mt_rand())),0,5); 4//function CreateIm(){ 48 } else { 49 die("No image support in this PHP server!"); 50 } 65 //function CreateIm(); 66 print '<form action="captcha.php" method="get"/>'. 67 '<input type="hidden" name="a" value="submit">'. 71 '<br/>'. 72 '<img align="absmiddle" src=\'captcha.php?a=image\'>'. 73 '<br/>'. 76} 77<?php 78if (!isset($_POST['screen'])) {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..");acces.php https://bitbucket.org/re_al_/real.test.spip.git | PHP | 434 lines
1<?php 2 41 if (!$s) { 42 $s = mt_rand(); 43 if (!$s) { 91 92 $s = mt_rand(); 93 if (!$s) { 331 * 332 * @link http://docs.php.net/manual/fr/function.crypt.php Documentation de `crypt()` 333 *Common.php https://gitlab.com/betanurlaila/UI_onlineshop | PHP | 851 lines
1<?php 2/** 63 { 64 static $_is_php; 65 $version = (string) $version; 68 { 69 $_is_php[$version] = version_compare(PHP_VERSION, $version, '>='); 70 } 86 * 87 * @link https://bugs.php.net/bug.php?id=54709 88 * @param string 186 set_status_header(503); 187 echo 'Unable to locate the specified class: '.$class.'.php'; 188 exit(5); // EXIT_UNK_CLASS 604 // to indicate to the client something went wrong. 605 // This can't be done within the $_error->show_php_error method because 606 // it is only called when the display_errors flag is set (whichGoogleCheckout-XML.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 630 lines
1<?php 2 2 3require_once('library/googlecart.php'); 4require_once('library/googleitem.php'); 4require_once('library/googleitem.php'); 5require_once('library/googleshipping.php'); 6require_once('library/googletax.php'); 6require_once('library/googletax.php'); 7require_once('library/googleresponse.php'); 8require_once('library/googlemerchantcalculations.php'); 8require_once('library/googlemerchantcalculations.php'); 9require_once('library/googleresult.php'); 10require_once('library/googlerequest.php'); 27 if(!isset($_SESSION['wpsc_sessionid'])){ 28 $sessionid = (mt_rand(100,999).time()); 29 $_SESSION['wpsc_sessionid'] = $sessionid;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]