electron
Sep 9 2006, 03:56 AM
| | Hi,
I have come accross some starnge problem in PHP. I wanted to detect the image resolution in of a URL specified by the user. This is possible via getimagesize() function of PHP that is independent of GD library.
But this function generates a E_WARNING Error if the image is not there. What shall i do to stop this warning ?? I dont want to show the Error in PHP style but my style of error reporting.
Please help me. |
Reply
rvalkass
Sep 9 2006, 07:23 AM
First run an if statement to check for the existance of the image. If it doesn't exist, output to the user that they made a mistake and the address to the image is incorrect. Make sure that you kill the script after you output your nicer error, or it will still try and get the image size.
Reply
Recent Queries:--
php resolution pictures - 7.70 hr back. (1)
-
getting resolution in php - 22.75 hr back. (1)
-
get image size in php without gd - 25.29 hr back. (1)
-
image resolution in php function - 26.65 hr back. (1)
-
how to get image resolution in php function - 26.71 hr back. (1)
-
php image header resolution - 29.22 hr back. (1)
-
detect image resolution - 29.50 hr back. (1)
-
changing picture resolution from a script - 34.78 hr back. (1)
-
php image resolution - 42.10 hr back. (2)
-
stop errors list resolution - 74.15 hr back. (1)
-
resolution image php - 74.18 hr back. (1)
-
detect upload images type php - 77.57 hr back. (1)
-
php get image size without gd - 79.67 hr back. (1)
-
get image resolution with php - 81.12 hr back. (1)
Similar Topics
Keywords : detect, image, resolution, gd, stop, error, found
- Mysql Error
(3)
Image Upload
?!? (11) I need the image upload script which automatically resized the image by specified size and store it
in the specified folder.....
Php Objects: Catchable Fatal Error
There is a weird problem with objects in php 5.2.2 (4) in php 4.4.7 my code seems to be ok but in later version 5.2.2 i get this error Catchable fatal
error: Object of class mission_rank could not be converted to string in
/Applications/xampp/xamppfiles/htdocs/nexus/includes/forms/cn_reload.php on line 41 cn_reload.php
include('../class/userClass.php'); session_start(); $app_user =&
$_SESSION ; if ($app_user->character != false) { $race_letter =
array('H','E','T','M','G'); $cn_id = 0; foreach
($app_user->character as....
Get A Image Indentifier With Gd Library
GD library question (7) Hey fellow coders, I'm having a problem. If you output a im indentifier in php with gd libary.
With this method for example: CODE <?
header("(anti-spam-(anti-spam-(anti-spam-content-type:)))
image/png"); $imgWidth = 50; $imgHeight = 50;
$image=imagecreate($imgWidth, $imgHeight); $colorBlack =
imagecolorallocate($image, 0, 0, 0); // first color you define with colorallocate is
also the color of the background of your image imagepng ($image); image....
Php And Flash Image Gallery
Need some help in creating or editing an xml file while viewing some o (5) Hello there and thanks for the helping hand you are offering. PHP newbie here! /ph34r.gif"
style="vertical-align:middle" emoid=":ph34r:" border="0" alt="ph34r.gif" /> So here is my problem:
On my website I have a flash image gallery.The way the gallery works is by uploading pictures in a
folder and editing? an xml file.(pics.xml) where it adds the following code when you upload a
picture: CODE <pictures> <image location="nameofpicture1.jpg"
desc="" /> <image location="nameofpicture2.jpg" desc="" /....
T_string Error Please Assist
(5) I have unexpected t_strings in 3 lines they are CODE <?php // $Header$ //this
script may only be included - so its better to die if called directly. if
(strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !==
false) { header("location: index.php"); exit; } /* A basic library to
handle a cache of some Tiki Objects, usage is simple and feel free to improve it */ class Cachelib
{ var $folder; function Cachelib() { global $tikidomain;
$th....
Trap17 Board Status Dynamic Image
(13) I was really board a few days ago and decided to make a trap17 board status image for my sig
/tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" /> That is the
current beta. I'm still working on it so that it might display the most recent post or
somthing, i'm not sure. After I finish it ill give out the source code but if you want one
right now you can pm me and ill set one up to get the info on your account ^.^ So I was wondering
how you members liked it? You'll probably think that its a waist of time, but alas as I sai....
Phpbb2 Error
recently showing up (4) I tried to install a mod. Did it successfully but didn't like the end result. So I went through
the install backwards and reverted everything back to how they were. Now I am getting this error.
QUOTE Warning: Cannot modify header information - headers already sent by (output started at
/home/damen/public_html/phpBB/language/lang_english/lang_main.php:1034) in
/home/damen/public_html/phpBB/includes/page_header.php on line 483 Warning: Cannot modify header
information - headers already sent by (output started at
/home/damen/public_html/phpBB/language/lang_english....
Php Fsockopen() Error
(14) Hi guys, I've been having problems with PHP and my Apache server, I've got this book (SAMS
PHP, MYSQL and Apache All in One) I've installed all services correctly, but I get an error on
my Radio Homepage saying: QUOTE Warning: fsockopen() : unable to connect to 5.106.1.74:8000 (A
non-blocking socket operation could not be completed immediately. ) in C:\Program
Files\Apache Group\Apache2\htdocs\radio\stats\radio_stats.php on line
13 Riphabbo Radio Is Currently Offline I'm new to PHP and would like to know if th....
Error On Emailer.php & Smtp.php At Phpbb
ERROR on emailer.php & smtp.php at PhpBB (2) Are you use free webhosting??? smtp.php and emailer.php are general error on CMS like phpBB . It
make email verification disabled.Why??? because free webhosting not allow us use smtp port .they
afraid their server will atacking with spam !! so what solution to solve this problem?? You
can search on google or join at phpBB forum !!! but if it can not solve all this problem
it only able 1 trick ..you must download emailer MOD at www.phpbbhacks.com to inactive emailer.php
or smtp.php ....
Error With Joomla Template
cant find function (1) Hello! I am working on my template in Dreamweaver and i am using joomla extensions for
dreamweaver! When i start my page with joomla stand alone server(jsas) i get this errors on the
bottom of the page! QUOTE Warning:
mosloadcomponent(w:/www/Joomla/components/com_banner/banner.php) : failed to open stream: No such
file or directory in w:\www\Joomla\includes\frontend.php on line 66 Warning:
mosloadcomponent(w:/www/Joomla/components/com_banner/banner.php) : failed to open stream: No such
file or directory in w:\www\Joomla....
Flipping An Animated Gif Image W/ Gd Library
Help (1) I need an animated gif image flipped using GD library in PHP. I wrote a script to flip still
images, but it doesn't work on animated images. This is probably because I have the script
moving 1 column of pixels at a time, and switching them around. How would I make multiple frames?
Any help would be great! Thanks!....
[forum] Double Posting Happening By An Error
(3) Hello, I am currently working on EvilBoard 0.1.1, for those who know about this project versjon 0.1b
can be downloaded from http://www.evilservices.com Well over to the reason why i am posting this,
I am currently experincing a problem with my new posting code wich has been rewrited in version
0.1.1, You see, it is double posting by an error, i thouht i could fix that myself, but no, so i
just thought, Trap17 is perfect, they problety know how to fix this, Here is the code: CODE
<? /* * @Name: Post Topic * @Author: Arne-Christian Blystad * @Copyright&....
Error Importing Sql Query Via Php
Works in PHPmyAdmin (6) CODE function sql() { $fp =
fopen("sql.sql","r"); $sql =
fread($fp,filesize("sql.sql")); fclose($fp);
return $sql; } Thats $this->sql and here is the other source CODE
function insert_sql() { if($_GET['insert']) {
$template = new template; $db = new db;
$db->connect(); $query = $this->sql(); ....
Help Needed With Silly Error
(8) Hi i have made a stupid error on one of my pages and having trouble finding it. It says unexpected
')' on line 114 can anyone please help me find it? Here is the page: CODE <? /** *
* @package TibiaME Clan/Download Site * @version 1.00 2006/09/27 00:04:37 wappy * @copyright
(c)2004-2006 wappyCULT * @home http://hack.s-60.org * @license You can use/modify this
script but distributing it without permisinn, or removing the "Script By: wappy" link
will invalidate your license and give wappy (wappyCULT) FULL RIGHTS to ....
Php Resolution Detection?
Is it possible to do without using JS? (3) A quick question for all you coders. I'm looking for a way to autodetect a viewer's screen
resolution without using javascript (as some people have it disabled). Is there any way to do
this via a purely server side function, e.g. php? Thanks. ....
Uglymonkey Toplist Script
Getting an error with this script, please help. (7) I'm getting an error on the index page.Need help to fix it please. There's the error:
CODE Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
resource in /home/chatz/public_html/top/index.php on line 10 Failed: delete from
uglymonkey_toplist where lastin < '2006-07-28 18:23:19' and total='0'
Here's the index page that I'm getting the error on: CODE <?php
include("config.php"); if ($purgedays>0){ $purgeseconds =
$purged....
Freetype, Gd And An Error
I just can't get FreeType to work (1) Basically I have this code: CODE header("Content-type: image/png");
$bgimg = "bg.png"; $im = imagecreatefrompng($bgimg); $number =
rand(10,99); $textcolour = imagecolorallocate($im, 255, 255, 255);
$font = "arial.ttf"; imagettftext($im, 65, 0, 5, 95, $textcolour,
$font, $number); imagepng($im); imagedestroy($im);
Unfortunately all I get is the blank placeholder for an image (or the red X if you still use IE)
rathe....
Php Form Help!
Parse error T_LNUMBER - expecting T_VARIABLE (3) Hello, I am trying to make an employee application. I was just wondering if anyone knows how to spot
a php code error, when the code directly around the line with the error looks the same. below is
some of my process.php code. I beleive the error is on line 41. QUOTE PHP parse error: PHP
Parse error: parse error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in
/home/wwwange/public_html/FORMS/forms/process.php on line 41 Process.php code: CODE
<?php include("global.inc.php"); $errors=0; $error="The foll....
Looking For Php Script : Image Thumbnail Like Imageshack.
(2) Does anyone know a code like the one ImageShack uses, like this one. That would be just
awesome, I hate doing it by hand, such a hassal. Until I can find a code similar to that, I think I
will just use ImageShack.....
Watermark Your Image With Simple Php Script
found it on the net (34) This script was found on the net http://tips-scripts.com/?tip=watermark#tip B&T's Tips &
Scripts site. Just in case the site may not show, I will include the code here: List of things
needed: 1. your image in any format 2. watermark image--in gif format with transparent background 3.
script below with name (i.e. watermark.php) CODE <?php // this script creates a watermarked
image from an image file - can be a .jpg .gif or .png file // where watermark.gif is a mostly
transparent gif image with the watermark - goes in the same directory as this script // ....
Dynamic Image / Signature Generator
a simple code to change text on an image (12) In search of dynamically changing quote, saying or all other types of text on an image I came across
a code that I have modified to fit my initial usage. This procedure requires two files and short
knowledge of PHP. If you are familiar with Trap17's sig rotation code you will understand this
procedure very fast. Code 1: dynamic_sig.php (you can rename this to index.php and you'll see
at the end why) Code 2: a simple text file named anything (I will call it name.txt ) Code 1
CODE <?php header("Content-type: image/png"); ....
Image Galleres
(10) what is a really good image gallery i can hook up for my phpnuke site?? something easy to set up to.
thanks....
Php Error When Running Script
Php error when running script (3) Hello, I get the following error: Parse error: syntax error, unexpected T_STRING in
/usr/local/psa/home/vhosts/club-amigos.co.uk/httpdocs/contact.php on line 44 when l run the
following script: Any help would be appreciated. CODE <?php /* PHP Form Mailer -
phpFormMailer v2.1, last updated 30th Nov 2005 - check back often for updates! (easy to use
and more secure than many cgi form mailers) FREE from: www.TheDemoSite.co.uk Should work
fine on most Unix/Linux platforms */ // ------- three variables you MUST change below
-------------....
Suppressing Mysql Error In Php
How to suppress auto generated mysql err (4) I am testing my website on my local machine. It is still in development stage and I am using
php/mysql. If there is a mysql connection error, I am checking for the connection variable and
displaying a proper error message. But even before it displays my error message, it displays an
error message on browser thrown by mysql (MySQL Connection Failed: Access denied for user). Can I
suppress this message and display only my message?....
Php Photo And Image Gallery Script
PHP Photo And Image Gallery Script (2) This script is great and the documentation is excellent!! I have used it on my site without
really knowing much about PHP. Script ....
Php Code To Detect When Mysql Db Is Down?
a way to create a var if db is down (7) Recently, I recoded a part of my site so that it uses a MySQL database to store information instead
of on a text file. Because my site receives a lot of traffic and it's on a shared hosting
environment, the DB could potentially go down. Since I don't want to lose my visitors, I want to
know if there is a way to tell when the MySQL DB is down. I know that I could add a die function
along with the mysql_connect function: CODE mysql_connect("localhost",
"username", "passwordl") or die("Something here."); I wan....
Parse: Error Unexpected T_lnumber
php parse error when running script (4) Hi. I've just created a php script. The main object of the script is to delete some old files
and replace it with a new file with some new content, effectively moving the contents from one file
to another. These are the first 50 lines of the file: /* Calculate For The "A" Group - The
Latest Games ID */ $a_B = 002; while(file_exists("a_" . $a_B . ".dat")) {
$a_B++; } $new_page_contents = " " . $_POST . " " . $_POST . "
include \"/home/cmatcme/public_html/footer.php\"; ?> "; $a_stream = fopen(&....
Image Upload And File Size
(2) Hi, I'm trying to upload rather large jpgs files (2560x1920 and ~ 2 megs in size) to my server
via PHP. The problem I am having is that when I upload and attempt to resize by creating a new
image, the new image is always black. Code I'm using is: PHP Code: CODE if(
!empty($thefile_name) ) {
$query = "INSERT INTO coldwell_images
(imagename) VALUES ('insertimage')"; $result ....
Phpbb Install Error
help w/ phpbb plz.... (2) ok, i type in eveything that phpbbb asked to install, and i use the info i got in the mail and made
a db, but it doesn't work at all.......instaed it says "An error occurred trying to update the
database You have an error in your SQL syntax; check the manual that corresponds to your MySQL
server version for the right syntax to use near ''' at line 1" what does this mean and
how do i fix this and install the forum?? i have tried to install this many times now but it never
works /sad.gif' border='0' style='vertical-align:middle' alt='sad.gif' /> ......
Looking for detect, image, resolution, gd, stop, error, found
|
|
Searching Video's for detect, image, resolution, gd, stop, error, found
|
advertisement
|
|