Location: PHPKode > projects > phpServerAdmin > phpserveradmin/pptpd/vpnipcheck.php
<?php

	if ( !file_exists("/var/lock/vpnipcheck/") ) 
		die("/var/lock/vpnipcheck/ not found");

#	exec('ifconfig | grep -A1 ^ppp | sed -e  "s/         inet addr:[0-9].* P-t-P://g" -e "s/Mask:255.255.255.255//g" -e "s/Link encap:Point-to-Point Protocol//g" | grep -v "^--"',$shell);
	exec('ifconfig | grep -A1 ^ppp | sed -e  "s/.*P-t-P://g" -e "s/Mask:255.255.255.255//g" -e "s/Link encap:Point-to-Point Protocol//g" | grep -v "^--"',$shell);
print_r($shell);
	for( $i=0; $i<count($shell); )
	{
		$ppp[$shell[$i]] = $shell[$i+1];
		$i++;
		$i++;
	}

	print_r($ppp);
?>
Return current item: phpServerAdmin