Jump to content


scan site for jpg


9 replies to this topic

#1 high6

    Young Padawan

  • Members
  • Pip
  • 57 posts

Posted 26 March 2006 - 08:57 AM

anyone know how i could make a signature in php to scan a site for jpgs(the one the jpg is seen on) and save them into a folder?

#2 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 26 March 2006 - 04:05 PM

Are you talking about a random image script, or a script to rip images from another site?

Random image scripts can be found anywhere, especially in the tutorial database, but taking images from another site is a whole different story.

#3 high6

    Young Padawan

  • Members
  • Pip
  • 57 posts

Posted 26 March 2006 - 05:28 PM

View Postrc69, on Mar 26 2006, 04:05 PM, said:

Are you talking about a random image script, or a script to rip images from another site?

Random image scripts can be found anywhere, especially in the tutorial database, but taking images from another site is a whole different story.

random images i know is easy. im talking about the second one. i want to make something that can open the source of the website the php was looked at on(like if i posted it here when u look at it, it would do it to this website not my server) and look for .jpg then dl them to my server.

#4 Jaymz

    Retired P2L Staff

  • Members
  • PipPipPipPip
  • 4,104 posts

Posted 26 March 2006 - 05:59 PM

That is copyright infringement and is a crime :)

#5 high6

    Young Padawan

  • Members
  • Pip
  • 57 posts

Posted 26 March 2006 - 06:35 PM

View PostJaymz, on Mar 26 2006, 05:59 PM, said:

That is copyright infringement and is a crime :)

well can u then atleast show me how to scan a site for .jpg's :)

#6 ktd

    * Something Ain't Right *

  • Members
  • PipPipPip
  • 549 posts
  • Gender:Male

Posted 26 March 2006 - 09:54 PM

View Posthigh6, on Mar 26 2006, 11:35 PM, said:

View PostJaymz, on Mar 26 2006, 05:59 PM, said:

That is copyright infringement and is a crime :)

well can u then atleast show me how to scan a site for .jpg's :)

Well if it's illegal then why would we tell you?

P.S. I'm a cop :)

#7 high6

    Young Padawan

  • Members
  • Pip
  • 57 posts

Posted 27 March 2006 - 06:29 AM

View Postkevthedude, on Mar 26 2006, 09:54 PM, said:

View Posthigh6, on Mar 26 2006, 11:35 PM, said:

View PostJaymz, on Mar 26 2006, 05:59 PM, said:

That is copyright infringement and is a crime :)

well can u then atleast show me how to scan a site for .jpg's :D

Well if it's illegal then why would we tell you?

P.S. I'm a cop :)

all i want to know if how to open the source of a site and get the url of the site the .php is being viewed from.

#8 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 27 March 2006 - 12:17 PM

Well, i won't help with opening another site's source, but to get the url of your site you can use $_SERVER['HTTP_HOST'] and $_SERVER['REQUEST_URI'].

Now, if you mean a remote site, then i believe that's impossible. I have looked into it myself so i could add the url to an image, but i never found a solution.

#9 Av-

    I Feel Left Out

  • Members
  • PipPipPipPip
  • 1,971 posts
  • Gender:Male
  • Location:10 ft. below sea level

Posted 27 March 2006 - 02:53 PM

Actually you can open a remote page and get its content using File_get_contents.
From there you should be able to scan the source code for images, using regular expressions.

Although i see no reason why you would want to code a script that can do this, unless your looking for a quick way to rip sites. :)

#10 high6

    Young Padawan

  • Members
  • Pip
  • 57 posts

Posted 27 March 2006 - 02:58 PM

View PostAvalanche, on Mar 27 2006, 02:53 PM, said:

Actually you can open a remote page and get its content using File_get_contents.
From there you should be able to scan the source code for images, using regular expressions.

Although i see no reason why you would want to code a script that can do this, unless your looking for a quick way to rip sites. :)

well wat i want to do is make a sig with php that uses 4 images from the site its being viewed from.

i know its not impossible because someone i know did something like this.


also im having trouble with File_get_contents. its saying that i need to change a setting but i dont know wat or how, any help?

Edited by high6, 27 March 2006 - 04:23 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users