Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $cookie = "COOKIE";
- $folderID = 315488;
- delfiles($folderID);
- function delfiles($folderID)
- {
- global $cookie;
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_URL,"https://1fichier.com/console/get_folder_content.pl?id=".$folderID);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3);
- curl_setopt($ch, CURLOPT_HTTPHEADER, array('Cookie: SID='.$cookie ));
- //curl_setopt($ch, CURLOPT_INTERFACE, "tundhm");
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- $files = curl_exec($ch);
- $files = json_decode($files, true);
- foreach ($files as &$value) {
- $id = str_replace("https://1fichier.com/?", "", $value['url']);
- if($value['type'] == "f")
- {
- echo "DELETE: ".$value['name']. " ID:". $id . " Result: ";
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_URL,"https://1fichier.com/console/remove.pl");
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3);
- curl_setopt($ch, CURLOPT_HTTPHEADER, array('Cookie: SID='.$cookie ));
- curl_setopt($ch, CURLOPT_TIMEOUT, 4);
- //curl_setopt($ch, CURLOPT_INTERFACE, "tundhm");
- curl_setopt($ch,CURLOPT_POST, 1);
- curl_setopt($ch,CURLOPT_POSTFIELDS, 'remove=1&selected%5B%5D=C_0_'.$id);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- echo curl_exec($ch);
- }else{
- $id = str_replace("https://1fichier.com/console/get_folder_content.pl?id=", "", $value['url']);
- echo "DELETE: ".$value['name']. " ID:". $id . " Result: ";
- delfiles($id);
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_URL,"https://1fichier.com/console/rmdir.pl?dir=".$id);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3);
- curl_setopt($ch, CURLOPT_HTTPHEADER, array('Cookie: SID='.$cookie ));
- //curl_setopt($ch, CURLOPT_INTERFACE, "tundhm");
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- echo curl_exec($ch);
- }
- echo PHP_EOL;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement