...

View Full Version : how to parse a url and split into parts



gaya31988
08-28-2009, 04:48 AM
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

oracleguy
08-28-2009, 05:14 AM
At the most basic level, you can use strtok (http://www.cplusplus.com/reference/clibrary/cstring/strtok/).



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum