fetching inner text from a particular div
I am having trouble fetching content from a web-page,
actually i wanted to fetch all the inner text from div name 'displaybody'

but my code doesn't seems working, it is fetching all the content of the page
and after 4 page successfully fetched i get an error,

    Fatal error: Maximum execution time of 30 seconds exceeded in E:\Installations\xampp\htdocs\wp\simple_html_dom.php on line 127

Here is the code for the script,

I want my script to open all the sub-pages(/txt/any number) inside the url mentioned in the code and fetched the content from its particular div (displaybody)


    <?php
    
    	$request_url ='http://www.zedge.net/txts/4519/200-3-1/';
     
    	$ch = curl_init();
    	curl_setopt($ch, CURLOPT_URL, $request_url);	
    	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    	$result = curl_exec($ch);
     
    	$regex='/href=\"\/txt\/[0-9].*/';
    	preg_match_all($regex,$result,$parts);
    	
    	foreach($parts[0] as $link){
    		$url = 'http://zedge.net' . str_replace ("href=\"",'',$link);
            echo file_get_html($url)->plaintext; 
    		echo "<br /><br /	><br />";
    	}
    	
    	curl_close($ch);
    
    echo $html->find('displaybody', 0)->innertext;
    
    
    ?>
fetching inner text from a particular div
===

I am having trouble fetching content from a web-page,
actually i wanted to fetch all the inner text from div name 'displaybody'

but my code doesn't seems working, it is fetching all the content of the page
and after 4 page successfully fetched i get an error,

    Fatal error: Maximum execution time of 30 seconds exceeded in E:\Installations\xampp\htdocs\wp\simple_html_dom.php on line 127

Here is the code for the script,

I want my script to open all the sub-pages(/txt/any number) inside the url mentioned in the code and fetched the content from its particular div (displaybody)


    <?php
    
    	$request_url ='http://www.zedge.net/txts/4519/200-3-1/';
     
    	$ch = curl_init();
    	curl_setopt($ch, CURLOPT_URL, $request_url);	
    	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    	$result = curl_exec($ch);
     
    	$regex='/href=\"\/txt\/[0-9].*/';
    	preg_match_all($regex,$result,$parts);
    	
    	foreach($parts[0] as $link){
    		$url = 'http://zedge.net' . str_replace ("href=\"",'',$link);
            echo file_get_html($url)->plaintext; 
    		echo "<br /><br /	><br />";
    	}
    	
    	curl_close($ch);
    
    echo $html->find('displaybody', 0)->innertext;
    
    
    ?>