R: [PHP] fopen to check if file exists

From: Date: Sat, 08 Dec 2001 14:13:59 +0000
Subject: R: [PHP] fopen to check if file exists
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-77116@lists.php.net to get a copy of this message
what do you mean that it returns file= '139'? you are talking about the id? please can you explain me better? Valentin V. Petruchek <petruchek@zsu.zp.ua> wrote in message 002101c17fdf$2ed881a0$6e64010a@weblab.zsu.zp.ua... > I've tested given url.. > If there is no image php script return file = '139'. > Check if file content is different from 139. > > or try to get image size of file: > $size = GetImageSize > ("4Öð ÝxÎ > n9ê*¾¥=http://waptopic.supereva.it/loghiesuonerie.it/LogoGen.php?id=1100"); > > and check what happens if there is no image.... > > Zliy PEs, http://www.zliypes.com.ua > > > ----- Original Message ----- > From: "moe" <maurizio@mp3italia.com> > To: <php-general@lists.php.net> > Sent: Saturday, December 08, 2001 1:48 PM > Subject: [PHP] fopen to check if file exists > > > > I am using this function: > > > > function isAfile($url){ > > $fp = @fopen("$url","r"); > > if ($fp) > > { //print "The file exists!"; > > return 1; } > > else > > { //print "The file does not exist"; > > return 0; } > > } > > > > to check if a remote file exists... now the problem is that the URL's i am > > trying to check are in this way: > > > > http://waptopic.supereva.it/loghiesuonerie.it/LogoGen.php?id=1100 > > The problem is that LogoGen.php exists but depending on the ID the image > may > > exists or not. > > How can i actually check if the image exists? > > Thanks anyone! > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > >

« previous php.general (#77116) next »