Question

i need to return the content of this page http://service.semanticproxy.com/processurl/ftfu27m3k66dvc3r43bzfneh/html/http://www.smallbiztechnology.com/archive/2013/12/why-creating-a-digital-storefront-is-crucial-for-your-small-business.html but when i call this function

function getResult() {
            var url="http://service.semanticproxy.com/processurl/ftfu27m3k66dvc3r43bzfneh/html/http://www.smallbiztechnology.com/archive/2013/12/why-creating-a-digital-storefront-is-crucial-for-your-small-business.html";
            $.ajax({
                cache: true,
                url: url,
                success: function (result) {
                    alert(result);
                }
            });
        }

I got this in firebug:

segment.min.js (ligne 1) GET http://service.semanticproxy.com/processurl/ftfu...orefront-is-crucial-for-your-small-business.html 200 OK 379msA.

Any idea how i can get the content of that page?

Était-ce utile?

La solution

This code won't work for you. the reason is that the html page you are trying to retrieve is not a valid JAVASCRIPT file (and you also can't use jsonp because it is not returning any json string.)

Your solution is to use a server script (such as php:

<?Php print file_get_contents(url); ?> 

).

OR - if the website is yours , add a response to the script on request.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top