Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Oct 2011
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    How to download from a list of links - Need help

    Hello guys... I'm really new in C coding and I need help

    I'm working on a school project.I have to put downloadable urls into a txt file and then the program have to read the file and download them.Since we never talked about this in my school,I really can't know how to do this...
    I need just the part of the code wich is reading the file and downloading the stuff(if possible)

    Any help is precious for me!

    THANKS in advance!

  • #2
    Regular Coder bobleny's Avatar
    Join Date
    May 2007
    Posts
    256
    Thanks
    3
    Thanked 11 Times in 11 Posts
    You need to look into fopen, and cURL. You might be able to use fopen to download the urls, but I doubt it.
    Last edited by bobleny; 10-20-2011 at 06:44 PM.
    --www.firemelt.net--
    * No good deed goes unpunished.
    * Cheer up, the worst has yet to come...
    Get Firefox!

  • #3
    New to the CF scene
    Join Date
    Oct 2011
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by bobleny View Post
    You need to look into fopen, and cURL. You might be able to use fopen to download the urls, but I doubt it.
    Maybe I can create a pointer and make it pointing at the 1st url in the txt file,after that i can use "system("start POINTER");" and after every loop the pointer will ++ until the eof...

    hmm...I have to try it when I go home,this may work

  • #4
    Regular Coder bobleny's Avatar
    Join Date
    May 2007
    Posts
    256
    Thanks
    3
    Thanked 11 Times in 11 Posts
    Well, I suppose you could try that, or you could just use fread or fgets to read the file...

    Check out this site:
    http://www.cplusplus.com/reference/

    This applies more to what you are trying to do:
    http://www.cplusplus.com/reference/clibrary/cstdio/
    --www.firemelt.net--
    * No good deed goes unpunished.
    * Cheer up, the worst has yet to come...
    Get Firefox!

  • Users who have thanked bobleny for this post:

    CodeBeast (10-21-2011)

  • #5
    New to the CF scene
    Join Date
    Oct 2011
    Location
    chennai
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    thank you

    thank you so much for your nice explanation about how to do download the bunch of links !
    thank you once again

    human milk banking

  • #6
    New to the CF scene
    Join Date
    Oct 2011
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by bobleny View Post
    well, i suppose you could try that, or you could just use fread or fgets to read the file...

    Check out this site:
    http://www.cplusplus.com/reference/

    this applies more to what you are trying to do:
    http://www.cplusplus.com/reference/clibrary/cstdio/
    thank you!!!!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •