Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Help with pnGetBaseURL()
  • Posted: 31.01.2007, 18:35
     
    AllKnightAccess
    rank:
    Softmore Softmore
    registered:
     March 2004
    Status:
    offline
    last visit:
    23.06.08
    Posts:
    52
    Is there an existing PostNuke API function that parses the base URL? For example, where pnGetBaseURL() would return "http://www.example.com/", I may only want the segment "www.example.com" or "example.com" or "example" returned.

    If a function does not exist already for this, how about adding this feature to the pnGetBaseURL() function?
  • Posted: 31.01.2007, 22:31
     
    rank:
    Moderator Moderator
    registered:
     March 2002
    Status:
    offline
    last visit:
    26.08.08
    Posts:
    7720
    Use pnGetBaseURL in combination with parse_url. If you only want parts of the host name then you can explode this at the dot in the hostname.

    -Mark

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula