Omotayo Omotayo - 1 year ago 71
PHP Question

PHP Remove http and web domain from url

I want http and web domain removed in a url and render the rest

URL | Expected result | /images/featured/2017/06/1497262523-How_to_Avoid_Adultery_in_Your_Marriage.jpg | /music/63637-adele-hello

Answer Source

Here with parse_url() function.

parse_url('', PHP_URL_PATH);

Output: /music/63637-adele-hello

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download