flash error "TypeError: Error #1085: The element type..." from XML

I am pulling my hair out for days.
I have created a flash movie using xml from wheather.com.
If i run the movie from my desktop it works fine.
After placing it on my webserver and using proxy.php to call the xml file.
I get the following error:
TypeError: Error #1085: The element type "IMG" must be terminated by the matching end-tag "</IMG>".
      at Weather_Widget_5_day_fla::MainTimeline/weatherLoaded()
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at flash.net::URLLoader/onComplete()

The actionscript is fine, the xml has been validated using a xml validator.
The tag </img> can not even be found in the xml.

Like I said running it from my desktop no problem.
Does anyone know what the problem can be?
The code that I am using is below and I am using proxy.php (http://sourceforge.net/projects/php-proxy/).

Thanks in advance

//allow domains

Security.allowDomain("*", "xoap.weather.com");

//ini settings

icons_mc.visible = false;


var weather_xml_url:String = "http://www.picsfromtheblue.com/duikschool/URLproxyServer.php?url=http://xoap.weather.com/weather/local/"+city+"?cc=*&dayf=5&link=xoap&par="+par_id+"&key="+key+"&unit="+units;

var weather:XML = new XML();
var weather_url:URLRequest = new URLRequest(weather_xml_url);
var weatherLoader:URLLoader = new URLLoader(weather_url);

weatherLoader.addEventListener(Event.COMPLETE, weatherLoaded);

function weatherLoaded(e:Event):void
	weather = XML(weatherLoader.data);
	temp_txt.text = weather.cc.tmp;
	day2_txt.text = weather.dayf.day[1].hi;
	day3_txt.text = weather.dayf.day[2].hi;
	day4_txt.text = weather.dayf.day[3].hi;
	day5_txt.text = weather.dayf.day[4].hi;
	text2_txt.text = weather.dayf.day[1].attribute("t");
	text3_txt.text = weather.dayf.day[2].attribute("t");
	text4_txt.text = weather.dayf.day[3].attribute("t");
	text5_txt.text = weather.dayf.day[4].attribute("t");

	icons_mc.visible = true;

	var weather_icon:int = Number(weather.cc.icon.toString())+1;
	var weather2_icon:int = Number(weather.dayf.day[1].part[0].icon.toString())+1;
	var weather3_icon:int = Number(weather.dayf.day[2].part[0].icon.toString())+1;
	var weather4_icon:int = Number(weather.dayf.day[3].part[0].icon.toString())+1;
	var weather5_icon:int = Number(weather.dayf.day[4].part[0].icon.toString())+1;

	//set the complementary text
	var ud:String = weather.head.ud;
	var us:String = weather.head.us;
	var city:String = weather.loc.dnam;
	var time:String = weather.loc.tm;
	var temp:String = weather.cc.tmp;
	var day2:String = weather.dayf.day[1].hi;
	var day3:String = weather.dayf.day[2].hi;
	var day4:String = weather.dayf.day[3].hi;
	var day5:String = weather.dayf.day[4].hi;
	var text2:String = weather.dayf.day[1].attribute("t");
	var text3:String = weather.dayf.day[2].attribute("t");
	var text4:String = weather.dayf.day[3].attribute("t");
	var text5:String = weather.dayf.day[4].attribute("t");
	var flik:String = weather.cc.flik;
	var term:String;

	if (temp == flik)
		term = "and it feels like "+flik+" degrees,";
	} else {
		term = "but it feels like "+flik+" degrees,";
	var wind_v:String = weather.cc.wind.s;
	var wind_gust:String = weather.cc.wind.gust;
	var wind_d:String = weather.cc.wind.d;
	var wind_t:String = weather.cc.wind.t;

	var hmid:String = weather.cc.hmid;
	var vis:String = weather.cc.vis;

	info_txt.text = city;
	day2_txt.text = day2;
	day3_txt.text = day3;
	day4_txt.text = day4;
	day5_txt.text = day5;
	text2_txt.text = text2;
	text3_txt.text = text3;
	text4_txt.text = text4;
	text5_txt.text = text5;

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Randy PooleCommented:
Post the values you are using to crate the URL string.
I think your problem is in the weather_xml_url variable
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

There is a source forge image embedded  in the link.
omejanAuthor Commented:
Hi mizilla,
Thanks for your quick response.
Which link are talking about?
weather_xml_url variable =

omejanAuthor Commented:
Yep, it displays an image when printing the errors, so I removed it.
This got me around the 1085 error, and gave me a 1088 error.
After digging around for several hours and trying some other proxy php scripts.
I found out that my provider did not allow allow_url_fopen in the php.ini file.
So I created a customised php.ini file and used a simpler version of the proxy.php, you can see it below.
I amended my flash movie pointing it to the right php file.
Once the php.ini was uploaded and the new proxy file was in place everything worked.

Hope that this will be usefull for other people.

Below the new much simpler php I used.

Thanks for your help anyway.
$content= file_get_contents('http://www.yourdomain.com');
echo $content;

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.