Hi guys, here is my new site about Euro 2012:
Euroinfo.com.ua - All information about Euro2012, cities, teams, results, hotels in ukraine, shops, tickets...
#include "stdafx.h"
#include "iostream"
#include "stdio.h"
#include <fstream>
#include <ctime>
using namespace std;
void sift( int *array, int , int );
void generateRand(int n);
void heapsort( int *array, int );void main()
http://www.google.com/ig/api?weather=[city name]
http://www.google.com/ig/api?weather=jakarta
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | <? $xml = simplexml_load_file('http://www.google.com/ig/api?weather=jakarta'); $information = $xml->xpath("/xml_api_reply/weather/forecast_information"); $current = $xml->xpath("/xml_api_reply/weather/current_conditions"); $forecast_list = $xml->xpath("/xml_api_reply/weather/forecast_conditions"); ?> <html> <head> <title>Google Weather API</title> </head> <body> <h1><?= print $information[0]->city['data']; ?></h1> <h2>Today's weather</h2> <div class="weather"> <img src="<?= 'http://www.google.com' . $current[0]->icon['data']?>" alt="weather"?> <span class="condition"> <?= $current[0]->temp_f['data'] ?>° F, <?= $current[0]->condition['data'] ?> </span> </div> <h2>Forecast</h2> <? foreach ($forecast_list as $forecast) : ?> <div class="weather"> <img src="<?= 'http://www.google.com' . $forecast->icon['data']?>" alt="weather"?> <div><?= $forecast->day_of_week['data']; ?></div> <span class="condition"> <?= $forecast->low['data'] ?>° F - <?= $forecast->high['data'] ?>° F, <?= $forecast->condition['data'] ?> </span> </div> <? endforeach ?> </body> </html> |