Use exec() to ping client from server in php

Discussions of secure PHP coding. Security in software is important, so don't be afraid to ask. And when answering: be anal. Nitpick. No security vulnerability is too small.

Moderator: General Moderators

Post Reply
yan
Forum Newbie
Posts: 1
Joined: Tue Jul 06, 2010 1:48 am

Use exec() to ping client from server in php

Post by yan »

Hi, I would like to ask that running exec() in php will cause any issues? and is it a bad idea to use exec() in php to ping client from server to check either it offline or online? Thank You.
User avatar
kaisellgren
DevNet Resident
Posts: 1675
Joined: Sat Jan 07, 2006 5:52 am
Location: Lahti, Finland.

Re: Use exec() to ping client from server in php

Post by kaisellgren »

It becomes dangerous at the point you place something dynamic as one of the parameters.

However, I do not see a reason to not use fsockopen(). You are better off with it and it should fit in your situation perfectly.
Post Reply