Php FREAKS

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • queer
    Confirmed User
    • Apr 2003
    • 671

    #1

    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 !
  • fuzebox
    making it rain
    • Oct 2003
    • 22352

    #2
    fopen() the url and parse it.

    Comment

    • queer
      Confirmed User
      • Apr 2003
      • 671

      #3
      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 !

      Comment

      • JDog
        Confirmed User
        • Feb 2003
        • 7453

        #4
        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)

        Comment

        • fuzebox
          making it rain
          • Oct 2003
          • 22352

          #5
          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...

          Comment

          • queer
            Confirmed User
            • Apr 2003
            • 671

            #6
            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 !

            Comment

            • Myst
              Confirmed User
              • Feb 2004
              • 4708

              #7
              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
              ICQ: 298-523-037

              Comment

              • Basic_man
                Programming King Pin
                • Oct 2003
                • 27360

                #8
                nop
                UUGallery Builder - automated photo/video gallery plugin for Wordpress!
                Stop looking! Checkout Naked Hosting, online since 1999 !

                Comment

                • modifried
                  Registered User
                  • Feb 2004
                  • 38

                  #9
                  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.
                  Coder.

                  ICQ - 39959568
                  Email - [email protected]

                  Comment

                  • queer
                    Confirmed User
                    • Apr 2003
                    • 671

                    #10
                    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 !

                    Comment

                    • modifried
                      Registered User
                      • Feb 2004
                      • 38

                      #11
                      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.
                      Coder.

                      ICQ - 39959568
                      Email - [email protected]

                      Comment

                      • fuzebox
                        making it rain
                        • Oct 2003
                        • 22352

                        #12
                        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.

                        Comment

                        • queer
                          Confirmed User
                          • Apr 2003
                          • 671

                          #13
                          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 !

                          Comment

                          • modifried
                            Registered User
                            • Feb 2004
                            • 38

                            #14
                            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 .
                            Coder.

                            ICQ - 39959568
                            Email - [email protected]

                            Comment

                            • queer
                              Confirmed User
                              • Apr 2003
                              • 671

                              #15
                              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 !

                              Comment

                              • StuartD
                                Sofa King Band
                                • Jul 2002
                                • 29903

                                #16
                                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.
                                This is me on facebook
                                This is me on twitter

                                Comment

                                • modifried
                                  Registered User
                                  • Feb 2004
                                  • 38

                                  #17
                                  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.
                                  Coder.

                                  ICQ - 39959568
                                  Email - [email protected]

                                  Comment

                                  • queer
                                    Confirmed User
                                    • Apr 2003
                                    • 671

                                    #18
                                    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 !

                                    Comment

                                    • modifried
                                      Registered User
                                      • Feb 2004
                                      • 38

                                      #19
                                      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");
                                      Coder.

                                      ICQ - 39959568
                                      Email - [email protected]

                                      Comment

                                      • queer
                                        Confirmed User
                                        • Apr 2003
                                        • 671

                                        #20
                                        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 !

                                        Comment

                                        Working...