How to get the Weather? HTTP
#1

i tried to get the weather in my country....... that what i did -

PHP код:
HTTP(playeridHTTP_GET"weather.yahoo.com/israel/tel-aviv/tel-aviv-1968212/""""Weather"); 
PHP код:
forward Weather(data[]);
public 
Weather(data[])
{
scmToAll(red,data);
return 
1;

and thats showed me something not clear.. [not working]

so.. how ? thanks for helping
Reply
#2

You need to extract the data you need, as the HTTP function fetches the whole page (try the 'View Source' function in your browser and you'll see what I mean) .. Use stfind if you know what you're looking for.
Reply
#3

ok i understand what you mean, but, how can I extract the data I need? I looked in the 'View Source' I found what i need but I don't know exactly what to take and what to do with that..
Reply
#4

Or else you can use this include

Quote:
Real weather
AddWeatherObserver

Creates a weather observer that updates the data for the url every specified milliseconds.

Parameters:
(url[], updatetime)
url[] The link to the wanted position from weather.yahoo.com.
updatetime Interval in ms in which the weather is checked (10 mins are more than enough for normal use).

Returns The observerid of the created observer, -1 if it could not be added.

Note: To get the URL, go to weather.yahoo.com and search for the town/area you want. Use the link up to the last slash (e.g. http://weather.yahoo.com/bahrain/cap...anama-1967057/)
Reply
#5

but i don't want to set the weather like in my country .. i just want to take the status of the weather that's all :\
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)