Takže mám toto:
[html]<?php
#set_time_limit(0);
define('MAX_LINKS', 250);
$sites = array
(
'2shared.com' => 'File size',
'4shared.com' => 'fileName',
'hellshare.sk' => 'Stiahnuť súbor »',
'hellshare.com' => 'Download »',
'hellshare.cz' => 'Stáhnout soubor »',
'hellshare.pl' => 'Ściągnij plik »',
'stiahnito.sk' => 'Stiahnúť súbor',
'jumbofiles.org' => 'Download File',
'secureupload.eu' => 'Downloading ',
'megaupload.com' => 'Filename:',
'rapidgator.net' => 'Downloading:',
#'cobrashare.sk' => 'download.gif', #NEFUNGUJE! Kvoli presmerovaniu
'czshare.com' => 'Stáhnout free',
'megarotic.com' => 'Filename:',
'oron.com' => 'Download file',
'uloz.to' => 'Stáhnout',
'ulozto.sk' => 'Stáhnout',
'ulozto.cz' => 'Stáhnout',
'ulozto.net' => 'Stáhnout',
'ziddu.com' => 'File Size',
'zippyshare.com' => 'You have requested',
'warserver.cz' => 'Zobrazit link',
#'uploadstation.com' => '', DOKONCIT!
'uploaded.net' => 'Download file:', #ASI funguje
'ul.to' => 'Download file', #je to uploaded.net
#'upnito.sk' => 'stiahnuť súbor', #NEFUNGUJE!
'depositfiles.com' => 'File size:',
'filefactory.com' => 'file uploaded',
'freakshare.com' => '"Download"',
'bitshare.com' => '<h1>Downloading',
'share-online.biz' => 'download package',
'edisk.cz' => 'Naposledy stáhnutý:',
'turbobit.net' => 'class="download-file"',
'filedropper.com' => 'File Details:',
'euroshare.eu' => 'STIAHNUŤ',
'leteckaposta.cz' => 'iframe',
'mysharegadget.com' => 'File uploaded',
'fastshare.cz' => 'Nahráno dne:',
'luckyshare.net' => 'Filesize:',
'mediafire.com' => 'download.ico',
#'hotfile.com' => 'Downloading:', #NEFUNGUJE
#'lumfile.com' => '', #NIE JE NA ZAKLADE COHO HODNOTIT
#'rapidshare.com' => 'FILE DOWNLOAD', #NEFUNGUJE
'rapidshare.de' => 'Choose download-type',
'ryushare.com' => 'You have requested ',
'sendspace.com' => '>File Size:',
'hotfile.com' => 'arrow_down',
'crocko.com' => 'Download:',
'easy-share.com' => 'Download:', #JE TO CROCKO.COM
'badongo.com' => 'DOWNLOAD THIS FILE', #UZ NEEXISTUJE, VLOZENY LEN FORMALNE
'filejungle.com' => 'You can only',
'fileserve.com' => 'please login to download',
'filesonic.com' => 'DOWNLOAD THIS', #UZ NEEXISTUJE
'stahovadlo.cz' => '<dt>Velikost:',
#'dataport.cz' => 'Popis souboru', #NEFUNGUJE, Kvoli presmerovaniu
#'share-rapid.com' => 'souborinfo',
#'share-rapid.biz' => 'souborinfo',
#'sharerapid.biz' => 'souborinfo',
#'share-rapid.cz' => 'souborinfo',
#'sharerapid.cz' => 'souborinfo',
#'megashares.com' => 'Filename',
#'netload.in' => 'dl_first_tacho.gif', #NEFUNGUJE
'uploading.com' => 'Download for free',
'storage.to' => 'Downloading:', #UZ NEEXISTUJE
'uploadbox.com' => 'Free Download', #UZ NEEXISTUJE
'zshare.net' => 'File Name', #UZ NEEXISTUJE
'x7.to' => 'File DOWNLOAD', #UZ NEEXISTUJE
'duckload.com' => 'File DOWNLOAD', #UZ NEEXISTUJE
'webshare.cz' => 'finder-sprite-detail.png'
);
?>
<!doctype html>
<html>
<head>
<title>Link checker</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<style type="text/css">
<!--
* {margin:0; padding:0;}
#main {position:relative; margin:auto; padding:20px; width:800px; height:auto;}
#hostingy {padding:15px 0px 30px 0px; font-size:11px;}
body {font:13px verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;}
.tlacitko {padding:10px; font-weight:bold;}
.green {background:#ccffcc; color:#006600; padding:1px 0 2px 0;}
a.green {color:#006600; text-decoration:none;}
a.green:hover {color:#006600; text-decoration:underline;}
a.green:active {color:#006600;}
a.green:visited {color:#006600;}
.red {background:#ffcccc; color:#990000; padding:1px 0 2px 0;}
a.red {color:#990000; text-decoration:none;}
a.red:hover {color:#990000; text-decoration:underline;}
a.red:active {color:#990000;}
a.red:visited {color:#990000;}
-->
</style>
</head><body>
<div id="main">
<strong>Podporované hostingy / Supported hosts</strong><br />
<div id="hostingy">
<?php
#Pôvodná verzia, vypisovanie do tabuľky.
#$es = 0;
#echo '<table cellspacing="2" cellpadding="2"><tr>';
#foreach ($sites as $site => $match){
# echo '<td>'.$site.'</td>';
# ++$es;
# echo ($es%5) ? '' : '</tr><tr>';
#}
#echo '</tr></table>';
$es = 0;
foreach ($sites as $site => $match){
echo ''.$site.' <strong>|</strong> ';
++$es;
echo ($es%5) ? '' : '';
}
?>
</div>
<form action="" method="post">
<b>Vložte odkazy / Insert links: (maximálně 250 odkazů / max 250 at once)</b><br />
<textarea rows="15" cols="100" name="links" class="textarea"></textarea><br />
<br />
<input class="tlacitko" type="submit" value="Zkontrolovat / Check" name="checklinks" class="button" /><!--<input type="reset" value="Clear" class="button">-->
</form>
<br />
<br />
<?php
function getPage($url){
if(function_exists('curl_init')) {
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_MAXREDIRS,10);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$page = curl_exec($ch);
curl_close ($ch);
return $page;
}
return file_get_contents($url);
}
if($_POST){
$links = explode("\n", implode("\n", explode(" ", $_POST['links'])));
$checked = 0;
$alive = 0;
foreach($links as $link){
$link = trim($link);
foreach($sites as $site => $match){
if(stristr($link,$site)){
$page = getPage($link);
$link = htmlentities($link);
if(stristr($page,$match)) {
echo '<span class="green"><a class="green" href="'.$link.'"><strong>'.$link.'</strong></a></span><br />';
$alive++;
} else echo '<span class="red"><a class="red" href="'.$link.'"><strong>'.$link.'</strong></a></span><br />';
$checked++;
}
if($checked >= MAX_LINKS){
echo '<br />MMaximální počet odkazů: ('.MAX_LINKS.') byl dosažený.</body></html>';
break 2;
}
}
}
#echo ($checked == 0) ? '<span class="red">Žiadny z linkov nie je podporovaný.</span><br />' : '<br />'.$checked.' odkaz'.(($checked == 1) ? '' : 'ov').' skontrolovaných. ('.round($alive/$checked*100).'% funkčných.)<br />';
echo ($checked == 0) ? '<span class="red">Žádný z linků není podporovaný. / No link is supported. :-(</span><br />' : '<br />'.$checked.' odkaz'.(($checked == 1) ? '' : 'ov').' zkontrolovaný'.(($checked == 1) ? '' : 'ch').'. ('.round($alive/$checked*100).'% funkčních / works)<br />';
}
?>
<?php
#ZAPIS POCTU LINKOV DO SUBORU
$myFile = "w8document.php";
$pocet = file_get_contents($myFile);
$sucet = $pocet + $checked;
$fh = fopen($myFile, 'w') or die("Zápis sa nepodařil. :-(");
fwrite($fh, $sucet);
fclose($fh);
?>
<br /><br />
<?php
$subor = "w8document.php";
$cislo = file_get_contents($subor);
$naformatovane = number_format($cislo);
?>
Linkchecker už zkontroloval <?php echo $naformatovane; ?> odkazů.
</div>
</body></html>[/html]
Ale ani za boha nemohu přijít podle čeho kontrolovat soubory na webshare.
Např. tento odkaz:
https://webshare.cz/#/file/uI23n1jA1nNemohu najít žádné klíčové slovo podle kterého by to šlo zkontrolovat.