Jump to content
xisto Community
moldboy

Bandwidth And Php big php file, small output, BW usage?

Recommended Posts

I was wondering, now that I'm learning PHP and the whole IF thing. Let's say I made a 10mb (god forbid) PHP page, however at any given time, using variables, and the works the rendered html page was only 100kb, would the bandwidth used by that page everytime it was visited 100kb or 10mb, after all the server still has to open the whole page either way.

Notice from snlildude87:
Your topic title needs to describe the thread more clearly.Also, I'm moving this to PHP since it relates to that more
Edited by snlildude87 (see edit history)

Share this post


Link to post
Share on other sites

I'm a PHP newbie myself. Just about everything in my website, except for my blog and shoutbox, I made myself.

Anyway, bandwidth is the amount of data transferred, so the amount of bandwidth that will be used for said page will depend on the size of the rendered page. If the page outputted is huge, then you will use a lot of bandwidth for that page. If not, then not a lot of bandwidth will be used. So if you have a 10 MB page due to variables and poor coding technique :unsure:, but it only outputs a couple of lines, then not a lot of bandwidth is used.

Any PHP/bandwidth gurus out there who know that I'm wrong, feel free to correct me.

http://forums.xisto.com/no_longer_exists/

Edited by snlildude87 (see edit history)

Share this post


Link to post
Share on other sites

Only way a php page will affect bandwidth is if you have like a wav file running on the page, and have like tons and tons of images. Other than that, it's all text...

Share this post


Link to post
Share on other sites

About your point runnning huge files, I would suggest instead of making 10MB big file, use FILE INCLUDES. A Good feature of php which will allow you to integrate code from external php file like modules. That is a better practice for coding.Because, allowing the server to process the entire file might put extra load on it and can result on your account to be terminated.As for the BW, the bw is only calucated in terms of the amount of data that is transfered between the client and the server. so, the issue of bw is not a problem. The only bw that is counted would be depending on the output of the program and not on the size of it.

Share this post


Link to post
Share on other sites

I'm still learning, so thanks for the tip, and don't worry about me making a 10mb file, that would take me two hours min to upload. Not to mention typing, that's what, something like 10,485,760 characters!

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.