Is it possible to create an animated GIF using GIFs from another web server? I'm trying to animate weather radar data from a series of still frames. Essentially, I've taken your example.php script, and replaced the loop which creates the $frames and $framed arrays with the following lines:
$frames [ ] = "http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi?&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image/gif&TRANSPARENT=true&WIDTH=600&HEIGHT=400&SRS=EPSG:4326&BBOX=-92,37,-72,51&STYLES=default&LAYERS=nexrad-n0r";
$framed [ ] = 500;
$frames [ ] = "http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi?&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image/gif&TRANSPARENT=true&WIDTH=600&HEIGHT=400&SRS=EPSG:4326&BBOX=-92,37,-72,51&STYLES=default&LAYERS=nexrad-n0r-m05min";
$framed [ ] = 500;
When I use this script, I get the error:
Warning: filesize() [function.filesize]: stat failed for http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi?&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image/gif&TRANSPARENT=true&WIDTH=600&HEIGHT=400&SRS=EPSG:4326&BBOX=-92,37,-72,51&STYLES=default&LAYERS=nexrad-n0r in C:\apache\htdocs\nexrad\GIFEncoder.class.php on line 65
Warning: fread() [function.fread]: Length parameter must be greater than 0 in C:\apache\htdocs\nexrad\GIFEncoder.class.php on line 65
GIFEncoder V2.05: 0 Source is not a GIF image!
Which makes it look like it's trying to read the file from the local filesystem, and not from the web. Am I misunderstanding the 'url' source type? Those URLs are for a public WMS server, which returns GIF files of current weather data.
(My testing server is Windows / Apache 2.2 / PHP 5.1, but this ultimately needs to run under Linux / Apache 2 / PHP 5.)
Thanks,
--Ben |