0

Using jQuery I want to fetch data from stopforumspam and append it to assigned ID. I'm using following code but nothing resulting.

   <script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
   <span id="spam0"></span>
    <script>
    $.get("http://api.stopforumspam.org/api?ip=182.67.231.87", function(data){ var xml = $.parseXML(data),
      $xml = $( xml ),
      $test = $xml.find('appears'); 
    $( "#spam0" ).append( $test.text() );

    });

    </script>
Disk01
  • 347
  • 3
  • 11
  • Check the console for errors, you may be being stopped by the Same Origin Policy – Rory McCrossan Jul 09 '15 at 11:14
  • It is showing `Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://api.stopforumspam.org/api?ip=223.179.115.98,%20168.235.196.74. (Reason: CORS header 'Access-Control-Allow-Origin' missing).` What's solution ? – Disk01 Jul 09 '15 at 11:16
  • 1
    Try Google'ing it @Disk01. This might help you: http://stackoverflow.com/questions/23607901/cross-origin-request-blocked-on – AndreasHassing Jul 09 '15 at 11:32

0 Answers0