1. Use Exec to execute your original statemant
You can use php exec to execute arbitrary commandline functions.
http://www.php.net/manual/de/function.exec.php
2. You can try to use the php curl function if it fits your need i would use that.
http://de1.php.net/manual/de/function.curl-init.php
As this post describes What is cURL in PHP? you need to install libcurl.
Example:
php> $ch = curl_init();
php> curl_setopt($ch, CURLOPT_URL, 'http://i.imgur.com/wtQ6yZR.gif');
php> curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
php> $contents = curl_exec($ch);
php> echo $contents;