php - Get page source of external URL and manipulate with javascript/jquery -
php - Get page source of external URL and manipulate with javascript/jquery -
i'd somehow page source of external url, , that, able contents of h1
element.
for example, logic:
var url = "http://example.com"; var src = // page src of url // instead of document, utilize variable src var headertext = document.getelementsbytagname("h1")[0].innerhtml; alert(headertext);
i know can stuff curl/php, have heard larger sites cause server strain. i'd prefer maintain efficient possible. not sure start.
this cannot done, by policy.
in web pages, javascript (and client-side scripts in general) aren't allowed access raw external resources different domain, in general.
the closest you're going using ajax (jquery helps) access resource, (in general) need requesting url under same domain.
javascript php jquery curl
Comments
Post a Comment