I think the main concern would be with executing anything in that file.
As long as you are simply reading the file and ensuring it's contents a) exist, and b) are what you provided, as well as removing the file immediately after verifying its contents, it appears okay.
Except, for users being able to upload files to the top of some domains (for example, every uguu file share clone and private instance), particularly if you are providing a unique file name. This still only allows for users to masquerade as owning domains they don't, but I imagine that could be a problem.
If you were to have them upload a PHP file, and attempted to evaluate it, that would be a huge security hole (eval injection). If you verified the contents, then showed the user the contents without properly sanitizing them first, that could be a huge security hole (XSS). If you were to keep the file, that could be a huge security hole (backdooring). But as long as you're mindful of these problems, I see little problem with this approach.
You may also want to check allow_url_include
, as suggested in this answer, though this is less likely to be relevant given you only want to verify the contents. It's possible they could escape the URL and try to get you to load a php://
url, though - worth verifying the domain provided is valid and well-formed as well.
Alternatively: The primary way I see people do this typically is through DNS records. Utilizing dns_record_get you could have the user instead add a TXT line to their DNS records, and verify them in that way with this function to check the data. You want to avoid the same problems, but this is quite the barrier to faking you own a domain, while still being a simple task to complete.