-1

I tried to hit the URL "https://nutraplanet.com" using php whereas I am not getting data from any request methods. Requesting you to please give me some solution to it.

Please, find one of my code as below:

<?php
$output= file_get_contents('https://nutraplanet.com/products/controlled-labs-orange-triad/');
echo $output;
?>

Even CURL doesn't helped me. Please, advise me on the same.

Thanks in advance.

Jaap
  • 81,064
  • 34
  • 182
  • 193

1 Answers1

0

First you have to enabled this extension https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?hl=en in your browser

and try this code

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<body>

<button id="getData">Get Attendees</button>
<div id="div1">
</div>

</body>

<script type="text/javascript">

$("#getData").click(function(){
    var name = $("#eventid").val();
    $.ajax({url: "https://nutraplanet.com/products/controlled-labs-orange-triad",
        method:"get",
         success: function(result){
        $("#div1").html(result);
    }});
});
</script>