php's file() function tries to open a simple tcp connection to port 80 of a remote server, sends GET /path/ for the file to retreive, and waits for the results.
however this won't work with https. https requires that the client supports encryption to connect which the function file() doesn't support.
i haven't tried it, but assuming lynx supports https you could try something like:
system("lynx -dump https://www.site.com > /tmp/remote_page");
then grab the source from the /tmp/remote_page file.