Re: Iconize weather info and something else
Brought to you by:
iridium
From: Martin G. <gim...@gi...> - 2002-02-11 15:26:39
|
"Ray van Beek" <r_v...@ho...> writes: > It works for me too, IE5.0. Great! Great - if it works in Mozilla and IE, then that will cover most of the browsers people use. Someone should try with Opera too... > One suggestion though, you flush the page each time the function > wait_for_report is called. To me, it seems that that is only > required once: immediately after the </html> tag. The page is then > sent to the browser, and the browser can start processing a complete > page. I don't know if it's necessary to flush the page so often, but I wanted to make sure, that the browser gets some data, so that it can begin rendering the page. I believe that I've read about a case, where they had to send several empty lines to the browser before it "got the message" and started rendering. But I haven't done any tests of things like that, so we'll probably have to adjust this later. > [...] > > What I would like to do in the coming days is creating a table that > maps the different icon files to a Sky Cover/Precipitation > combination table. A <IMG SRC=icon.php> construction in the webpage > calls the icon.php function. This function then searches the table > for the proper image file, that is then returned directly. To keep > this mechanism 'tunable', the names of the icons files are entered > in a include file. If someone likes to take his own set of icons, he > only has to change the file names in the include file. As far as I > can see it, the icon.php function can use the internal results of > the phpweather script. It sounds like a good approach, but how should it work, if people just specify <IMG SRC="icon.php">? Don't you mean something like this <IMG SRC="<?php weather_icon() ?>"> > Like I said, I will start my first experiments probably this week, I > keep you informed. Great. I think it would be a good idea to split this code out into another file, so that people can include it if needed. The 'old' code in PHP Weather really needs to be split up into several files, or even better: we should move to the 'new' version in CVS and work on that. It's been a long time since I've looked at the code, but as I remember it, it does most of the things the 'old' code does, and it does it better (more detailed, more special cases, etc...) -- Martin Geisler My GnuPG Key: 0xF7F6B57B See my homepage at http://www.gimpster.com/ for: PHP Weather => Shows the current weather on your webpage. PHP Shell => A telnet-connection (almost :-) in a PHP page. |