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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Aug 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how to parse a url and split into parts

    hi
    I m trying to write a program to which vil accept a url as argument and then contact the dns and retrieve a file from it and store it in the local repository. but i m stuck in one part. could any one of yo help in this.
    i would like to know how to parse a url and split it into its parts in c.
    eg: http://www.google.com/myfolder/g.html into
    http://www.google.com
    /myfolder/
    g.html

    thanks
    gaya3
    Last edited by gaya31988; 08-28-2009 at 04:52 AM.

  • #2
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    At the most basic level, you can use strtok.
    OracleGuy


  •  

    Posting Permissions

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