Glad to hear it, and you're welcome. But please change this line: Code: $url = ($url_position_start > $search_for_length) ? substr($request_uri, $url_position_start) : "no URL"; to: Code: $url = ($url_position_start > $search_for_length) ? substr($request_uri, $url_position_start) : false; ...as "no URL" was going to just be for testing.