I know you're super busy, but...

edited October 2008 in General
When you have time, could you help me troubleshoot a PHP script? I found what I was looking for (what I talked to you about before, if you remember) but I can't seem to get it working properly. I don't know if there's something wrong with the files or if I'm doing something wrong.

Comments

  • edited November -1
    Crap! I forgot about that! Sorry. :o\

    Sure, can you email me the files: BradA1878@mindspring.com

    Also, the site you want to be able to read the files from, does it have directory listing? [meaning if you hit the dir in a browser w/o an index.html file doe it show you a list of files?]

    ----
  • edited November -1
    It's really not a problem. If you're too busy to look at them, I don't mind. It would just be helpful if you could take a quick look. :)

    Yes. It's not up there right now because I've misplaced my password, but that's an easily remedied problem.
  • edited November -1
    Btw - cool spam filter. Is it a feature of your ISP?
  • edited November -1
    Yes, it is a feature. Since I have bradanderson.org I get tons of spam, so I directed it all to my Earth link Account and turned on that spam filter. I love it - tho others hate it. lol

    I just got you email, I'll take a look now.

    ----
  • edited November -1
    Ok, I posted this script:

    http://www.bradanderson.org/temp/news/look.php

    The pass is: NewsFinderPW

    So, you need a script that does basically what this is doing but for a different img URL, right?

    This script lops through a bunch of images, it builds the image path by concatenating a number, that is stored int he data dir, to the end of a string. For example, this is one of the image file URLs:

    http://images.neopets.com/caption/caption_940.gif

    The "http://images.neopets.com/caption/caption_" part is hard coded and the "940" is stored in the "cap.txt" file in the "data" dir. It is not working correctly but if it was I think it would write the number "940" to that file and then the next time you ran the file it would increment that number [941,942,943,...], concatenate it to the URL, and see if there is a result - then append ".gif" to it. If there was a result it would store the new number in that "cap.txt" file.

    So, this script only works if the images you are trying to scrape are named with a trailing number that gets incremented. If they are not named like that, this script is worthless.

    Will that work for you?

    ----
  • edited November -1
    Yeah, that works. Does it return more than one file or just the most recent one? And does it only work for files that end in numbers? (941, etc) If I understand correctly, it's not able to just search a specified folder for files, it has to be hard-coded with part of the filename. Is this correct?

    Would it be difficult/time consuming to get it working properly?
  • edited November -1
    Yes, that is correct, it needs to have a portion hardcoded. The only way it can search a folder for any files is if it has directory listing available.
  • edited November -1
    Does it have to end in a number though? And is it able to return more than one file?
  • edited November -1
    For the script you have, the files do need to end in a number. Yes, it returns multiple files.

    If you give me a URL to one of the images in the folder you are interested in I may be able to get it to work.

    ----
  • edited November -1
    Most of the URLs I want to search are already in there, but here's one that's not. Do you want my whole list?

    http://images.neopets.com/games/clicktoplay/ctp_1046.gif
  • edited November -1
    Oh shoot! I just realized I misunderstood your first question about the site having a directory listing. The site I want to find files on doesn't have one.
  • edited November -1
    Hey Brad, have you made any progress?
Sign In or Register to comment.