Do not use URLs to include PHP code. Use the filename instead.
What is happening is PHP is making an HTTP request to fetch the URL you specified. Because the page contains only a function definition and doesn't produce any output on its own, there is nothing to include.
It's like when you view a PHP page in a web browser, you don't see any PHP function definitions. Likewise, include()ing a URL will not import any function definitions, because the URL doesn't output any. You need to use the local file name.