Dosual photo get


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2. for ($i = 1; $i <= 100; $i++) //inicio del for
  3. {
  4. $var = file_get_contents("http://dosual.com/photo/?id=".$i); //obtiene cl do
  5. if (strrpos($var, '<a class="thumb img-frame" href="') > 0) { // busca si encuentro
  6. $photo = explode('<a class="thumb img-frame" href="', $var); //Separa
  7. $photo = explode('"', $photo[1]); //saca la foto
  8. if (strlen($photo[0]) > 32)// busca si la cadena de caracteres es mayor que 32
  9. {
  10. echo '<img src="'.$photo[0].'"/>'."<br>";
  11. }//cierra el if
  12. }
  13. } //Aqui finaliza el for
  14. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.