BlackHalt writeln (by me or from manual) PHP source Codes ...

Kāds Laiks:

<?php error_reporting(0);
$timeout=3600;
if(
time()-filemtime('kautkur/laiks2.txt')<$timeout){
$faa=file_get_contents('kautkur/laiks2.txt');
echo 
$faa;
}else{
switch(
$_GET['laiks']){
case 
1:
ob_start();
header('Content-type: image/png');
$platums=80;
$augstums=15;
$bilde=imagecreate($platums,$augstums);
$labais=imagecolorallocate($bilde,67,110,155);
$hostkrasa=imagecolorallocate($bilde,255,255,255);
imagefilledrectangle($bilde,0,0,$platums,$augstums,$labais);
imagestring($bilde,2,4,1,'Notiek Cache',$hostkrasa);
imagepng($bilde);
imagedestroy($bilde);
flush();
ob_start();
$url='http://xoap.weather.com/weather/local/LGXX0004?cc=*&dnam=1&unit=m&par=1005561467&key=a388d0d4a8a3f714';
$xmlf=file($url);
$daudz=sizeof($xmlf);
$saakf=$xmlf[0];
$vaigf='';
$ciki=$daudz-1;
for(
$i=1;$i<$ciki;$i++){
$vaigf.=$xmlf[$i];
}
$galaf=$saakf.$vaigf;
$saakums=array(
'OBST'=>':|:',
'TMP'=>':|:'
);
$beigas=array(
'OBST'=>'',
'TMP'=>':|:');
function 
saaktxml($parseris,$nos,$tagi){
global 
$saakums;
if(
$saakums[$nos]){
echo 
$saakums[$nos];
}}
function 
beiguxml($parseris,$nos){
global 
$beigas;
if(
$beigas[$nos]){
echo 
$beigas[$nos];
}}
function 
simbdati($parseris,$galaf){
echo 
$galaf;
}
$xml=xml_parser_create();
xml_set_element_handler($xml,'saaktxml','beiguxml');
xml_set_character_data_handler($xml,'simbdati');
xml_parse($xml,$galaf);
xml_parser_free($xml);
$buffer=ob_get_clean();
$fh=fopen('kautkur/laiks.txt','w+');
fwrite($fh,$buffer);
fclose($fh);
$faay=file_get_contents('kautkur/laiks.txt');
$liay=explode(':|:',$faay);
$fhy=fopen('kautkur/laiks2.txt','w+');
fwrite($fhy,"Rīgā $liay[2] C&deg;");
fclose($fhy);
ob_end_flush();
break;
default:
header('content-type: text/html; charset=utf-8');
echo
'<img src="laiks.php?laiks=1" alt="" />';
}
}
?>