inc/dns.inc.php
changeset 62 ce4919f37489
parent 55 a885f557678f
child 65 ce1c4d5e1576
equal deleted inserted replaced
61:d015f5c9b308 62:ce4919f37489
   516 function is_valid_url($url)
   516 function is_valid_url($url)
   517 {
   517 {
   518 	return preg_match('!^(http://)(([A-Z\d]|[A-Z\d][A-Z\d-]*[A-Z\d])\.)*[A-Z\d]+([//]([0-9a-z//~#%&\'_\-+=:?.]*))?$!i',  $url);
   518 	return preg_match('!^(http://)(([A-Z\d]|[A-Z\d][A-Z\d-]*[A-Z\d])\.)*[A-Z\d]+([//]([0-9a-z//~#%&\'_\-+=:?.]*))?$!i',  $url);
   519 }
   519 }
   520 
   520 
   521 		/****************************************
   521 function is_valid_search($holygrail)
   522 		 *					*
   522 {
   523 		 *    END OF RECORD VALIDATING PART.	*
   523 	// Only allow for alphanumeric, numeric, dot, dash, underscore and 
   524 		 *					*
   524 	// percent in search string. The last two are wildcards for SQL.
   525 		 ***************************************/
   525 	// Needs extension probably for more usual record types.
       
   526 
       
   527 	return preg_match('/^[a-z0-9.\-%_]+$/i', $holygrail);
       
   528 }
       
   529 
       
   530 
   526 ?>
   531 ?>