Skip to content

Instantly share code, notes, and snippets.

@i-tabu
Last active January 31, 2024 13:46
Show Gist options
  • Save i-tabu/ca271c9c7507158a1a80c9c0a20fc5d9 to your computer and use it in GitHub Desktop.
Save i-tabu/ca271c9c7507158a1a80c9c0a20fc5d9 to your computer and use it in GitHub Desktop.
Listclean PHP file download example
<?php
$list_id = 37485;
$type = 'dirty';//it can be 'clean' OR 'unknown'
$url = 'https://api.listclean.xyz/v1/downloads/' . $list_id . '/' . $type . '?X-Auth-Token=' . YOUR_API_KEY;
$filename = 'download_dirty.csv';
if (file_put_contents($filename, file_get_contents($url))) {
echo "File (" . $filename . ") downloaded successfully";
}
else {
echo "File (" . $filename . ") downloading failed.";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment