root/freepbx/branches/experimental/vgps/test.php

Revision 3282, 2.6 kB (checked in by gregmac, 2 years ago)

Import "Voicepulse Global Provisioning System" code v0.1

  • Property svn:mime-type set to text/x-php
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Rev Date
Line 
1 <?
2 /*
3 ---------------------------------------------------------------------------
4 VoicePulse Global Provisioning System (VGPS)
5 by Ketan Patel
6 Copyright (C) 2006 VoicePulse Inc.
7
8 This program is free software, distributed under the terms of the GNU General
9 Public License Version 2. See the LICENSE file at the top of the source tree.
10 ---------------------------------------------------------------------------
11 */
12         $root_url = "http://localhost/vgps";
13         $x = array();
14
15         array_push($x, $root_url."/execute.php?op=set_setting&mac=000E08000000&key=line_01_username&value=vpusername");
16         array_push($x, $root_url."/execute.php?op=set_setting&mac=000E08000000&key=line_01_password&value=vppassword");
17         array_push($x, $root_url."/execute.php?op=set_setting&mac=000E08000000&key=line_01_proxy&value=sip.voicepulse.com");
18
19         array_push($x, $root_url."/execute.php?op=set_setting&mac=00085D000000&key=line_01_username&value=vpusername");
20         array_push($x, $root_url."/execute.php?op=set_setting&mac=00085D000000&key=line_01_password&value=vppassword");
21         array_push($x, $root_url."/execute.php?op=set_setting&mac=00085D000000&key=line_01_proxy&value=sip.voicepulse.com");
22
23         array_push($x, $root_url."/execute.php?op=set_setting&mac=000B82000000&key=line_01_username&value=vpusername");
24         array_push($x, $root_url."/execute.php?op=set_setting&mac=000B82000000&key=line_01_password&value=vppassword");
25         array_push($x, $root_url."/execute.php?op=set_setting&mac=000B82000000&key=line_01_proxy&value=sip.voicepulse.com");
26
27         array_push($x, $root_url."/execute.php?op=set_setting&mac=0004F2000000&key=line_01_username&value=vpusername");
28         array_push($x, $root_url."/execute.php?op=set_setting&mac=0004F2000000&key=line_01_password&value=vppassword");
29         array_push($x, $root_url."/execute.php?op=set_setting&mac=0004F2000000&key=line_01_proxy&value=sip.voicepulse.com");
30
31         array_push($x, $root_url."/execute.php?op=set_setting&mac=000413000000&key=line_01_username&value=vpusername");
32         array_push($x, $root_url."/execute.php?op=set_setting&mac=000413000000&key=line_01_password&value=vppassword");
33         array_push($x, $root_url."/execute.php?op=set_setting&mac=000413000000&key=line_01_proxy&value=sip.voicepulse.com");
34
35         foreach($x as $url) {
36                 get($url);
37         }
38
39         function get($url) {
40                 $ch = curl_init();
41                 curl_setopt($ch, CURLOPT_URL, $url);
42                 curl_setopt($ch, CURLOPT_HEADER, 0);
43                 curl_exec($ch);
44                 curl_close($ch);
45         }
46 ?>
Note: See TracBrowser for help on using the browser.
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads