During a plugin's installation there is an option to announce that the website is using the plugin.
If $anncounce=true; a call is made during installation to the plugin's server that includes the website's url. If possible I'd like to improve this code.
...
if($announce) file_get_contents('http://www.pluginserver.tld/announce/?url='.urlencode($url));
...
The installation just needs to "ping" the server, it doesn't recieve or use any information from it. Is file_get_contents the best method?
I also don't want to slow down the installation or cause any errors if the server is unresponsive. I just want the script to quickly attempt to report the installation and move on.
Should I use something less strict or stricter than "if($announce)"?
Thanks