Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
930 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...