#1
|
|||
|
|||
bozuk veritabanından linkleri kurtama çözümü
jdownloader support teamden herhangi bir destek gelmediği için ben de keni işimi kendim hallettim, paylaşayım bari dedim :
backup.zip dosyasından database.script dosyasından dowload linklerini aşağıdaki scriptle ayıklayabilirsiniz. ------------------------------------- <?php $myFile = "database.script"; $fh = fopen($myFile, "r"); $x = 0; $y=0; $srch1 = "INSERT INTO LINKS VALUES('links','"; $srch2 = "')"; $srch3 = '://'; function hex2str($hex){ for ($i = 0; $i < strlen($hex); $i += 2) $str .= chr(hexdec(substr($hex, $i, 2))); return $str;} if ($fh) { while (!feof($fh)) { $line = fgets($fh); if ((substr_count($line, $srch1)) > 0) { $line = str_replace($srch1, '', $line); $line = str_replace($srch2, '', $line); $line = strtolower($line); $line = str_replace('737100', '0D0A737100', $line); $yaz = hex2str($line); $yaz = str_replace("**External links are only visible to Support Staff**, "\r\n**External links are only visible to Support Staff**, $yaz); $yaz = str_replace("**External links are only visible to Support Staff**, "\r\n**External links are only visible to Support Staff**, $yaz); $yaz = str_replace("**External links are only visible to Support Staff**, "\r\n**External links are only visible to Support Staff**, $yaz); $x++; $sfn = $x . '.txt'; $fs = fopen($sfn, "w"); $son = explode("\r\n",$yaz); $count = count($son); for($i=0;$i<$count;$i++){ $tempr=$son[$i]; if ((substr_count($tempr, $srch3)) > 0) {$y++; echo $y."\r\n"; $sy=$tempr."\r\n"; fwrite($fs, $sy);}} fclose($fs);} } fclose($fh); } ?> ------------------------------------- xampp yawa wamp (google'den aratın) kurun işinizi halledin. |
|
|