karthikeyan_coder Posted December 2, 2006 Share Posted December 2, 2006 hi, My server admin blocked remote file include in my server due to security problems. so i cannt execute getimagesize(); function.. i use this function to get width,height and type... So i decided to use three separate functions for those pupose1. imagex();2. imagey();3. exif_imagetype();$filename is having some url.. like http://www.phpfreaks.com/images/logo_main.jpg $width = imagesx($filename); $height = imagesy($filename); $type = exif_imagetype($filename);Error:[b]Warning: imagesx(): [/b]supplied argument is not a valid Image resource in morph.php on line 474[b]Warning: imagesy():[/b] supplied argument is not a valid Image resource in photo-morph.php on line 475[b]Fatal error: Call to undefined function:[/b] exif_imagetype() in photo-morph.php on line 476Please help me. Link to comment https://forums.phpfreaks.com/topic/29251-alternate-function-selection-does-my-choice-is-good/ Share on other sites More sharing options...
Psycho Posted December 2, 2006 Share Posted December 2, 2006 The first two are failing because they take an image "resource" (basically a pointer or object) not the image path.Try this[code]<?php$img = @imagecreatefromjpeg("http://www.mysite.com/my_image.jpg");$width = imagesx($img);$height = imagesy($img);?>[/code]I don't know why exif_imagetype is failing. What version of PHP are you using? Link to comment https://forums.phpfreaks.com/topic/29251-alternate-function-selection-does-my-choice-is-good/#findComment-134091 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.