Simple Programing

Discussion in 'Programming' started by rheahold, Jul 23, 2013.

  1. #1
    Hello fellow DPers,

    I have two question and i hope someone to guide me on the right resources for this.

    Question number one:
    There is this web-resource from which i want to download all the images. However the access to the images directory is locked. e.g. www.example.com/images/ is locked. I know that the images format is www.example.com/images/1.jpg than www.example.com/images/2.jpg and so on. However i do not know up till what number does it go. Is there a program or a code that will help me download all the images given that i input the initial in structure?

    Question number two:
    Is there a program or code that will allow me to browse some text and delete everything that does not match an exact string. e.g. in a text there are 4 strings <mary>loves</mary> , the output should be only the 4 strings that contain the specified string.

    Thank you.
     
    rheahold, Jul 23, 2013 IP
  2. prince@life

    prince@life Notable Member

    Messages:
    278
    Likes Received:
    13
    Best Answers:
    3
    Trophy Points:
    225
    #2
    1) Yes there are many programs that lets you download images or files from any websites that are available for public.
    For locked contents, you might need access to that files, or if you are hacking expert!! then no one can stop you !

    2) Yes, You can do that.
    Either you can create batch (.bat) files or .php programs or .c programs to do this type of task.
    All you need to do is,
    - Create one loop in your program, which will execute until your event ends
    - now open your file using your programs loops which contains too many characters
    - next is to search for your defined characters e.g; <mary>loves</mary> or whatever you want.
    - copy all outputs to an array or copy that outputs to another temporary file.
    - After searching all texts, you need to create one more blank file using your program and copy data of temporary file to newly created file (it will contain your final data as output)
    - now delete temporary file using your program.
    - And you're done !!

    To create a program you can hire a programmer ! because its kinda difficult tasks. However, i suggest you not to believe on beginners for this job, because they may be in a trouble..

    Hope it work !

    Thanks.
     
    prince@life, Jul 23, 2013 IP
  3. rheahold

    rheahold Active Member

    Messages:
    236
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    55
    #3
    I appreciate you answer, however can you guide me towards the right sources?
     
    rheahold, Jul 23, 2013 IP
  4. scottlpool2003

    scottlpool2003 Well-Known Member

    Messages:
    1,708
    Likes Received:
    49
    Best Answers:
    9
    Trophy Points:
    150
    #4
    Some keywords you could use:
    • Image Scraper
    • Website Scraper
    • File_Get_Contents
    • File_Put_Contents
    • Curl FOpen
    They should get you what you're looking for when you click here and type them in.
     
    scottlpool2003, Jul 23, 2013 IP
  5. rheahold

    rheahold Active Member

    Messages:
    236
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    55
    #5
    For the number 2 question i found an easy solution using Firefox and download them all addon
     
    rheahold, Jul 23, 2013 IP