Add files via upload
This commit is contained in:
parent
3a4618312e
commit
d441b84dd0
6
all.sh
Normal file
6
all.sh
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
echo " "$(date)
|
||||||
|
bash meteo.sh
|
||||||
|
php feed.php | fold -w 40 | sed 's/^/ /'
|
||||||
|
echo "-----------------------" | sed 's/^/ /'
|
||||||
|
echo "Lezioni di oggi: " | sed 's/^/ /'
|
||||||
|
cat orari/$(date +"%a") | sed 's/^/ /'
|
25
feed.php
Normal file
25
feed.php
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
$content = file_get_contents("https://www.ansa.it/sito/ansait_rss.xml");
|
||||||
|
// Instantiate XML element
|
||||||
|
$a = new SimpleXMLElement($content);
|
||||||
|
echo "News:\n";
|
||||||
|
$list=$a->channel->item;
|
||||||
|
$tot=5;
|
||||||
|
if(count($list)<$tot) $tot=count($list);
|
||||||
|
for($i=0;$i<$tot;$i++) {
|
||||||
|
$entry = $list[$i];
|
||||||
|
$dt = date("d/m/Y H:i:s",strtotime($entry->pubDate));
|
||||||
|
echo "* ".$dt." * " . $entry->title . "\n";
|
||||||
|
}
|
||||||
|
$content = file_get_contents("http://www.liceococito.edu.it/feed/");
|
||||||
|
// Instantiate XML element
|
||||||
|
$a = new SimpleXMLElement($content);
|
||||||
|
echo "\n---------------\nNews dal Liceo:\n";
|
||||||
|
$list=$a->channel->item;
|
||||||
|
$tot=5;
|
||||||
|
if(count($list)<$tot) $tot=count($list);
|
||||||
|
for($i=0;$i<$tot;$i++) {
|
||||||
|
$entry = $list[$i];
|
||||||
|
$dt = date("d/m/Y H:i:s",strtotime($entry->pubDate));
|
||||||
|
echo "* ".$dt." * " . $entry->title . "\n";
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user