Page 1 of 1

Fellow jedi, I need help in Force Download -> PROBLEM SOLVED

Posted: Sun Jul 27, 2008 7:19 pm
by deeessay
Hi all,

I have a code that is supposed to download an xml file. The download is working only that when the xml file has been downloaded, there are HTML tags inserted along with it:

It looks like this:

<html>
<body>

<?xml ?>
<tag1>
<subtag1>
</subtag1>
</tag1>

</body>
</html>

I want to get the xml file only.... I wonder why those html tags were inserted... when I checked the source file, it only contains xml tags... anyway here's my code:


header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: text/xml");
header('Content-Disposition: attachment; filename="XMLforupload.xml"');
readfile("XMLforupload.xml");


I have tried looking for a solution but google can't seem to find a good match... any help is much appreciated.

Re: Fellow jedi, I need help in Force Download

Posted: Mon Jul 28, 2008 1:44 am
by jaoudestudios
Maybe these 2 examples can help...

Step 1. Create XML file...
http://www.forum.jaoudestudios.com/view ... ?f=33&t=74

Step 2. Force Download...
http://www.forum.jaoudestudios.com/view ... p?f=13&t=8

Re: Fellow jedi, I need help in Force Download

Posted: Mon Jul 28, 2008 3:58 am
by deeessay
ah finally! a reply!
:D

thanks so much for replying! I'll check the site right away!

Re: Fellow jedi, I need help in Force Download

Posted: Mon Jul 28, 2008 7:34 pm
by deeessay
Hi, I tried the force download function and I still got the same result -- there are still html tags added to my xml file.... argh this is driving me nuts!!!

:banghead:

please help me!!!
:cry:

Re: Fellow jedi, I need help in Force Download

Posted: Mon Jul 28, 2008 7:40 pm
by deeessay
Nevermind the last post, I got the code working!

Thanks, jaoudestudios for your assistance!

good day!