"how to get iframe content from a remote page?" Code Answer


you won't be able to access the document of a remote page inside an iframe using javascript because of the same origin policy.

if you know the url of the page you can use php curl to retrieve it

        // initialise a curl object
        $ch = curl_init(); 

        // set url and other options
        curl_setopt($ch, curlopt_url, "http://page-with-some-iframe.com");
        curl_setopt($ch, curlopt_returntransfer, 1); 

        // get the page contents
        $output = curl_exec($ch); 

        // close curl resource to free up system resources 
By raixer on May 18 2022

Answers related to “how to get iframe content from a remote page?”

Only authorized users can answer the Search term. Please sign in first, or register a free account.