Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ovhportal_turnoff($params) {
- $IPBLOCK='167.114.78.0/27';
- $INDVIP='167.114.78.5';
- $info1 = $GLOBALS['conn']->post('/ip/'.$IPBLOCK.'/firewall/'.$INDVIP.'/');
- $content = (object) array('enabled' => "true");
- $info2 = $GLOBALS['conn']->put('/ip/'.$IPBLOCK.'/firewall/'.$INDVIP.'/', $content);
- $info3 = $GLOBALS['conn']->post('/ip/'.$IPBLOCK.'/firewall/'.$INDVIP.'/rule/');
- if (!empty($info1->error) || !empty($info2->error) || !empty($info3->error)) {
- $result = $info->error.$info2->error.$info3->error;
- } else if ($info1 == null || $info2 == null || $info3 == null) {
- $result = "Unknown Issue. Contact Morgan :)";
- } else {
- $result = "success";
- }
- return $result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement