59 entries for "
if" as
partial match | search took 0.073 seconds
sessions and co | sessions class | 22 matches
line 23: if(!isset($varname) || !isset($varvalue) )...
line 27: if(phpversion() >= "4.1.0")...
line 31: if(!isset($GLOBALS[$varname]) )...
line 38: if(!isset($GLOBALS[$varname]) )...
line 52: if(!isset($varname))...
line 56: if( phpversion() >= "4.1.0" )...
line 58: if (isset($GLOBALS[$varname]))...
line 62: elseif (isset($GLOBALS['_SESSION'][$varname]))...
line 68: if (isset($GLOBALS[$varname]))...
line 72: elseif (isset($GLOBALS['HTTP_SESSION_VARS'][$varname]))...
line 102: if(!isset($varname))...
line 106: if( phpversion() >= '4.1.0')...
line 108: if(isset($GLOBALS[$varname]))...
line 112: if (isset($GLOBALS['_SESSION'][$varname]))...
line 117: if (isset($GLOBALS[$varname]))...
line 121: if (isset($GLOBALS['HTTP_SESSION_VARS'][$varname]))...
line 133: if(phpversion() >= '4.1.0')...
line 135: if(isset($GLOBALS['_SESSION'])) $a = $GLOBALS['_SESSION'];...
line 143: if(isset($GLOBALS['HTTP_SESSION_VARS']))...
line 169: if(phpversion() >= '4.1.0')...
line 171: if(isset($GLOBALS['_SESSION']))...
line 180: if(isset($GLOBALS['HTTP_SESSION_VARS']))...
string handling | number to words | 16 matches
line 10: "fourteen", "fifteen", "sixteen", "seventeen", "eighteen",...
line 12: 50 => "fifty", 60 => "sixty", 70 => "seventy", 80 => "eighty",...
line 18: if(!is_numeric($x))...
line 21: }else if(fmod($x, 1) != 0)...
line 25: if($x < 0)...
line 32: if($x < 21)...
line 35: }else if($x < 100)...
line 39: if($r > 0)...
line 43: } else if($x < 1000)...
line 47: if($r > 0)...
line 51: } else if($x < 1000000)...
line 55: if($r > 0)...
line 58: if($r < 100)...
line 67: if($r > 0)...
line 70: if($r < 100)...
line 83: if(isset($_POST['num']))...
file handling | file upload | 12 matches
line 2: specify the filetypes allowed, the max filesize and the directory to upload the files....
line 8: // specify the directory where the uploaded file should end up...
line 11: // specify the filetypes allowed...
line 12: $allowed = array('image/gif','image/pjpeg','image/jpeg','image/png');...
line 14: // specify the max filesize in bytes...
line 17: if(isset($HTTP_POST_FILES['userfile']))...
line 19: if(is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name']))...
line 21: if($HTTP_POST_FILES['userfile']['size'] < $max_size)...
line 23: if(in_array($HTTP_POST_FILES['userfile']['type'],$allowed))...
line 25: if(!file_exists($path . $HTTP_POST_FILES['userfile']['name']))...
line 27: if(@rename($HTTP_POST_FILES['userfile']['tmp_name'],$path.$HTTP_POST_FILES['userfile']['name']))...
line 36: if(!is_writeable($path))...
information | detect user language | 7 matches
line 9: if(empty($GLOBALS[$Var]))...
line 27: // Try to detect Primary language if several languages are accepted....
line 30: if(strpos($_AL, $K)===0)...
line 34: // Try to detect any language if not yet detected....
line 37: if(strpos($_AL, $K)!==false)...
line 42: if(preg_match("/[\[\( ]{$K}[;,_\-\)]/",$_UA))...
line 46: // Return default language if language is not yet detected....
string handling | string in string | 7 matches
line 16: if ($CaseSensitive)...
line 22: if ($substring==$Find) return true;...
line 36: if ($CaseSensitive)...
line 42: if ($substring==$Find) $x++;...
line 49: // the string. returns -1 if the string does not exist...
line 56: if ($CaseSensitive)...
line 62: if ($substring==$Find) return $i;...
databases | mySQL to excel | 11 matches
line 29: //define title for .doc or .xls file: EDIT this if you want...
line 48: //if this parameter is included ($w=1), file returned will be in word format ('.doc')...
line 49: //if parameter is not included, file returned will be in excel format ('.xls')...
line 50: if (isset($w) && ($w==1))...
line 66: if (isset($w) && ($w==1)) //check for $w again...
line 70: if ($Use_Title == 1)...
line 87: if(!isset($row[$j])) {...
line 90: elseif ($row[$j] != "") {...
line 107: if ($Use_Title == 1)...
line 129: if(!isset($row[$j]))...
line 131: elseif ($row[$j] != "")...
directories | human readable size | 9 matches
line 11: if (!is_dir($directory)) return -1;...
line 13: if ($DIR = opendir($directory))...
line 17: if (is_link($directory . '/' . $dirfile) || $dirfile == '.' || $dirfile == '..')...
line 19: if (is_file($directory . '/' . $dirfile))...
line 21: else if (is_dir($directory . '/' . $dirfile))...
line 24: if ($dirSize >= 0) $size += $dirSize;...
line 36: if ($rawSize / 1048576 > 1)...
line 38: else if ($rawSize / 1024 > 1)...
line 46: if ($size < 0)...
forms | simple calculator | 6 matches
line 7: if(!$_POST['act'])...
line 24: if($_POST['act'] == 'add')...
line 29: if($_POST['act'] == 'sub')...
line 34: if($_POST['act'] == 'div')...
line 39: if($_POST['act'] == 'mul')...
line 44: if($_POST['act'] == 'pro')...
sessions and co | basic authorization | 6 matches
line 14: // check if not authorized already...
line 15: if(!isset($_SERVER['PHP_AUTH_USER']))...
line 17: // if not authorized, show authentication dialog box...
line 23: // if user or password is wrong...
line 24: if(($_SERVER['PHP_AUTH_USER'] != $user) || ($_SERVER['PHP_AUTH_PW'] != $password))...
line 32: // if user and password match...
information | timestamp to time passed | 5 matches
line 17: if(round($weeks)) $timestring = round($weeks)." weeks ";...
line 18: if(round($days)) $timestring .= round($days)." days ";...
line 19: if(round($hours)) $timestring .= round($hours)." hours ";...
line 20: if(round($minutes)) $timestring .= round($minutes)." minutes ";...
line 21: if(!round($minutes)&&!round($hours)&&!round($days)) $timestring .= round($seconds)." seconds ";...
information | domaincheck | 5 matches
line 38: if ($_POST['dom'])...
line 67: if (substr($domain, $tldlen) == $artld) $whosrv = $whoisservers[$x][1];...
line 75: if (!$lusrv) return '';...
line 87: if ($secondtry)...
line 98: if(ereg('(No match|No entries found|NOT FOUND|Not found)',$string))...
file handling | remote last modified | 7 matches
line 1: functions to retrieve the last modified date from files on remote servers....
line 2: very practical to check if a new version of a file is ready to download on another server....
line 12: if (!$fp)...
line 21: if (ereg("^\r\n",$httpresult))...
line 33: if(!$endHostPos) $endHostPos = strlen($url);...
line 36: if($doc == '') $doc = '/';...
line 52: echo $remote_file.' was last modified on '.date('j F Y',strtotime($array['Last-Modified']));...
string handling | string to columns | 5 matches
line 5: with this script you just paste the text and specify the numbers of columns....
line 17: if($_POST['string'])...
line 19: if($_POST['column']) $columns = $_POST['column'];...
line 21: if($_POST['seperator']) $seperator = $_POST['seperator'];...
line 44: if($x > 0 && $_POST['heightpx']) echo '...
information | google position | 7 matches
line 7: if(!empty($_POST['searchquery']) && !empty($_POST['searchurl']))...
line 34: if (!$file)...
line 41: if(eregi('<b>1</b> - <b>10</b> of about <b>(.*)</b>',$var,$outs))...
line 45: if(eregi('<font color=#008000>(.*)</font><nobr>',$var,$out))...
line 52: if(strcmp($lastURL,$url)<>0)$real_position++;...
line 54: if(strcmp($_POST['searchurl'],$url)==0)...
line 67: if($found)...
file handling | file informations | 5 matches
line 1: this snippet will give you informations about a file like size, last modified date and more...
line 9: if ($fs >= 1073741824)...
line 11: elseif ($fs >= 1048576)...
line 13: elseif ($fs >= 1024)...
line 25: echo 'last modified: '.date('l, F dS 20y - H:i:s',$fil_array[9]).'<br>';...
html and code | floating div | 4 matches
line 1: this javascript gives you an iframe-type floating layer....
line 23: font: 200 14px helvetica,arial,verdana,sans-serif;...
line 38: if (el && typeof el.offsetHeight != 'undefined') return el.offsetHeight;...
line 46: if (el && el.style) el.style.height = String(elHt + (lineheight - (elHt%lineheight)) + 'px');...
html and code | prime numbers | 4 matches
line 2: returns TRUE if number given is a prime number and FALSE if not....
line 8: // is_prime(number) checks if a number is a prime number or not...
line 11: if($i % 2 != 1) return false;...
line 25: if(is_prime($i))...
string handling | string compare | 3 matches
line 17: if($name_check === true) // important are the ===...
line 24: if($pass_check === true) // important are the ===...
line 30: if($name == 1 && $pass == 1)...
image editing | image rotate | 3 matches
line 12: if ($x > $y)...
line 27: if ((($x > y) && ($degrees < 180)) || (($y > $x) && ($degrees > 180)))...
line 34: if ($degrees != 180)...
file handling | line by line | 3 matches
line 35: if (($character == "\n") or ($character == "\r"))...
line 38: // checks if the next character is part of the line ending, as in...
line 42: if ($character == "\n")...
image editing | crop image | 5 matches
line 13: if(!isset($_POST['step'])) $title = '1';...
line 23: if(!isset($_POST['tx']) && !isset($_POST['fx']))...
line 28: if(!isset($_POST['x']))...
line 45: if(isset($_POST['fx']))...
line 66: if(isset($_POST['tx']))...
html and code | vars with reg.glob. off | 4 matches
line 11: if (!empty($HTTP_GET_VARS)) extract($_GET);...
line 12: if (!empty($HTTP_POST_VARS)) extract($_POST);...
line 16: if (!empty($HTTP_GET_VARS)) while(list($name, $value) = each($HTTP_GET_VARS)) $$name = $value;...
line 17: if (!empty($HTTP_POST_VARS)) while(list($name, $value) = each($HTTP_POST_VARS)) $$name = $value;...
image handling | image upload and resize | 4 matches
line 9: if(isset($_POST['Submit']))...
line 26: if (isset($_FILES['image']['name']))...
line 38: if ($sizes[1] <= $size)...
line 51: if(function_exists('imagecopyresampled'))...
array handling | entries per row | 4 matches
line 1: list entries or images with as many entries per row you specify....
line 26: 'specify');...
line 38: if($count == 0)...
line 49: if(($count == $per_row) || ($images[$x] == end($images)))...
image handling | list image folder | 3 matches
line 3: drop this in any directory and replace the path to the folder with ./ and specify the files you want to show....
line 11: $allowed_types = array('png','jpg','jpeg','gif'); // list of filetypes you want to show...
line 16: if(in_array(strtolower(substr($imgfile,-3)),$allowed_types))...
image handling | base64 image encode | 3 matches
line 19: // if you want to save the string to a file...
line 32: encode_img('path/to/image.gif'); // to encode the image...
line 33: display_img($imgcode,'gif'); // to show the image...
forms | google results | 3 matches
line 17: if(!isset($_POST['q']))...
line 26: // this would be the URL if you want the results on page 2, 3 ... where $_POST['p'] is multiple of 10...
line 34: if($pos !== false)...
html and code | view php source | 2 matches
line 16: if(substr($_SERVER['HTTP_REFERER'],-strlen($_SERVER["PHP_SELF"])) == $_SERVER["PHP_SELF"])...
line 21: if(!$_POST['selected_file'] == '' && $real_adress == 1)...
forms | keep selected combobox | 2 matches
line 17: // write "selected" if the value matches the one posted...
line 18: if($values[$x] == $_POST['country'])...
file handling | read and select csv | 2 matches
line 28: if(trim(strtolower($parts_array[$i][$field])) == trim(strtolower($query)))...
line 47: if($data[$i][$u] == end($data[$i]))...
directories | recursive directory delete | 3 matches
line 13: if($item != '.' && $item != '..')...
line 15: if(is_dir($dir.'/'.$item))...
line 24: if(rmdir($dir))...
directories | read dir and list | 3 matches
line 13: if ( is_dir ($file_file ) && $file_file != '.' && $file_file != '..' && substr ($file_file ,0,strlen ($filter )) == $filter )...
line 19: <a href="'.$file_file .'" title="last modified on '.date("D d M Y g:i A", $mtime).'">'.$thefile .'</a>...
line 28: if ( $user != $server )...
communication | send email | 2 matches
line 14: if(!ereg("$sChars",$sEmailAddress))...
line 36: if((funcCheckEmail('recipient@example.com')) && (funcCheckEmail('sender@example.com')))...
file handling | file exists | 2 matches
line 1: function to check if a file exists...
line 8: if(file_exists($filename))...
file handling | download counter | 2 matches
line 9: $download_dir = 'downloads'; // the folder where the files are stored ('.' if this script is in the same folder)...
line 21: if(file_exists($path))...
html and code | extract vars | 2 matches
line 1: this helps if you want to make these old scripts working with register globals off ......
line 12: if(phpversion() >= "4.2.0")...
directories | recursive directory listing | 2 matches
line 14: if ($file != '.' && $file != '..')...
line 18: if (is_dir($newpath))...
file handling | include secure | 4 matches
line 2: If it is crackme.php , then the program dies before it gets to important code,...
line 4: If it is included in some other PHP file,...
line 12: if (eregi("crackme.php", $PHP_SELF)) exit;...
line 15: if (eregi("include_secure", $PHP_SELF)) echo "this file shouldn't be called like this";...
information | visitors online | 2 matches
line 12: if($fp = @fopen($filename,$mode))...
line 32: if($userdata[0] > time()-$timeframe)...
array handling | array multi sort | 2 matches
line 1: sort multidimensional arrays by field specified....
line 2: specify the key by which you want your multiarray sorted....
string handling | insert at specific location | 2 matches
line 1: lets say you have a file where you want to insert a string into an existing file at a specific location...
line 23: if(trim($old_data[$x]) != $insert_key)...
html and code | alternate row colors | 1 match
line 25: if($n % 2 == 1)...
databases | mySQL class | 1 match
line 40: if(mysql_num_rows($result) == 0)...
directories | htaccess 2 | 1 match
line 8: // if your url looks like this:...
string handling | extract string from offsite | 1 match
line 2: just specify words in the remote source to start and end the output...
string handling | substring examples | 1 match
line 15: if(!empty($_POST['word']))...
string handling | summarize article | 1 match
line 14: if(($words >= $limit) && ((substr($tok, -1) == "!")||(substr($tok, -1) == ".")))...
html and code | html entities | 1 match
line 8: <table style="width: 400px; font-family: Verdana, sans-serif; font-size: 10px; border: 1px solid #606060; border-collapse: collapse;">...
file handling | strip file extension | 1 match
line 11: if($ext !== false)...
file handling | open file | 1 match
line 8: if($fp = @fopen($filename, "r"))...
file handling | delete file | 1 match
line 10: if(unlink($file))...
file handling | write to first line of file | 1 match
line 19: array_unshift($old_lines,$new_line);...
file handling | write to file | 1 match
line 8: if($fp = @fopen($filename,"w "))...
image editing | analog GD clock | 1 match
line 11: if(isset($_GET['doit']))...
information | phpinfo | 1 match
line 11: if you only want info about the installed modules...
information | date and time | 1 match
line 26: if you want some letters in the output, which are NOT to parse, escape them with a backslash like...
image handling | resize offsite image | 1 match
line 39: if ($height <= $size)...
information | server variables | 1 match
line 1: server variables as in $_SERVER[] are very helpful in building scripts which run on different servers....
image editing | outlining | 1 match
© 2008
phparadise |
go to the top73 hits by 19 users in the last 30 minutes.