<?php
$ipaddr = $_GET['ip'];
$update = shell_exec("sudo ip tunnel change ipip0 remote $ipaddr");
$file= fopen("ip.txt","w");
fputs($file, $ipaddr);
fclose($file);
$lastip = file_get_contents("ip.txt");
echo '<pre>IP Update: '.$lastip.'</pre>';