Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 02-24-2004, 05:14 PM   #1
queer
Confirmed User
 
Join Date: Apr 2003
Location: In EXXXT's pocket! I love my idol Whee
Posts: 671
Php FREAKS

What to do if I enter an url in a form. I want to grab the content of this url, meaning I'd like to scan for .jpg files. The number of .jpg files in this url. File that is. An extern file on another server.
Any thoughts?

__________________
FREE GALLERY RETURN TRAFFIC
New better system for all TGP owners! Use your own sponsor codes!
Traffic in return for listing quality galleries, RATIO 1:12 !
queer is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2004, 05:17 PM   #2
fuzebox
making it rain
 
fuzebox's Avatar
 
Industry Role:
Join Date: Oct 2003
Location: seattle
Posts: 22,167
fopen() the url and parse it.
fuzebox is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2004, 05:21 PM   #3
queer
Confirmed User
 
Join Date: Apr 2003
Location: In EXXXT's pocket! I love my idol Whee
Posts: 671
Quote:
Originally posted by fuzebox
fopen() the url and parse it.
But doesnt that discard the images due to hotlink prevention?
__________________
FREE GALLERY RETURN TRAFFIC
New better system for all TGP owners! Use your own sponsor codes!
Traffic in return for listing quality galleries, RATIO 1:12 !
queer is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2004, 05:25 PM   #4
JDog
Confirmed User
 
Join Date: Feb 2003
Location: Canby, OR
Posts: 7,453
Quote:
Originally posted by queer

But doesnt that discard the images due to hotlink prevention?
fopen() will just read it as source, then you can do a regex to find the images!

jDoG
__________________
NSCash now powering ReelProfits.com
ALSO FEATURING: NSCash.com :: SoloDollars.com :: ReelProfits.com :: BiminiBucks.com :: VOD
PROGRAMS COMING SOON: Greedy Bucks :: Vengeance Cash
NOW OFFERING OVER 60 SITES
CONTACT :: JAMES SMITH :: CHIEF TECHNOLOGY OFFICER :: ICQ (711385133)
JDog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2004, 05:26 PM   #5
fuzebox
making it rain
 
fuzebox's Avatar
 
Industry Role:
Join Date: Oct 2003
Location: seattle
Posts: 22,167
Quote:
Originally posted by queer

But doesnt that discard the images due to hotlink prevention?
No, you're downloading a html file and reading the contents, not downloading individual jpegs...
fuzebox is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2004, 05:35 PM   #6
queer
Confirmed User
 
Join Date: Apr 2003
Location: In EXXXT's pocket! I love my idol Whee
Posts: 671
Ahhh.. makes much more sense now... Thanks all.
But "IF" I wanted to open the found images, like, let's say I wanted to GRAB those images and save them to my drive, THEN I'd have a hotlink prevention problem right.
__________________
FREE GALLERY RETURN TRAFFIC
New better system for all TGP owners! Use your own sponsor codes!
Traffic in return for listing quality galleries, RATIO 1:12 !
queer is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2004, 05:46 PM   #7
Myst
Confirmed User
 
Join Date: Feb 2004
Location: Alberta, Canada
Posts: 4,708
Quote:
Originally posted by queer
What to do if I enter an url in a form. I want to grab the content of this url, meaning I'd like to scan for .jpg files. The number of .jpg files in this url. File that is. An extern file on another server.
Any thoughts?

hit me up on ICQ 298523037
Myst is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2004, 05:46 PM   #8
Basic_man
Programming King Pin
 
Basic_man's Avatar
 
Industry Role:
Join Date: Oct 2003
Location: Montreal
Posts: 27,360
nop
__________________
UUGallery Builder - automated photo/video gallery plugin for Wordpress!
Stop looking! Checkout Naked Hosting, online since 1999 !
Basic_man is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2004, 05:47 PM   #9
modifried
Registered User
 
Join Date: Feb 2004
Location: BC, Canada
Posts: 38
Quote:
Originally posted by queer
Ahhh.. makes much more sense now... Thanks all.
But "IF" I wanted to open the found images, like, let's say I wanted to GRAB those images and save them to my drive, THEN I'd have a hotlink prevention problem right.
Not really. Send a HTTP_REFERER header with the URL being whatever the site is, and you should be able to grab the images without a problem.
modifried is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2004, 05:54 PM   #10
queer
Confirmed User
 
Join Date: Apr 2003
Location: In EXXXT's pocket! I love my idol Whee
Posts: 671
But but but I need to grab this image using php, then save it to my drive/server with php. Manipulated and changed with gdlibrary, which I know to perfection.. well.. nearly. lol
__________________
FREE GALLERY RETURN TRAFFIC
New better system for all TGP owners! Use your own sponsor codes!
Traffic in return for listing quality galleries, RATIO 1:12 !
queer is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2004, 05:56 PM   #11
modifried
Registered User
 
