ODBiC Discussion Board


Find the image size (width,height) odbic in combination with php

by Phil, June 19, 2008 06:54

Hi, I just want to share this with you. I needed to collect the dimensions of an image, I spend most of my time trying with Javascript but I was not successful at all.So I made it with php (it means your server should be able to run php as well - works from php4)

1. I created a file imgarray.php containing this:

<?php
list($width, $height, $type, $attr) = getimagesize("$myimage");
echo $width,'-',$height;
?>

2. I created an odb file imgsize.odb with this:

<!--SET myimage="yourpath/your_image.jpg" -->
<!--SET aa = $httpget(xxxx://www.your_server/imgarray.php,myimage) -->
<!--SET imagex = $split(aa,"-") -->
<!--SET imagey = $aa$ -->
<p>
w=$imagex$<br>
h=$imagey$
</p>

Execute imgsize.odb through ODBic in passing the variable 'myimage'. replace xxxx with something else ;-) and enjoy.


Replies:


Post Your Reply:

Name   
E-mail  optional
Topic  
Message:

HTTP Link: 
Link text: 

          


Copyright ©1997-2003, Roger Harris. All rights reserved.