Here's something I use to pull stuff from my modem:
PHP Code:
//Different ways to get webpages/files. Bothn allow for GET and POST. I suggest you use CURL though if you want to use POST. Here's some basic examples of both:
function getPage($modemUsername, $modemPassword, $modemIP, $modemPage)
{
$thePageObj = curl_init();
curl_setopt($thePageObj, CURLOPT_URL, $modemIP . $modemPage);
curl_setopt($thePageObj, CURLOPT_USERPWD, $modemUsername . ":" . $modemPassword);
curl_setopt($thePageObj, CURLOPT_RETURNTRANSFER, TRUE);
$thePage = curl_exec($thePageObj);
return $thePage;
}
Take it, with a little modification, it will help you on your quest.