using PHP to import file across the wire

liunx

Guest
Hello All:

I've doing this convoluted process of importing processed ASP pages into a PHP page. I'd give a URL but it's all behind a firewall. These ASP pages are reports that get generated as simple text. Here's the problem, one of the options is to display this report in one shot, another words I'm importing in a 588kb file into my php page, url looks like:

<!-- m --><a class="postlink" href="http://172.16.73.19/operations/gas_transmission/gtnw/shelltest.php?target=http://172.30.16.95:8080/tariff/temp/tariff.txt">http://172.16.73.19/operations/gas_tran ... tariff.txt</a><!-- m -->

My php grabs the target value and simply does a readfile with the target value in the parameter. This works beautifully in NS 7, it loads the file almost instantly. In IE6, it takes upwards of 4 minutes to load it in. Is there a reason for the difference in Download times across browsers? Is there a faster method available for IE? One last thing, the imported report loses all formatting, meaning the report in it's original form has centering and line breaks to present it in a readable format. How do I maintain those in the imported version?

Thanks for the help - Mikelooks like it abbreviated my url, try this:

http(bogus)://172.16.73.19/operations/gas_transmission/gtnw/shelltest.php?target=http://172.30.16.95:8080/tariff/temp/tariff.txtwell as I don't see the purpose but ok. how can a 588Kb happen almost instant?? the only way it can is if NS cached the file on your computer and took it from there. NS and IE are not that different to where it takes longer to Download stuff from the net. it has to be something to do with caching I bet.

when you import the file using fopen or such, how do you expect the file to keep it's formatting? it goes into an array and then you spit the content out of that array. you will lose all the formatting this way. should be able to just replace the formatting stucture with some real html tags once it comes in and then spit it out, just a guess though.Hey Scoutt,

thanks for the reply, I solved the formatting issue by placing the php tags inside <pre> tags, works fine. As far as the difference in browser Download times, I'm still stumped. But get this, after I figured out the formatting issue, it made the Download much shorter for IE. Netscape takes about 7 seconds, IE now takes around 20-25 seconds, I timed it after clearing all caches in both browsers. So I think the issue is more or less solved, I hope my QA team doesn't gripe over Download times ... ;)

- Mike

PS: the asp to php import business is because we want to leverage the existing functionality of an ASP app that churns its results out into a frameset. In an effort to maintain our look and feel for our new site, without mimicking the app in php, we just import the processed asp pages as if they were include files across the wire into our site... thanks for the help again!cool, sounds interesting.

glad you somewhat got it solved.The forum only abbreviates what you see, not the address passed if you click on it.
It does this to prevent thread stretch.

I don't think I know enough to answer your coding question, unfortunately.ah, I see, I figured the link worked, I just wanted the query string to be seen.
 
Back
Top