wordpress - Get only code and not complete web using PHP curl in WP? -
i have simple code:
$thebody = wp_remote_retrieve_body( wp_remote_get('http://www.wordpress.org') ); print_r( $thebody ); die();
it working, instead of echoing source code displays page in iframe.
i guess need tell script need show code , not generate page.
how that?
if want fetch source code of website can have @ php simple html dom parser easy use in case. example:
include('parsar.php'); // website $html = file_get_html('http://www.google.com/'); echo $html;
Comments
Post a Comment