Guest User

Untitled

a guest
Oct 8th, 2018
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. <html>
  2. <head>
  3. </head>
  4.  
  5. <body>
  6.  
  7. <form method="post">
  8. <select id="wipname2" name="wipname2" style='position: relative' onchange="change()">
  9. <option value="site1.com">site1.com</option>
  10. <option value="site2.com">site2.com</option>
  11. <option value="site3.com">site3.com </option>
  12. </select>
  13. </form>
  14.  
  15. <script>
  16. function change(){
  17. document.getElementById("wipname2").submit();
  18. }
  19. </script>
  20.  
  21. <?php
  22.  
  23. $curl = curl_init();
  24.  
  25. curl_setopt_array($curl, array(
  26. //CURLOPT_URL => 'https://example.com/MagicService/rest/ltmNode?wipNames='.$_GET["wipnames2"],
  27. CURLOPT_URL => "https://example.com/MagicService/rest/ltmNode?wipNames=".'$_GET["wipnames2"]',
  28. // CURLOPT_URL => "https://example.com/MagicService/rest/ltmNode?wipNames=content.gslb.fmr.com",
  29. // CURLOPT_URL => "https://example.com/MagicService/rest/ltmNode?wipNames=$value",
  30. CURLOPT_RETURNTRANSFER => true,
  31. CURLOPT_ENCODING => "",
  32. CURLOPT_MAXREDIRS => 10,
  33. CURLOPT_TIMEOUT => 30,
  34. CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  35. CURLOPT_CUSTOMREQUEST => "GET",
  36. CURLOPT_HTTPHEADER => array(
  37. "Accept: application/json",
  38. "Cache-Control: no-cache",
  39. "access-token: df11c69eabb9eab4abaf4bcc6b1e62a26025e830",
  40. "password: ",
  41. "username: "
  42. ),
  43. ));
  44.  
  45. $response = curl_exec($curl);
  46. $err = curl_error($curl);
  47.  
  48. curl_close($curl);
  49.  
  50. if ($err) {
  51. echo "cURL Error #:" . $err;
  52. } else {
  53. //fwrite($output,$response);
  54. //print_r (explode(" ",$response));
  55. echo $response;
  56.  
  57. }
  58.  
  59. ?>
  60.  
  61. </body>
  62. </html>
Add Comment
Please, Sign In to add comment