PHP gurus, help me out here

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • whee
    Confirmed User
    • Sep 2002
    • 1375

    #1

    PHP gurus, help me out here

    $theurl contains an url to a freehosted gallery.
    Now, for some reason which I cant figure, the below code only works for some hosted galleries and not for others.

    -----------------------
    $f = file_get_contents("$theurl", "r");
    $file = strtolower($f);
    $lines = split("\n", $file);
    $i=0;
    foreach($lines as $line)
    {
    if(preg_match("/href=[\"|']([^\"|']+.jpg)|([^\"|']+.jpeg)/", $line, $matches))
    {
    echo $matches[1] . "\n";
    $ff[$i]=$matches[1];
    $i++;
    }
    }

    The working gallery:
    http://www.adultaffiliateservices.co...dex.php?433868
    the not working gallery:
    http://galleries.18blowjobs.com/mpeg/36hotass/?1285

    What's wrong here, someone guide me in the right direction please!
    Last edited by whee; 03-25-2004, 02:15 PM.
    http://www.nightstation.com
  • AvanteGuard
    Confirmed User
    • Jan 2004
    • 451

    #2
    The working one has links to the larger pictures in it, the non-working one doesn't have any links to larger pictures in it...

    So if those sites are the $theurl, then that is your problem, because you're searching for the link (href) which doesn't exist.

    Is that what you're looking for or did I read your question wrong?
    Looking for Fast Professional Programming? http://www.imadigan.com
    ICQ: 314-942-262 | MSN/Email: [email protected]

    Comment

    • whee
      Confirmed User
      • Sep 2002
      • 1375

      #3
      Originally posted by AvanteGuard
      The working one has links to the larger pictures in it, the non-working one doesn't have any links to larger pictures in it...

      So if those sites are the $theurl, then that is your problem, because you're searching for the link (href) which doesn't exist.

      Is that what you're looking for or did I read your question wrong?
      Yes, I see now. Thank you. All I want is to grab the full pictures on the galleries. I think I use the wrong approach.
      Also it's a bad example with the non-working one. It's links to movies.
      Last edited by whee; 03-25-2004, 02:36 PM.
      http://www.nightstation.com

      Comment

      Working...