Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- </head>
- <body>
- <form method="post">
- <select id="wipname2" name="wipname2" style='position: relative' onchange="change()">
- <option value="site1.com">site1.com</option>
- <option value="site2.com">site2.com</option>
- <option value="site3.com">site3.com </option>
- </select>
- </form>
- <script>
- function change(){
- document.getElementById("wipname2").submit();
- }
- </script>
- <?php
- $curl = curl_init();
- curl_setopt_array($curl, array(
- //CURLOPT_URL => 'https://example.com/MagicService/rest/ltmNode?wipNames='.$_GET["wipnames2"],
- CURLOPT_URL => "https://example.com/MagicService/rest/ltmNode?wipNames=".'$_GET["wipnames2"]',
- // CURLOPT_URL => "https://example.com/MagicService/rest/ltmNode?wipNames=content.gslb.fmr.com",
- // CURLOPT_URL => "https://example.com/MagicService/rest/ltmNode?wipNames=$value",
- CURLOPT_RETURNTRANSFER => true,
- CURLOPT_ENCODING => "",
- CURLOPT_MAXREDIRS => 10,
- CURLOPT_TIMEOUT => 30,
- CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => "GET",
- CURLOPT_HTTPHEADER => array(
- "Accept: application/json",
- "Cache-Control: no-cache",
- "access-token: df11c69eabb9eab4abaf4bcc6b1e62a26025e830",
- "password: ",
- "username: "
- ),
- ));
- $response = curl_exec($curl);
- $err = curl_error($curl);
- curl_close($curl);
- if ($err) {
- echo "cURL Error #:" . $err;
- } else {
- //fwrite($output,$response);
- //print_r (explode(" ",$response));
- echo $response;
- }
- ?>
- </body>
- </html>
Add Comment
Please, Sign In to add comment