- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
#настройка
$file = file_get_contents('data/other/addsite.xml');
$count = 80;
function getDatabase($name,$file){
$DATABASE = file_get_contents('database/'.$file.'.dat');
$DATABASE = explode('|',substr($DATABASE,0,-1));
foreach($DATABASE as $datavalue){
$datavalue = explode('==',$datavalue);
$names = $datavalue[0];
$value = $datavalue[1];
$arr["$names"] = $value;
}
return $arr["$name"];
}
#обработка
preg_match_all("/<name>(.+?)<\/name>/",$file,$matches);
preg_match_all("/comment id\=\"(.+?)\"/",$file,$matchesid);
if(!isset($matches[1]))die('ничего не найдено =(');
if(!isset($matchesid[1]))die('ничего не найдено =(');
$matchesid = array_reverse($matchesid[1]);
$matches = array_reverse($matches[1]);
$urls=array();
foreach($matches as $url){
if(!$count)break;
$count--;
if(!strpos(' '.$url,'http://')){
$url = 'http://'.$url;
}
$parts = parse_url($url);
if(substr($parts['host'],0,4)=='www.'){
$purl = substr($parts['host'],4);
} else {
$purl = $parts['host'];
}
if(isset($purl)){$urls[] = $purl;}
}
$text = '';
$count2=0;
$ids=array();
$countf=80;
foreach($matchesid as $id){
if(!$countf)break;
$countf--;
$ids[] = $id;
}
foreach($urls as $href){
$count2++;
$idd = $ids["$count2"-1];
$statuss = getDatabase('uweb'.$idd,'checker');
$statusx = "<img src=\"/data/files/".$statuss.".png\" align=\"absmiddle\" />";
$text.="<span id=\"check$idd\">$statusx</span> <a href='http://$href/' target='_blank' rel='nofollow'>http://$href/</a>".($count2%20==0?'</td><td valign="top" width="25%" align="left">':'<br/>');
}
# вывод
echo "<table width='100%'><tr><td valign='top' width='25%' align='left'>".$text."</td></tr></table>";
RaZeR 06.08.2011 21:55 # +2
Ucoz чтоль? Oh noes!
substr 06.08.2011 21:57 # 0
RaZeR 06.08.2011 23:00 # +1
guest 09.08.2011 12:49 # 0
guest8 09.04.2019 11:17 # −999