Functie Ping IP in PHP

Acum ceva vreme aveam nevoie sa dau ping unui ip din PHP fara a avea un VPS sau Dedicat, asa ca am cautat un serviciu care ofera aceasta optiune si am codat o functie in acest sens. Aceasta verifica daca un ip este sau nu online. Sper sa va fie de folos! 🙂

function verifica($ip)

$findme   = ', 0 received';
$pos = strpos($da, $findme);
if ($pos !== false) {
     return 'Offline';
} else {
     return 'Online';
echo verifica('');

Silviu Stroe
I'm Silviu and I run Brainic, a mobile-focused software agency. I'm also a member of Nokia and Yahoo wall of fame. My interests are in low-code/no-code development and bleeding-edge technologies.

Leave a Reply

Your email address will not be published. Required fields are marked *