Bonjour !
Je souhaite parser le feed rss meteo de la BBC http://feeds.bbc.co.uk/weather/feeds/rs ... d/0008.xml pour en retenir notemment les temperatures min et max, et le temps qu'il fait :
Tuesday: sunny intervals, Max Temp: 7°C (45°F), Min Temp: 1°C (34°F)
les infos sont principalement dans cette ligne :
Le probleme est que lorsque j'ouvre le flux dans mon code php, avec un fopen ou un @file($urldufeed) je perds la ligne en question, mais pas le lien qui est derriere et qui apparait bien ici, obtenant plus une bouillie de ce genre la :
string(3558) " http://www.bbc.co.uk/weather/5day.shtml?world=0008 by the BBC Weather Centre in association with the Met Office en Copyright: (C) British Broadcasting Corporation Tue, 20 Jan 2009 08:10:06 +0000 Tue, 20 Jan 2009 08:10:06 +0000 [email protected] (BBC Weather) [email protected] (BBC Weather) http://www.bbc.co.uk/weather/5day.shtml?world=0008 http://www.bbc.co.uk/weather/images/symbols/57x57/3.gif http://www.bbc.co.uk/weather/5day.shtml?world=0008 Max Temp: 7°C (45°F), Min Temp: 1°C (34°F), Wind Direction: SW, Wind Speed: 6mph, Visibility: poor, Pressure: 991mb, Humidity: 76%, UV risk: low, Pollution: low, Sunrise: 07:55GMT, Sunset: 16:26GMT tag:feeds.bbc.co.uk,(none):/weather/5day/world/0008-1 Tue, 20 Jan 2009 08:10:06 +0000 51.52 -0.10 http://www.bbc.co.uk/weather/5day.shtml?world=0008 Max Temp: 5°C (41°F), Min Temp: 4°C (39°F), Wind Direction: SW, Wind Speed: 7mph, Visibility: very poor, Pressure: 1004mb, Humidity: 72%, UV risk: low, Pollution: low, Sunrise: 07:54GMT, Sunset: 16:28GMT tag:feeds.bbc.co.uk,(none):/weather/5day/world/0008-2 Tue, 20 Jan 2009 08:10:06 +0000 51.52 -0.10 http://www.bbc.co.uk/weather/5day.shtml?world=0008 Max Temp: 8°C (46°F), Min Temp: 6°C (43°F), Wind Direction: SSW, Wind Speed: 13mph, Visibility: poor, Pressure: 988mb, Humidity: 89%, UV risk: low, Pollution: low, Sunrise: 07:53GMT, Sunset: 16:30GMT tag:feeds.bbc.co.uk,(none):/weather/5day/world/0008-3 Tue, 20 Jan 2009 08:10:06 +0000 51.52 -0.10 "
Or ici je perds la ligne avec le lien, et ses infos avec.
Savez vous pourquoi elle apparait dans le site de la bbc, sur le feed, et pas dans mon string ?
D'avance merci.