using curl with simplehtmldom
<p>Recently our hosting disabled allow_url_fopen, it seems simplehtmldom needs it turned on I saw a work arround with allow_url_fopen in this site simplehtmldom.sourceforge.net...aq.htm#hosting, "Use curl to get the page, then call "str_get_dom" to create DOM object". but still to no luck. can you tell me if I did it properly or am I missing something?</p>

<pre><code>&lt;?php 
$curl = curl_init();  
curl_setopt($curl, CURLOPT_URL, 'www.weather.bm/');   
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);   
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);   
$str = curl_exec($curl);   
curl_close($curl);   
$html= str_get_html($str);  
?&gt; 
&lt;?php  
$element = $html-&gt;find("div");  
$element[66]-&gt;class = "mwraping66"; 
foreach($html-&gt;find('.mwraping66 img') as $e) 

$doc = phpQuery::newDocumentHTML( $e );  $containers = pq('.mwraping66', $doc);    
foreach ( $containers as $container ) {     $div = pq('img', $container);       
$div-&gt;eq(1)-&gt;removeAttr('style')-&gt;addClass('thumbnail')-&gt;html( pq( 'img', $div-&gt;eq(1))-    &gt;removeAttr('height')-&gt;removeAttr('width')-&gt;removeAttr('alt') );  
}  print $doc;  
?&gt; 
&lt;?php  
$element = $html-&gt;find("div");   
$element[31]-&gt;class = "mwraping31";  
foreach($html-&gt;find('.mwraping31') as $e)  
echo $e-&gt;plaintext;   
?&gt;................................. 
</code></pre>

<p>compared to: </p>

<pre><code>&lt;?php 
include('simple_html_dom.php'); 
include ('phpQuery.php');    
// Create DOM from URL 
$html = file_get_html('www.weather.bm/'); 
?&gt; 
&lt;?php  
$element = $html-&gt;find("div");  
$element[66]-&gt;class = "mwraping66"; 
foreach($html-&gt;find('.mwraping66 img') as $e).....
</code></pre>

<p>Thanks you for your help</p>
