×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

In one sentence - what is PHP?

In one sentence - what is PHP?

In one sentence - what is PHP?

(OP)
I was told to come here after posting up a problem with uploading then resizing images (I'll explain in more detail if need be), but I've only recently come across PHP. What is it?

Apologies for my general dumbness.

RE: In one sentence - what is PHP?

First, PHP is a server-side web programming language very similar to ASP, although in my opinion, more powerful and straightforward.

However, since I was the one that sent you here, I'll have to take a moment more to help evaluate your situation, which might not need PHP at all.

1. Do the people uploading these images need immediate feedback on the image size? In other words does it need to display online instantly at the new resampled size, or can it wait until the next day or whatever time period you decide?

2. What kind of web server are you running? Apache on Unix, IIS on Windows NT, or another server? Do you have any authority to install software on this server?

3. Do you have direct access to the server yourself on an internal network, or are you using FTP to connect?

If the answer to #1 is no, then all you need to do is set up some sort of scheduled script or macro to run every day (or more) on the server or a connected workstation which checks all the images in a certain directory, resizes them, then saves them to another directory. In this case, on a Unix system, you could use a program like Gimp (we have a forum), which is the Unix version of Photoshop, but which also has a very capable scripting language that could handle this task. In fact, Gimp can be run in "batch mode" which doesn't even use the graphical interface at all. If you are on a Windows system, or have an attached Windows workstation, you could use CorelDraw 8 or 9, which also has a complete scripting environment. I once ran a Corel macro that resized 2000 images in an hour, and saved them back to the web server at the appropriate size. Corel could also import vector images and export them as bitmapped gifs or jpegs, as you mention in your other post.

If the answer to #1 is yes, then you will need something a little more complicated. PHP can be used as the scripting language to control another program which can then resize the image and display the finished product online. ASP could also accomplish this. The main difficulty is WHICH program do you use? The Unix program called GD can resize GIF images only, so I doubt its usefulness. Gimp can be controlled server-side with Perl, and I believe PHP, but it will be a big learning curve.There is another Unix program called Image Magick. Another possibility is using Java either on the server side or the client.

I would suggest if at all possible to answer no to question #1 and do the first of these options, because it will save you a lot of work. If you need to have instant feedback, though, PHP is the right forum to be in.

Good luck, and I will try to help.

RE: In one sentence - what is PHP?

(OP)
rycamor,

thanks for your reply, that’s really cool. After reading through your response I considered your point about instant display after uploading: in this situation I think the image will have to go through some kind of administration process so that the file size is optimized. For example, the file uploaded may have been created as a gif with a palette of 256 colors, when it may display just as well with 128; or it could have an index transparency when in fact an alpha transparency would suffice. Whilst I could stipulate that the image size be 100x300 ppi, it may not be fully optimized, and that could impact on download time. Therefore, in the short term at least, I think I’m going to have to get people uploading images to agree that it be 100x300 ppi, with a file size of no more than 20k, and I’ll just have to do a quick health check in Fireworks.

Your response, however, was really useful and it’s given me food for thought. I’m just learning asp (I’ve always been front-end design until recently) but your enthusiasm for PHP is encouraging – I’ve since subscribed to the forum and will do a little investigating. Also, I didn’t know CorelDraw 8/9 had a scripting environment - that sounds extremely useful - I may have to purchase a copy!

Thanks once again for your time.

RE: In one sentence - what is PHP?

Your welcome, and good luck; it's a crazy new web world out there...

Rick

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close