|  | |
08-07-2005, 04:13 AM
|
#1 (permalink)
|
Monster Techie Join Date: Feb 2005 Posts: 1,745
| What can one all do with PHP? i know it has to do with internet, but what all can one do with it. i want to get into programming but reading things for me, " i have a reading problem". so its hard for me to understand it. Ao i thought PHP would be good :o so im not to sure someone told me that php is able to build websites or something like that im not sure. Please tell me if im wrong lol mostly am.
__________________ |
| |
08-07-2005, 10:54 AM
|
#2 (permalink)
|
Ultra Techie Join Date: Jul 2005 Posts: 530
| PHP is a programming language that allows programmers to create webpages that are dynamically created at runtime. It also allows access to files stored on the server disk directly, as well as access to various database engines such as mySQL.
__________________ Desktop machine: 2 x Opteron 246, Asus K8N-DL, 2GB PC3200 ECC Reg., XFX GeForce 6600GT, 74gb WD Raptor, 2 x 19\" LCDs, Windows XP x64
Server machine: Intel P4 3.0GHz 2MB EM64T, ECS i865pe, 1GB PC3200, 36gb WD Raptor, Windows Server 2003
Laptop: Dell Inspiron 9100 (Intel P4 3.2GHz 1MB Prescott, i865pe, 512MB PC3200, Mobility Radeon 9700, DVD+R/DL Burner), Windows XP
Linux: P3 450Mhz, 386MB ram, Slackware 10.1 (Running mySQL/Apache) |
| |
08-08-2005, 09:47 AM
|
#3 (permalink)
|
Beer Join Date: Apr 2005 Location: New York Posts: 565
| TheHeadFL, PHP is actually a good deal more than that. But yes, on the very basic level.
My sig was outputted dynamically by PHP. Refresh the page and you will see that it changes. The text (date and alias) were added dynamically as well.
PHP has many features with images where you can post images dynamically, add text, resize, combine images, etc. To be honest, I've never heard of a more useful utility. If you run some sort of album website or something, there is no need to have separate thumbnails since PHP can resize the images and output 'em (ie. [img]someimage.php?file=whatever.gif&width=50&height=50[/img]).
It is even possible to ouput flash sequences with PHP. Check the SWF references for details.
__________________ |
| |
08-08-2005, 10:13 AM
|
#4 (permalink)
|
Super Techie Join Date: Feb 2005 Posts: 262
| PHP is a very versatile language... you'd get a shorter list asking what you can't do with it.
__________________ AMD Athlon 64 3000+ (Overclocked to 3300+)
ASUS K8V-Deluxe
1GB PC3200 DDR
2x200GB Seagate SATA RAID 0
BFG 6800GT OC w\\128MB Ram
2x 19\" Samsung 930B LCDs |
| |
08-08-2005, 01:13 PM
|
#5 (permalink)
|
Ultra Techie Join Date: Sep 2003 Location: Bamberg, Germany Posts: 549
| Quote: Originally posted by Calzinger If you run some sort of album website or something, there is no need to have separate thumbnails since PHP can resize the images and output 'em (ie. [img]someimage.php?file=whatever.gif&width=50&height=50[/img]). | I would not advise doing that, unless you have bandwidth coming out of your ***. You should always make thumbnails of your images, not doing so is just stupid. |
| |
08-08-2005, 01:24 PM
|
#6 (permalink)
|
Beer Join Date: Apr 2005 Location: New York Posts: 565
| I beg to differ. You have dismissed the purpose. Obivously if one is hosting a huge album with massive resolutions where bandwith is in small amounts, it could be a problem. Then again, you shouldn't be hosting a massive high-resolution album on little bandwith. But if someone has a large amount of bandwith (which good webhosts give), then it isn't a problem. If you are paying over $15 per month and aren't even getting 30 GB of bandwith, THAT is just stupid.
I hardly think you should dismiss a great solution simply for a problem that won't necessarily arise.
__________________ |
| |
08-08-2005, 01:32 PM
|
#7 (permalink)
|
Super Techie Join Date: Feb 2005 Posts: 262
| If you have a 15mb image and you show use browser resizing to display it it will take MUCH longer to display it than it would a properly resized thumbnail.
If coded properly a Picture Gallery script would take the file uploaded by the user and if over X by Y dimensions or Z size it would create a resized thumbnail with a different name (ie. Picture0007.png (15mb) is uploaded the script takes the pic, resizes it and renames it to Picture0007_t.png (30kb) or in a thumbnail folder.
The ONLY advantage to showing the thumbnail as a dynamically resized image would be that when you click on it to expand it's already cached and loads immediatly but it all depends where you want the load time... in thumbs where they are supposed to be fast or in the expanded view where time is given by the user wanting to wait to see the bigger picture.
__________________ AMD Athlon 64 3000+ (Overclocked to 3300+)
ASUS K8V-Deluxe
1GB PC3200 DDR
2x200GB Seagate SATA RAID 0
BFG 6800GT OC w\\128MB Ram
2x 19\" Samsung 930B LCDs |
| |
08-08-2005, 01:41 PM
|
#8 (permalink)
|
Beer Join Date: Apr 2005 Location: New York Posts: 565
| Quote: Originally posted by jinexile If you have a 15mb image and you show use browser resizing to display it it will take MUCH longer to display it than it would a properly resized thumbnail. | Though I don't see how this relates. Browser resizing and dynamic output are completely different. And isn't a 15mb image a bit of an unrealistic example or do people actually have such a massive image file size? Quote: Originally posted by jinexile If coded properly a Picture Gallery script would take the file uploaded by the user and if over X by Y dimensions or Z size it would create a resized thumbnail with a different name (ie. Picture0007.png (15mb) is uploaded the script takes the pic, resizes it and renames it to Picture0007_t.png (30kb) or in a thumbnail folder. | That would certainly be the ideal solution. Not only do you avoid having to manually create your own thumbnails but you only load the thumbnail rather than the whole image into PHP and then have to resize it. Quote: Originally posted by jinexile The ONLY advantage to showing the thumbnail as a dynamically resized image would be that when you click on it to expand it's already cached and loads immediatly but it all depends where you want the load time... in thumbs where they are supposed to be fast or in the expanded view where time is given by the user wanting to wait to see the bigger picture. | Incorrect. If PHP gives you a resized image, the larger image won't be cached since it was never actually sent to you.
__________________ |
| |
08-08-2005, 09:06 PM
|
#9 (permalink)
|
Ultra Techie Join Date: Sep 2003 Location: Bamberg, Germany Posts: 549
| Quote: |
Though I don't see how this relates. Browser resizing and dynamic output are completely different. And isn't a 15mb image a bit of an unrealistic example or do people actually have such a massive image file size?
| 15mb isn't that big. I used to work with pictures that were over 400mb. You're talking about browser resizing, you're not talking about dynamically outputting a smaller version of the image. Quote: |
Incorrect. If PHP gives you a resized image, the larger image won't be cached since it was never actually sent to you.
| He's talking about when you don't use a thumbnail. It will load and cache the entire image, so the load time is in the thumbnail (in the incorrect place).
Basically on everything else, I agree 100% with jinexile |
| |
08-08-2005, 09:21 PM
|
#10 (permalink)
|
Beer Join Date: Apr 2005 Location: New York Posts: 565
| I do think that PHP's dynamic output is much quicker with giving you a resized image than browser resizing. Please correct me if that is incorrect, but from what I have seen, that seems to be so.
Since this is the case, dynamic output is the quickest solution if you don't want to go to photoshop and resize each image in your album.
I think that creating a new resized thumbnail is definitely the best possible solution. But can this be done with PHP?
__________________ |
| |  | | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | |