May 21, 2012, 04:50:30 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: follow us on twitter @dotdragnet
Home
Help
Search
Login
Register
DotDragnet
>
The Tech Side
>
Tech stuff
>
PHP image database questions
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: PHP image database questions (Read 879 times)
JohneeMac
Guest
PHP image database questions
«
on:
October 26, 2007, 09:45:36 AM »
Im creating an php image database for users to choose images then send an php mail with the details of the photos they want ( no payment system).
I think i will set up a lightbox, as its a good way of viewing photos.
But: There are hundreds of photos, but if i use a batch process in PS and then upload them into a folder, can i make a php script the find the dimensions? It would save me a lot of time rather than manually putting in the width and height.
If the images are named say child1.jpg, child2.jpg, im guessing there is a simple way in php that i can extract the number (1,2) etc and put it beside each photo as a reference?
This may sound like a dodgy website here, but dont worry its for a small photography agency that are doing a photo shoot at a playgroup
As always thanks for your time.
Logged
Jeewhizz
DDN Contribs
Hero Member
Posts: 1626
Re: PHP image database questions
«
Reply #1 on:
October 26, 2007, 10:22:23 AM »
http://uk2.php.net/getimagesize
<?php
$file = 'child2.jpg';
preg_match("/(\d+)\.jpg$/i",$file,$match);
$digits = $match[1];
?>
$digits will have '2' for 'child2.jpg'. Or it'll be '123' for 'child123.jpg'
Jee
Logged
UK Web Design
Airport Car Parking
Check out my
blog
Business Forums
Pages: [
1
]
Go Up
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> General Discussion
=> Jee's Forum of Appalling Jokes
-----------------------------
The Creative Side
-----------------------------
=> Arty stuff
=> Photography
=> On the web
-----------------------------
The Tech Side
-----------------------------
=> Tech stuff
=> Hardware & Software
-----------------------------
The Business Side
-----------------------------
=> Anything business related
-----------------------------
The Practical Side
-----------------------------
=> Practical Advice
DotDragnet
>
The Tech Side
>
Tech stuff
>
PHP image database questions
Loading...