Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 26 Jan 2005, 14:08
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Real name: sabe
getimagesize() on a php file: fix or workaround?

ok i can use this perfectly for image files but if i wanna use itfortheavatar file lets say image.php then i seem to run into an errorofitgiving me 0's for height and width is their anyway to fix this?

* sabret00the using supermerge powers to supply extra info that may or may not help



Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

is the error it spits out.
__________________
UNDER CONSTRUCTION: Confessionary Hack

Make me a Hack of The Month author: GRPS: Groups Commune
make my hacks, they'll make you famous

unless it's a security concern, please do not pm/im me for support unless you're willing to pay.

Last edited by sabret00the; 26 Jan 2005 at 16:51. Reason: Automerged Doublepost
Reply With Quote
  #2  
Old 26 Jan 2005, 16:56
noppid noppid is offline
 
Join Date: Mar 2003
You don't show your actual code, but my guess is that you are not pointing getimagesize() at an actual file. You may have to try to use imagecreatefromstring() and then use imagesy() and imagesx() for your demensions.
__________________
Add a photo gallery garage to your auto forum and get noticed by your members. Find out how at the vBulletin Computer Help Forum.
An informed rider makes their first destination the motorcycle forum at rider info.
Reply With Quote
  #3  
Old 26 Jan 2005, 17:01
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Real name: sabe
heres the code

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

i'll check into imagecreatefromstring() now.
__________________
UNDER CONSTRUCTION: Confessionary Hack

Make me a Hack of The Month author: GRPS: Groups Commune
make my hacks, they'll make you famous

unless it's a security concern, please do not pm/im me for support unless you're willing to pay.

Last edited by sabret00the; 26 Jan 2005 at 17:08.
Reply With Quote
  #4  
Old 26 Jan 2005, 17:06
noppid noppid is offline
 
Join Date: Mar 2003
Don't forget, it was posted at vb.com that iif() is being phased out and using it for data like that is highly inefficent.

__________________
Add a photo gallery garage to your auto forum and get noticed by your members. Find out how at the vBulletin Computer Help Forum.
An informed rider makes their first destination the motorcycle forum at rider info.
Reply With Quote
  #5  
Old 26 Jan 2005, 17:08
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Real name: sabe
iif's are being phased out?

ok now just read it, could i just


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

basically just making the adding the line to convert it to my script or will i have to use the imagesy() imagesx() functions?

just got back, it can't create the image from string it appears


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

is the code in charge, i already miss the precious iff's
__________________
UNDER CONSTRUCTION: Confessionary Hack

Make me a Hack of The Month author: GRPS: Groups Commune
make my hacks, they'll make you famous

unless it's a security concern, please do not pm/im me for support unless you're willing to pay.

Last edited by sabret00the; 26 Jan 2005 at 17:23. Reason: Automerged Doublepost
Reply With Quote
  #6  
Old 26 Jan 2005, 17:23
noppid noppid is offline
 
Join Date: Mar 2003
getimagesize expects a file from the file system with a valid path and name.

imagecreatefromstring gives you a GD handle to use imagesy() imagesx().

This page has all the info ya need. http://us4.php.net/manual/en/ref.image.php
__________________
Add a photo gallery garage to your auto forum and get noticed by your members. Find out how at the vBulletin Computer Help Forum.
An informed rider makes their first destination the motorcycle forum at rider info.
Reply With Quote
  #7  
Old 26 Jan 2005, 17:25
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Real name: sabe
thanks, will that help me to make the data into a string too?
__________________
UNDER CONSTRUCTION: Confessionary Hack

Make me a Hack of The Month author: GRPS: Groups Commune
make my hacks, they'll make you famous

unless it's a security concern, please do not pm/im me for support unless you're willing to pay.
Reply With Quote
  #8  
Old 26 Jan 2005, 17:42
noppid noppid is offline
 
Join Date: Mar 2003
Originally Posted by sabret00the
thanks, will that help me to make the data into a string too?
I'm not sure what you mean, but if you mean a new pic from that string, look at imagejpg() imagepng() and imagegif().
__________________
Add a photo gallery garage to your auto forum and get noticed by your members. Find out how at the vBulletin Computer Help Forum.
An informed rider makes their first destination the motorcycle forum at rider info.
Reply With Quote
  #9  
Old 26 Jan 2005, 17:45
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Real name: sabe
yup that's what i meant cos it's saying

Warning: imagecreatefromstring(): Passed data is not in 'WBMP' format in \groups\groups.php on line 179

my initial plan was to use file_get_contents() and go from there but that never worked :-S
__________________
UNDER CONSTRUCTION: Confessionary Hack

Make me a Hack of The Month author: GRPS: Groups Commune
make my hacks, they'll make you famous

unless it's a security concern, please do not pm/im me for support unless you're willing to pay.

Last edited by sabret00the; 26 Jan 2005 at 17:55. Reason: Automerged Doublepost
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 15:32.

Layout Options | Width: Wide Color: