echo "Atempting to ping $1"; echo "use 'Ctrl+c' several times to quit!"; while ! ping -c 1 -w 1 $1 &> /dev/null; do echo "No responce yet!"; done echo "Pinged $1 successfuly."; php script to call it.