PHP Implementation
Password Request
<?php
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "https://leakedpassword.com/api/?p={your-password}");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
curl_close($curl);
print_r($response);
?>
SHA1 Hash Request
<?php
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "https://leakedpassword.com/api/?s={your-sha1-hash}");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
curl_close($curl);
print_r($response);
?>
Response
{
"password": {
"leak": true,
"hash": "7110eda4d09e062aa5e4a390b0a572ac0d2c0220",
"seen": 1256907
}
}