Solved

getting uplaoding img width and height info

Posted on 2001-06-25
3
268 Views
Last Modified: 2006-11-17
Hi,
   I would like to know if there's any way to get the img's width and height for an uploading image while they try to upload an image using FORM. Thanks for your help
0
Comment
Question by:swonge
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Expert Comment

by:katyan
ID: 6225010
i don't think so. it's after all binary data that u get when a form is submitted.
0
 
LVL 15

Accepted Solution

by:
a.marsh earned 50 total points
ID: 6225623
Once the file has been uploaded to the server (and ideally once you've copied the file to wherever it needs to go) you simply need to use this PHP function:

http://www.php.net/manual/en/function.getimagesize.php

:o)

Ant
0
 

Author Comment

by:swonge
ID: 6226129
Thanks for your help, it suit exactly what I have to do.  Thank you so much =)
0

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question