I'm doing a sitemap producer in Object Pascal and need a good function or lib to emulate the parse_url function on PHP.
Does anyone know of any good ones?
I am not familiar with the parse_url function on PHP, but you might try the TIdURI class that is included with Indy (which in turn is included with most recent Delphi releases). I think they ported it to FreePascal as well.
TIdURI is a TObject descendant that encapsulates a Universal Resource Identifier, as described in the Internet Standards document: RFC 1630 - Universal Resource Identifiers in WWW TIdURI provides methods and properties for assembly and disassembly of URIs using the component parts that make up the URI, including: Protocol, Host, Port, Path, Document, and Bookmark.
TIdURI is a TObject descendant that encapsulates a Universal Resource Identifier, as described in the Internet Standards document:
RFC 1630 - Universal Resource Identifiers in WWW
TIdURI provides methods and properties for assembly and disassembly of URIs using the component parts that make up the URI, including: Protocol, Host, Port, Path, Document, and Bookmark.
If that does not work, please give a specific example of what you are trying to accomplish - what are you trying to parse out of a URL.
1.4m articles
1.4m replys
5 comments
57.0k users