Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $url = 'http://www.kham.com.tw';
- $http = curl_init();
- $options = array(
- CURLOPT_URL => $url,
- CURLOPT_HEADER => false,
- CURLOPT_RETURNTRANSFER => true,
- );
- curl_setopt_array($http, $options);
- $result = curl_exec($http);
- $httpStatus = curl_getinfo($http, CURLINFO_HTTP_CODE);
- curl_close($http);
- if (intval($httpStatus) === 200) {
- $result = exec('ps aux | grep mplayer | grep -v grep');
- if ($result === '') {
- exec('mplayer ~/Downloads/rock.mp3');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement