Jump to content
php.lv forumi

LR Banka un Laika zinjas ;)))


sofTKiller

Recommended Posts

Taa nu es te sho to atradu ;)

Nu luuk dazhi grafiskie varianti laika zinjaam Riigaa:

<a href="http://www.gismeteo.ru/etowns/26422.htm"><img alt="GISMETEO.RU" src="http://einformer.gismeteo.ru/26422-9E.GIF" border=0 width=120 height=60></a>

<a href="http://www.gismeteo.ru/etowns/26422.htm"><img alt="GISMETEO.RU" src="http://einformer.gismeteo.ru/26422-10E.GIF" border=0 width=120 height=60></a>

<a href="http://www.gismeteo.ru/etowns/26422.htm"><img alt="GISMETEO.RU" src="http://einformer.gismeteo.ru/26422-11E.GIF" border=0 width=120 height=60></a>

<a href="http://www.gismeteo.ru/etowns/26422.htm"><img alt="GISMETEO.RU" src="http://einformer.gismeteo.ru/26422-6E.GIF" border=0 width=100 height=100></a>

Nu tur to variantu daudz... pieliku normaalaakos

Ja ir vajadziibas peec texta variantiem, tad luuk:

<script> var gminform_fc="0000F0", gminform_bc="FFFFFF"; </script>

<script language="JavaScript" src="http://informer.gismeteo.ru/text/26422-1.JS"></script>

<script> var gminform_fc="0000F0", gminform_bc="FFFFFF"; </script>

<script language="JavaScript" src="http://informer.gismeteo.ru/text/26422-2.JS"></script>

Taa nu ja kaads grib zinaat laika zinjas peec 10 dienaam, tad skat. zemaak:

<a href="http://www.gismeteo.ru/towns/26422.htm"><img alt="GISMETEO.RU: график температуры на 10 дней для г. Рига" src="http://informer.gismeteo.ru/graph/G26422.GIF" border=0 width=234 height=120></a>

<a href="http://www.gismeteo.ru/towns/26422.htm"><img alt="GISMETEO.RU: график температуры на 10 дней для г. Рига" src="http://informer.gismeteo.ru/graph/G26422-1.GIF" border=0 width=234 height=120></a>

<a href="http://www.gismeteo.ru/towns/26422.htm"><img alt="GISMETEO.RU: график температуры на 10 дней для г. Рига" src="http://informer.gismeteo.ru/graph/G26422-2.GIF" border=0 width=234 height=120></a>

 

Nu tas ir it kaa viss B)

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 41
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 months later...

hu mees zinam. pastaasti! :)

 

man piem tiek izmantota ieprieksheejaa gada sakariiba:

panjem dazhas dienas ieprieksh + shodien temperatuuru, atrod pagaajushaa gaga logfailos peec iespeejas tuvaak shim datumam taadu pashu patternu (kriitas/aug) un paskataas dienu uz priekshu. sareekjina attieciibu un dabuun graadus.

Link to comment
Share on other sites

  • 10 months later...
Specifiskāks, bet, domājams, ātrāks piemērs:

 

$text=@implode('',@file('http://www.bank.lv/vk/xml.xml'));
if (!$text)
die('Banka nav publicējusi šodienas kursus');
$text=str_replace('<Currency>','#',$text);
$text=strip_tags($text);
$text=explode('#',$text);
$els=count($text);
unset($text[0]);
$currencies=array();
while(--$els)
{
$lines=explode("\n",trim($text[$els]));
$currencies[trim($lines[0])]=array(trim($lines[1]),trim($lines[2]));
}
echo 'Amerikas dolāru kurss ir '.$currencies['USD'][1].' Ls par '.$currencies['USD'][0].' valūtas vienību.';
print '<pre>'.print_r($currencies,1).'</pre>';

 

... a ka noapalot, piemeram, uz 3 cipariem aiz komata? tagad ir 8 :) ka jau bankas .xml

Link to comment
Share on other sites

  • 1 year later...
IM24LV, tu zini, kas ir specene ? Lietotšanas intrukcija, rupjiem vārdiem runājot. Tu gribi teikt, ka tu visus tos saīsinājumus, kas tajā xml, saproti ?

 

aaa :D sapratyu bik savaadaak... nuu taa nu tieshaam nav nekaada probleema luuk kur ir :) (vnk pasties uz kartes un salidzini temperaturas...

 

 

 

/*Ainazi*/
<RIAI99PA c="-17.4" ico="skn" wind_ms="2" wind_angle="DR" visible="1" />
//Aluksne
<RIAL99MS c="-19.9" ico="skn" wind_ms="1" wind_angle="DR" visible="1" />
//Bauska
<RIBA99PA c="-20.6" ico="skn" wind_ms="1" wind_angle="DR" visible="1" />
//Daugavpils
<RIDM99MS c="-19.3" ico="mm2" wind_ms="3" wind_angle="DR" visible="1" />
/////////////nepastaav
<RIDO99MS c="" ico="" wind_ms="" wind_angle="" visible="0" />
////////////nepastaav
<GRISKANI c="" ico="" wind_ms="" wind_angle="" visible="0" />
//Gulbene
<RIGU99MS c="-18.3" ico="skn" wind_ms="2" wind_angle="DR" visible="1" />
//Jelgava
<RIJE99PA c="-21.2" ico="" wind_ms="1" wind_angle="R" visible="1" />
//Kolka
<RIKO99PA c="-9.4" ico="msn" wind_ms="5" wind_angle="R" visible="1" />
//Liep�ja
<RILP99PA c="-14.2" ico="mm2" wind_ms="4" wind_angle="R" visible="1" />
//Madona
<RIMADONA c="-19.3" ico="" wind_ms="2" wind_angle="DR" visible="1" />
//Mersraks
<RIME99MS c="-10.4" ico="msn" wind_ms="3" wind_angle="R" visible="1" />
//Priekuli
<RIPR99PA c="-17.9" ico="skn" wind_ms="1" wind_angle="R" visible="1" />
//Pavilosta
<RIPA99PA c="-14.8" ico="skn" wind_ms="3" wind_angle="ZR" visible="1" />
//Rezekne
<RIRE99MS c="-20.2" ico="" wind_ms="3" wind_angle="DR" visible="1" />
//Riga
<RIGASLU c="-14.0" ico="mm2" wind_ms="4" wind_angle="DR" visible="1" />
//Rujiena
<RIRU99PA c="-18.4" ico="skn" wind_ms="3" wind_angle="DR" visible="1" />
//Saldus
<RISA99PA c="-18.2" ico="skn" wind_ms="1" wind_angle="R" visible="1" />
//Skriveri
<RISI99PA c="-18.9" ico="skn" wind_ms="1" wind_angle="DR" visible="1" />
//Skulte
<RISE99MS c="-16.4" ico="skn" wind_ms="2" wind_angle="DR" visible="1" />
//Stende
<RIST99PA c="-18.8" ico="mm2" wind_ms="2" wind_angle="R" visible="1" />
//Ventspils
<RIVE99PA c="-13.2" ico="msn1" wind_ms="3" wind_angle="R" visible="1" />
//Ziilaani
<RIZI99PA c="-19.7" ico="skn" wind_ms="1" wind_angle="R" visible="1" />
//Zoseeni
<RIZO99MS c="-19.9" ico="skn" wind_ms="1" wind_angle="DR" visible="1" />

Link to comment
Share on other sites


×
×
  • Create New...