Advertisement
Guest User

Untitled

a guest
Oct 21st, 2014
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. function ovhportal_turnoff($params) {
  2. $IPBLOCK='167.114.78.0/27';
  3. $INDVIP='167.114.78.5';
  4. $info1 = $GLOBALS['conn']->post('/ip/'.$IPBLOCK.'/firewall/'.$INDVIP.'/');
  5. $content = (object) array('enabled' => "true");
  6. $info2 = $GLOBALS['conn']->put('/ip/'.$IPBLOCK.'/firewall/'.$INDVIP.'/', $content);
  7. $info3 = $GLOBALS['conn']->post('/ip/'.$IPBLOCK.'/firewall/'.$INDVIP.'/rule/');
  8. if (!empty($info1->error) || !empty($info2->error) || !empty($info3->error)) {
  9. $result = $info->error.$info2->error.$info3->error;
  10. } else if ($info1 == null || $info2 == null || $info3 == null) {
  11. $result = "Unknown Issue. Contact Morgan :)";
  12. } else {
  13. $result = "success";
  14. }
  15. return $result;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement