Print Alphanumeric with atleast 1 numeric (PHP)

How to print 3 letter Alphanumeric with atleast 1 character as Numeric. <?php $alphanumeric= array(“0″,”1″,”2″,”3″,”4″,”5″,”6″,”7″,”8″,”9″,”A”,”B”,”C”,”D”,”E”,”F”,”G”,”H”,”I”,”J”,”K”,”L”,”M”,”N”,”O”,”P”,”Q”,”R”,”S”,”T”,”U”,”V”,”W”,”X”,”Y”,”Z”); for($i=0; $i<36; $i++) { for($j=0; $j<36; $j++) { for($k=0; $k<36; $k++) { if($i>=’10’ && $j>=’10’ && $k>=’10’) { } else { $newword=$alphanumeric[$i].$alphanumeric[$j].$alphanumeric[$k]; echo “$newword<br>”; } } } } ?>

Print Alphanumeric (PHP)

How to print all 3 letter long Alphanumeric words. <?php $alphanumeric= array(“0″,”1″,”2″,”3″,”4″,”5″,”6″,”7″,”8″,”9″,”A”,”B”,”C”,”D”,”E”,”F”,”G”,”H”,”I”,”J”,”K”,”L”,”M”,”N”,”O”,”P”,”Q”,”R”,”S”,”T”,”U”,”V”,”W”,”X”,”Y”,”Z”); for($i=0; $i<36; $i++) { for($j=0; $j<36; $j++) { for($k=0; $k<36; $k++) { $newword=$alphanumeric[$i].$alphanumeric[$j].$alphanumeric[$k]; echo “$newword<br>”; } } } ?>

Page Generation Time (using PHP)

With this script you can display how much this Time this page has taken to load. <?php // Insert at the start of your document $time = round(microtime(), 3); // Insert at the end of your document $time2 = round(microtime(), 3); $generation = $time2 – $time; echo “This page took $generation seconds to render”; ?>

Fetching data from a Page (data between Tags) using PHP

You can fetch data from a webpage by using this script. It is useful when you need to fetch data like Stock Rates on your site. Like if you want to fetch data between span tags. <?php // retrieve htmltagcontent tag contents function get_htmltagcontent($file){ $h1tags = preg_match_all(‘/(<span>)(.*)(</span>)/ismU’,$file,$patterns); $res = array(); array_push($res,$patterns[2]); array_push($res,count($patterns[2])); return $res; } … Read more

Get Title of a Webpage using PHP – 3

<?php function getTitle($url) { $fh = fopen($url, “r”); $str = fread($fh, 5000); fclose($fh); $str2 = strtolower($str); $start = strpos($str2, “<title>”)+7; $len   = strpos($str2, “</title>”) – $start; return substr($str, $start, $len); } ?>

Get Title of a Webpage using PHP – 2

<?php $url=”http://example.com”; echo getTitle($url); function get_page_title($url) { if( !($data = file_get_contents($url)) ) return false; if( preg_match(“#<title>(.+)</title>#iU”, $data, $t))  { return trim($t[1]); } else { return false; } } ?>

Retrieve Current Page URL using PHP

<?php function curPageURL() { $pageURL = ‘http’; if ($_SERVER[“HTTPS”] == “on”) {$pageURL .= “s”;} $pageURL .= “://”; if ($_SERVER[“SERVER_PORT”] != “80”) { $pageURL .= $_SERVER[“SERVER_NAME”].”:”.$_SERVER[“SERVER_PORT”].$_SERVER[“REQUEST_URI”]; } else { $pageURL .= $_SERVER[“SERVER_NAME”].$_SERVER[“REQUEST_URI”]; } return $pageURL; } ?> <?php echo curPageURL(); ?>

Retrieving URL Query Part

<?php function urlQUERY($url) { $url_data = parse_url ($url); if (!$url_data) return FALSE; $path =”; $query =”; if  (isset( $url_data[‘path’])) $path .=  $url_data[‘path’]; if  (isset( $url_data[‘query’])) $query .=  ‘?’ .$url_data[‘query’]; echo “$path $query “; } $url=”Enter Your URL”; urlQUERY($url)); ?>