View Single Post
Old 2007-12-18, 11:15 PM   #1
guschi2k
Heh Heh Heh! Lisa! Vampires are make believe, just like elves and gremlins and eskimos!
 
guschi2k's Avatar
 
Join Date: Oct 2003
Location: right here
Posts: 75
Send a message via ICQ to guschi2k
PHP - How to get dimension of hotlink protected image? (TGP)

Hey all

I'm trying to retrieve the dimensions/resolution of the fullsize images of TGP galleries. getimagesize() is of course not working with hotlink protected images, so I guess the only way is establishing a connetion with fsockopen() and sending false referrer information.

I tried that already and retrieving http status, last modified date, filesize etc is no problem ... but how would I go about the resolution?

I tried sending a "GET /image.jpg" already, but then my browser prompts me to download the file and choses myscript.php as the filename.

My head hurts already :-/ Maybe there's a rather simple solution? Writing the output of the GET request to a temp file on my webspace and doing a getimagesize() was what I thought about ... but it seems a little overcomplicated?
Also ... retrieving all pictures of the ~700-800 tgp gallery submission every day would be quite a waste of bandwidth :-/ and even worse ... when I run my linkbot to check all submitted galleries, this would be ... HOLY MOSES ... too many gigs to count :o


Thanks for aaaaaaaaalllll help
__________________
Tonys XXX Links wants your quality free sites|king|
Pleeeaaase help & save my addiction SaveEnterprise

Last edited by guschi2k; 2007-12-18 at 11:24 PM..
guschi2k is offline   Reply With Quote