Accessing Cpanel via PHP Script: Security?

Hello all,
I'm trying to setup a script so that I can allow clients access to Awstats WITHOUT giving them full cpanel access. I'm pulling the Awstats info into the script via cURL using the following code:
PHP Code:
$Curl curl_init();
curl_setopt($CurlCURLOPT_SSL_VERIFYPEER,0);
 
curl_setopt($CurlCURLOPT_SSL_VERIFYHOST,0);
 
curl_setopt($CurlCURLOPT_RETURNTRANSFER1);
 
curl_setopt($CurlCURLOPT_URL"https://$site:2083/awstats.pl?$query");
 
curl_setopt($CurlCURLOPT_USERPWD"$cpnlusername:$cpnlpassword");
if(isset(
$_POST))
{
curl_setopt($CurlCURLOPT_POSTTRUE);
curl_setopt($CurlCURLOPT_POSTFIELDS$POSTED);
}
curl_setopt($CurlCURLOPT_RETURNTRANSFER1);
$results curl_exec($Curl);
echo 
curl_error($Curl);
curl_close ($Curl); 
Anyone see any obvious, gaping security holes with pulling info from cPanel this way? Accessing Cpanel via PHP Script: Security?

 

 

 

 

Top