Join Date: Feb 2004
Location: BC, Canada
Posts: 38
Quote:
Originally posted by queer
But but but I need to grab this image using php, then save it to my drive/server with php. Manipulated and changed with gdlibrary, which I know to perfection.. well.. nearly. lol
You can use fopen() to open the image directly. If you're going to modify it, just open it and write it to a temp file, then open the temp file as a GD stream.
modifried is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2004, 05:56 PM   #12
fuzebox
making it rain
 
fuzebox's Avatar
 
Industry Role:
Join Date: Oct 2003
Location: seattle
Posts: 22,167
Quote:
Originally posted by queer
Ahhh.. makes much more sense now... Thanks all.
But "IF" I wanted to open the found images, like, let's say I wanted to GRAB those images and save them to my drive, THEN I'd have a hotlink prevention problem right.
99% of the hotlinking protection out there is easily defeated by sending your own referrer header.
fuzebox is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2004, 06:00 PM   #13
queer
Confirmed User
 
Join Date: Apr 2003
Location: In EXXXT's pocket! I love my idol Whee
Posts: 671
Quote:
Originally posted by fuzebox


99% of the hotlinking protection out there is easily defeated by sending your own referrer header.
This I dont understand.
__________________
FREE GALLERY RETURN TRAFFIC
New better system for all TGP owners! Use your own sponsor codes!
Traffic in return for listing quality galleries, RATIO 1:12 !
queer is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2004, 06:01 PM   #14
modifried
Registered User
 
Join Date: Feb 2004
Location: BC, Canada
Posts: 38
Quote:
Originally posted by queer

This I dont understand.
The sites prevent hotlinking by checking a HTTP header that is sent when the image is requested. All you have to do is mimic the same HTTP header and it thinks you're requesting the image from the same place .
modifried is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2004, 06:02 PM   #15
queer
Confirmed User
 
Join Date: Apr 2003
Location: In EXXXT's pocket! I love my idol Whee
Posts: 671
Quote:
Originally posted by modifried


You can use fopen() to open the image directly. If you're going to modify it, just open it and write it to a temp file, then open the temp file as a GD stream.
I thought a .htaccess hotlink protection would deny me this, but I'm gonna try this method now anyhow. Thx.
__________________
FREE GALLERY RETURN TRAFFIC
New better system for all TGP owners! Use your own sponsor codes!
Traffic in return for listing quality galleries, RATIO 1:12 !
queer is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2004, 06:03 PM   #16
StuartD
Sofa King Band
 
StuartD's Avatar
 
Join Date: Jul 2002
Location: Outside the box
Posts: 29,903
Quote:
Originally posted by queer

This I dont understand.
He means you can spoof the referrer.

So I could make it seem like my server is actually your server. So your hotlinking protection wouldn't know the difference.
StuartD is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2004, 06:04 PM   #17
modifried
Registered User
 
Join Date: Feb 2004
Location: BC, Canada
Posts: 38
Quote:
Originally posted by queer

I thought a .htaccess hotlink protection would deny me this, but I'm gonna try this method now anyhow. Thx.
If it does, just find out what page you're on when the image does work.

For example,

Let's say you're on:
www.mysite.com

And you click on an image (http://www.mysite.com/porn.jpg), and it works.

You then try to access the image directly, but it doesn't work. What you can do is use the header() PHP command to send the HTTP_REFERER variable to the browser, with the value "http://www.mysite.com", and the image will work.
modifried is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2004, 06:08 PM   #18
queer
Confirmed User
 
Join Date: Apr 2003
Location: In EXXXT's pocket! I love my idol Whee
Posts: 671
Quote:
Originally posted by modifried


If it does, just find out what page you're on when the image does work.

For example,

Let's say you're on:
www.mysite.com

And you click on an image (http://www.mysite.com/porn.jpg), and it works.

You then try to access the image directly, but it doesn't work. What you can do is use the header() PHP command to send the HTTP_REFERER variable to the browser, with the value "http://www.mysite.com", and the image will work.
ahaaa... makes the light now... I think get it. At least Im gonna try this!

__________________
FREE GALLERY RETURN TRAFFIC
New better system for all TGP owners! Use your own sponsor codes!
Traffic in return for listing quality galleries, RATIO 1:12 !
queer is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2004, 06:10 PM   #19
modifried
Registered User
 
Join Date: Feb 2004
Location: BC, Canada
Posts: 38
Quote:
Originally posted by queer

ahaaa... makes the light now... I think get it. At least Im gonna try this!

Okay, good stuff. Syntax would be:

header("Referer: http://www.mysite.com");
modifried is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2004, 06:16 PM   #20
queer
Confirmed User
 
Join Date: Apr 2003
Location: In EXXXT's pocket! I love my idol Whee
Posts: 671
Thank you all. For your help and thoughts...
Who would ever think GFY could turn into something usefull... LOL
__________________
FREE GALLERY RETURN TRAFFIC
New better system for all TGP owners! Use your own sponsor codes!
Traffic in return for listing quality galleries, RATIO 1:12 !
queer is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.