Skip to content

Instantly share code, notes, and snippets.

@didats
Created November 18, 2013 02:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save didats/7521234 to your computer and use it in GitHub Desktop.
Save didats/7521234 to your computer and use it in GitHub Desktop.
Civil ID Validation for Kuwait Citizen using PHP
function validate_civilid($str) {
$valid = false;
if(preg_match("/[0-9]/{12}", $str)) {
$test = ((substr($str, 0, 1) * 2) + ((substr($str, 1, 1) * 1) + ((substr($str, 2, 1) * 6) + ((substr($str, 3, 1) * 3) + ((substr($str, 4, 1) * 7) + ((substr($str, 5, 1) * 9) + ((substr($str, 6, 1) * 10) + ((substr($str, 7, 1) * 5) + ((substr($str, 8, 1) * 8) + ((substr($str, 9, 1) * 4) + ((substr($str, 10, 1) * 2) ) % 11;
if($test == substr($str, 11, 1)) $valid = true;
}
return $valid;
}
@manoo646
Copy link

Its great for Kuwait civil is status

@hamoudkw
Copy link

hamoudkw commented Sep 2, 2023

@Manoo-Billa
Copy link

I also Check this code on my website which is MOI Qatar Visa Check and that's working fine to check status Online

@abiya6409
Copy link

MOI Qatar Traffic Violations Check Online. A traffic violation occurs as a result of a violation of the traffic rules by the driver or person who operates the vehicle

@nawazu765
Copy link

The Kuwait Civil ID Check is one of the easy-to-achieve digital services in Kuwait that allow the individual to check the status of their card and confirm the accuracy of their data. This article from Kuwait Services describes the simple steps that must be followed to complete this process.

@manoo646
Copy link

manoo646 commented Jan 8, 2024

With the advent of technology, there is a simple way to keep track of these fines – through a TMS Traffic Check. This article explores everything you need to know about TMS Check, how to check traffic violations online in Tanzania, and the benefits of using it.

@zamanalisandhu
Copy link

Are you a foreigner living in Kuwait?? If your answer is yes, then you must know the importance of civil ID. Civil ID Status is a form of identification issued by the PACI (Public Authority for Civil Information) for all citizens 18 years old. Overseas citizens can use civil ID to get a driver’s license or make transactions via a bank account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment