I have used DOMPDF in PHP to generate PDF file. The layout seems perfect. But only when there is a page change. The layout breaks a little shifting content on right div to left side.
I guess The dompdf reads content line by line and it gets an empty space in new page on left side thus shifting right part to left. Have help to fix this ?
Here is my DOMPDF CODE
$blockHTML = "";
$blockHTML .=
'<div style="color:rgb(23, 23, 78);font-family:proximanova;letter-spacing:1px;font-size:12px;">
<div style="padding-bottom:10px;border-bottom:'.$border.'"><!--header-->
<img src="'.$logoImg.'" width="65">
</div>
<div style="margin-top:10px;">
<div style="text-align:center;padding:10px;border-bottom:'.
$border.'font-weight:bold;font-size:1.4em;">
<span>"Favorite Italian Restaurants in Los Angeles"</span>
</div>
</div>
<div style="margin-top:5px;">
<div style="text-align:center;padding:10px;">
<span style="color:rgb(179,179,179);">Collection Created By: </span>
<span> Vivek Tankaria</span>
</div>
</div>
<div style="margin-top:5px;">
<div style="text-align:center;display:inline-block;width:200px;margin:0 auto;">
<img src="'.$poiMarker.'" width="12" />
<span style="padding:0px 10px;height:15px;line-height:15px;">
48 Locations Bookmarked
</span>
</div>
</div>';
for($i=0;$i<20;$i++){
$blockHTML .= '<div style="margin-top:10px;border-top:'.$border.'">
<div style="width:100%;padding:10px 2.5%;">
<div style="display:inline-block;width:25%;">
<div>
<img src="'.$data.'" style="width:100%;height:auto;" />
</div>
</div>
<div style="display:inline-block;width:46%;padding:0 2%;">
<div style="width:100%;">
<span style="padding:2px 0;border-bottom:'.
$border.';font-weight:bold;width:70%;display:inline-block;">
Venue Name Comes Here
</span>
<span>
<img style="padding:2px;" src="'.$star.'" width="12" />
<img style="padding:2px;" src="'.$star.'" width="12" />
<img style="padding:2px;" src="'.$star.'" width="12" />
<img style="padding:2px;" src="'.$star.'" width="12" />
<img style="padding:2px;" src="'.$star.'" width="12" />
</span>
</div>
<div style="width:100%;">
<span style="padding:5px 0;width:70%;display:inline-block;">
<i>"Venue Caption Comes Here"</i>
</span>
<span style="padding:5px 0;display:inline-block;text-align:right;font-size:1.2em;width:28%;">
$$$
</span>
</div>
<div style="width:100%;">
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry standard dummy text ever since the 1500s,
when an unknown printer took a galley of type and scrambled it to make a type
</div>
</div>
<div style="display:inline-block;width:25%;">
<div>
<img src="'.$data.'" style="width:100%;height:auto;" />
</div>
</div>
</div>
<div style="width:100%;padding:10px 2.5%;">
<div style="display:inline-block;width:22%;">
<span style="display:inline-block;width:10%;padding:0 2%;"><img src="'.$call.'" width="15" /></span>
<span style="display:inline-block;width:90%;">(123) 456-7890</span>
</div>
<div style="width:1%;height:20px;display:inline-block;border-right:'.$border.'"></div>
<div style="display:inline-block;width:18%;padding:0 4% 0 2%;">
<span style="display:inline-block;width:10%;padding:2px 6%;"><img src="'.$website.'" width="18" /></span>
<span style="display:inline-block;width:90%;">www.uvwxyz.com</span>
</div>
<div style="width:1%;height:20px;display:inline-block;border-right:'.$border.'"></div>
<div style="display:inline-block;width:18%;padding:0 2%;">
<span style="display:inline-block;width:10%;padding:2px 6%;"><img src="'.$email.'" width="18" /></span>
<span style="padding:0 2%;display:inline-block;">useremail #uvwxyz.com</span>
</div>
<div style="width:1%;height:20px;display:inline-block;border-right:'.$border.'"></div>
<div style="display:inline-block;width:22%;padding:0 2%;">
<span style="display:inline-block;width:10%;padding:0 2%;"><img src="'.$address.'" width="12" /></span>
<span style="display:inline-block;width:90%;">123, Street One, Road Rd, Location (w), City - 123456</span>
</div>
</div>
</div>';
}
$blockHTML .= '</div>';
$this->load->library('dompdf_gen');
// Convert to PDF
$this->dompdf->set_paper("A4");
$this->dompdf->load_html($blockHTML);
$this->dompdf->render();
$this->dompdf->stream("welcome.pdf",array("Attachment"=>0));
Attaching Image for reference
When moving to a new page dompdf essentially starts from scratch when determining the layout. Since that's a relatively small amount of content you might try styling it with page-break-inside: avoid; to prevent breaking those elements independently.
Related
There is this code on php. With the DOMDocument I search for all the img tags then I go through a cycle above them and make a change.
In html there are 5 tags img. And the cycle passes 3 times.
How to solve this problem?
$dom = new DOMDocument();
$dom->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
$imgs_t = $dom->getElementsByTagName('img');
$amp_img_src = '/images/front/what_is_dt_video.jpg';
$count_foreach = 0;
foreach( $imgs_t as $img_t ){
$count_foreach++;
$img_alt = '';
$tmp_img_src = $img_t->getAttribute('src');
$img_alt = $img_t->getAttribute('alt');
if($tmp_img_src != $amp_img_src){
$tmp_amp_img = $dom->createElement('amp-img');
$tmp_amp_img->setAttribute('width', 200);
$tmp_amp_img->setAttribute('height', 200);
$tmp_amp_img->setAttribute('src', $tmp_img_src);
$tmp_amp_img->setAttribute('alt', $img_alt);
$img_t->parentNode->replaceChild($tmp_amp_img, $img_t);
}
}
var_dump($count_foreach);
And this is exactly the html that enters the $html variable at the beginning of the php code.
<div class="what_is_dt drop_down_pg">
<div class="drop_down_video drop_down_cont">
<div class="col-sm-7 col-xs-12">
<div class="video_wrap">
<div id="ntx_dt_info_video_link" class="no-padding">
<img src="/images/front/what_is_dt_video.jpg" height="315px" width="481px" alt="Lorem ipsum">
</div>
<div class="what_fx_video_head">
<span>Lorem ipsum</span>
</div>
</div>
</div>
<div class="col-sm-5 col-xs-12 no-padding">
<span class="background_green">
<h2>Lorem ipsum</h2>
<p><em>Lorem ipsum</em></p>
<p><em>Lorem ipsum</em></p>
</span>
[T]CONFIRM_THEORY[/T]
</div>
[T]CONFIRM_THEORY_MOBILE[/T]
<hr />
</div>
<h2 style="margin-top: 40px;"><strong>Lorem ipsum</strong></h2>
<div style="padding-top: 30px;">
<div class="signature-left col-lg-6 col-md-6 col-sm-6 col-xs-12">
<img src="/uploads/docs/th%20Failure%20Swing.png" alt="Lorem ipsum" title="Lorem ipsum" width="200" height="200" />
<span style="font-size: small;"> <strong>Lorem ipsum.</strong></span>
<span style="font-size: small;">Lorem ipsum. </span>
</div>
<div class="signature-left col-lg-6 col-md-6 col-sm-6 col-xs-12">
<img src="/uploads/docs/th%20Nonfailure%20Swing.png" alt="Lorem ipsum" width="200" height="200"/>
<span style="font-size: small;"><strong>Lorem ipsum.</strong> </span>
<span style="font-size: small;">Lorem ipsum.</span>
</div>
</div>
<p style="clear: both; padding-top: 30px;" >Lorem ipsum.</p>
<div style="padding-top: 30px;">
<div class="signature-left col-lg-6 col-md-6 col-sm-6 col-xs-12">
<img src="/uploads/docs/th Failure Swing Bottom.png" alt="" />
<p><span style="font-size: small;"><strong>Failure Swing </strong>Lorem ipsum.</span></p>
</div>
<div class="signature-left col-lg-6 col-md-6 col-sm-6 col-xs-12">
<img src="/uploads/docs/th Nonfailure Swing Bottom.png" alt="Lorem ipsum" width="200" height="200" />
<p><span style="font-size: small;"><strong>Nonfailure Swing</strong>Lorem ipsum.</span></p>
</div>
</div>
<p style="clear: both;"><br /></p>
[T]OUR_LEARNING[/T]
</div>
guys I am doing some stuff which is related to rssfeed. I built a page for rss feed all the things are going well but when I try to test the feed or use the feed I can't, Here is my code. Actually I am building rss feed for my blogger so I want to be it like that, any ways just tell me where am I wrong
<?php
require_once('simple_html_dom.php');
$html = new simple_html_dom();
$xml=simplexml_load_file("ad.xml");
header('Content-Type: application/atom+xml');
$b="<?xml version='1.0' encoding='UTF-8'?>
<feed>";
echo $b;
foreach($xml->url as $s){
$s=$s->loc;
$html = file_get_html($s);
$element= $html->find('div[class=post-content clear-block]');
// Find all links
$vez=$html->find('div[class=post-date]');
$p = '|<a [^>]*href="http://onlinegamesocean.com[^"]*"[^>]*>.*</a>|iU';
$h = $html->find('h1[class=title]');
if(empty($vez)){
foreach($h as $ha){
echo "<entry><title type='text'>".htmlentities($ha->plaintext)."</title>";
}
foreach($element as $a) {
if ($a === end($element))
echo "<content type='html'>".htmlentities(preg_replace($p, '', $a))."</content></entry>";
}
}
}
echo "</feed>";
?>
Output:
<?xml version='1.0' encoding='UTF-8'?>
<feed><entry><title type='text'>Offworld Trading Company Free Download</title><content type='html'><div class="post-content clear-block"> <p style="text-align: center;"></p> <h5>ABOUT THE GAME</h5> <p>Mars has been colonized and has invited you to lend a hand to make sure the new colony has a shot at success. But you’re not the only one that’s been invited, other business rivals are here as well and they have no qualms about playing dirty to gain the choicest territories on the Martian surface and driving their competitors out of business.</p> <p>Title: Offworld Trading Company<br /> Genre: Indie, Simulation, Strategy<br /> Developer: Mohawk Games<br /> Publisher: Stardock Entertainment<br /> Release Date: 28 Apr, 2016</p> <p><img class="lazy lazy-hidden" src="data:image/gif;base64,R0lGODdhAQABAPAAAP///wAAACwAAAAAAQABAEACAkQBADs=" data-cke-saved-src="data:image/gif;base64,R0lGODdhAQABAPAAAP///wAAACwAAAAAAQABAEACAkQBADs=" data-lazy-type="image" data-lazy-src="http://i57.tinypic.com/5oi24i.jpg" /><strong>Offworld.Trading.Company.DLC-BAT </strong>{ <a href="http://www13.zippyshare.com/v/5n5nCVek/file.html" target="_blank" data-cke-saved-href="http://www13.zippyshare.com/v/5n5nCVek/file.html">Download </a>| <a href="https://www.sendspace.com/file/5jvzun" target="_blank" data-cke-saved-href="https://www.sendspace.com/file/5jvzun">Download </a>| <a href="https://openload.co/f/tiwRzi0Uf9c/b-oftrcodlc.rar" target="_blank" data-cke-saved-href="https://openload.co/f/tiwRzi0Uf9c/b-oftrcodlc.rar">Download </a>| <a href="http://hugefiles.net/4ku46juf0xty" target="_blank" data-cke-saved-href="http://hugefiles.net/4ku46juf0xty">Download </a>| <a href="https://1fichier.com/?duu3oi6j1g" target="_blank" data-cke-saved-href="https://1fichier.com/?duu3oi6j1g">Download </a>| <a href="https://userscloud.com/9aowye1vsf04" target="_blank" data-cke-saved-href="https://userscloud.com/9aowye1vsf04">Download </a>| <a href="http://up07.net/4yz42d55gvi4" target="_blank" data-cke-saved-href="http://up07.net/4yz42d55gvi4">Download </a>| <a href="http://jheberg.net/captcha/b-oftrcodlc/" target="_blank" data-cke-saved-href="http://jheberg.net/captcha/b-oftrcodlc/">Download </a>| <a href="http://www.multiup.org/download/329c0ab802c97f5a48a728ea27000235/b-oftrcodlc.rar" target="_blank" data-cke-saved-href="http://www.multiup.org/download/329c0ab802c97f5a48a728ea27000235/b-oftrcodlc.rar">Download </a>}</p> <p>DLC’s:<br /> • Offworld Trading Company – Real Mars Map Pack DLC<br /> • Offworld Trading Company – Almanac DLC</p> <p>Note:<br /> • Game prompts an early access notice on first run, but it is out of EA state as also evident on the version number v1.0.12745<br /> • Also the DLC’s only became available after EA state changed</p> <p>Offworld Trading Company Free Download<br /> Size: 656 MB<br /> ——————————-</p> <p><strong>ONE FTP LINK</strong></p> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"></div> </div> <p><strong>DIRECT LINK</strong></p> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"><a href="http://kumpulbagi.id/anas45/anas45-363423/hi-oftrco,2697520.iso" target="_blank" data-cke-saved-href="http://kumpulbagi.id/anas45/anas45-363423/hi-oftrco,2697520.iso">Offworld.Trading.Company-HI2U.iso</a></div> </div> <p><strong>OPENLOAD</strong></p> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"><a href="https://openload.co/f/1b-KUEcxT8g/hi-oftrco.iso" target="_blank" data-cke-saved-href="https://openload.co/f/1b-KUEcxT8g/hi-oftrco.iso">Offworld.Trading.Company-HI2U.iso</a></div> </div> <p><strong>UP07</strong></p> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"><a href="http://up07.net/uyr0e7zq4mxt" target="_blank" data-cke-saved-href="http://up07.net/uyr0e7zq4mxt">Offworld.Trading.Company-HI2U.iso</a></div> </div> <p><strong>1FICHIER</strong></p> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"><a href="https://1fichier.com/?c8p9sz5gci" target="_blank" data-cke-saved-href="https://1fichier.com/?c8p9sz5gci">Offworld.Trading.Company-HI2U.iso</a></div> </div> <p><strong>UPTOBOX</strong></p> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"><a href="http://uptobox.com/5ovs6xtrdamz" target="_blank" data-cke-saved-href="http://uptobox.com/5ovs6xtrdamz">Offworld.Trading.Company-HI2U.iso</a></div> </div> <p><strong>HUGEFILES</strong></p> <!-- Quick Adsense WordPress Plugin: http://quicksense.net/ --> <div style="float:none;margin:10px 0 10px 0;text-align:center;"> <center><script language='Javascript'> <!-- document.write(unescape('%3C%64%69%76%20%73%74%79%6C%65%3D%22%68%65%69%67%68%74%3A%32%38%32%70%78%3B%77%69%64%74%68%3A%33%33%36%70%78%3B%6F%76%65%72%66%6C%6F%77%3A%68%69%64%64%65%6E%3B%62%61%63%6B%67%72%6F%75%6E%64%3A%23%63%63%63%3B%22%20%69%64%3D%22%61%64%64%69%76%22%3E%0A%3C%69%66%72%61%6D%65%20%73%74%79%6C%65%3D%22%68%65%69%67%68%74%3A%37%35%30%70%78%3B%77%69%64%74%68%3A%33%33%36%70%78%22%20%73%72%63%3D%22%68%74%74%70%3A%2F%2F%6F%63%63%65%61%6E%67%61%6D%65%73%72%65%76%69%65%77%73%2E%62%6C%6F%67%73%70%6F%74%2E%63%6F%6D%2F%70%2F%32%35%30%2E%68%74%6D%6C%3F%69%64%3D%78%32%6B%67%30%33%6A%22%20%73%63%72%6F%6C%6C%69%6E%67%3D%22%6E%6F%22%20%69%64%3D%22%61%64%66%72%61%6D%65%22%3E%3C%2F%69%66%72%61%6D%65%3E%3C%2F%64%69%76%3E%0A%3C%21%2D%2D%61%64%64%20%6A%71%75%65%72%79%20%69%66%20%6E%6F%74%20%61%64%64%65%64%2D%2D%3E%0A%3C%73%63%72%69%70%74%20%73%72%63%3D%22%68%74%74%70%73%3A%2F%2F%61%6A%61%78%2E%67%6F%6F%67%6C%65%61%70%69%73%2E%63%6F%6D%2F%61%6A%61%78%2F%6C%69%62%73%2F%6A%71%75%65%72%79%2F%31%2E%31%31%2E%33%2F%6A%71%75%65%72%79%2E%6D%69%6E%2E%6A%73%22%3E%3C%2F%73%63%72%69%70%74%3E%0A%3C%21%2D%2D%61%64%64%20%6A%71%75%65%72%79%20%69%66%20%6E%6F%74%20%61%64%64%65%64%2F%2D%2D%3E%0A%3C%73%63%72%69%70%74%3E%6A%51%75%65%72%79%28%77%69%6E%64%6F%77%29%2E%6C%6F%61%64%28%20%66%75%6E%63%74%69%6F%6E%28%29%20%7B%0A%6A%51%75%65%72%79%28%22%23%61%64%66%72%61%6D%65%22%29%2E%6C%6F%61%64%28%20%66%75%6E%63%74%69%6F%6E%28%29%20%7B%6A%51%75%65%72%79%28%27%23%61%64%66%72%61%6D%65%27%29%2E%63%73%73%28%27%68%65%69%67%68%74%27%2C%27%39%30%27%29%0A%73%65%74%54%69%6D%65%6F%75%74%28%20%66%75%6E%63%74%69%6F%6E%28%29%7B%20%6A%51%75%65%72%79%28%27%23%61%64%64%69%76%27%29%2E%63%73%73%28%27%62%61%63%6B%67%72%6F%75%6E%64%27%2C%27%74%72%61%6E%73%70%61%72%65%6E%74%27%29%7D%2C%20%31%30%30%30%20%29%3B%7D%29%3B%0A%24%28%27%23%61%64%66%72%61%6D%65%27%29%2E%6C%6F%61%64%28%20%66%75%6E%63%74%69%6F%6E%28%29%20%7B%24%28%27%23%61%64%66%72%61%6D%65%27%29%2E%63%6F%6E%74%65%6E%74%73%28%29%2E%66%69%6E%64%28%22%62%6F%64%79%22%29%2E%61%64%64%43%6C%61%73%73%28%27%69%66%72%61%6D%65%64%27%29%3B%7D%29%3B%0A%7D%29%3B%3C%2F%73%63%72%69%70%74%3E')); //--> </script></center> </div> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"><a href="http://hugefiles.net/q0iqt3v4cy21" target="_blank" data-cke-saved-href="http://hugefiles.net/q0iqt3v4cy21">Offworld.Trading.Company-HI2U.iso</a></div> </div> <p><strong>MEDIAFREE</strong></p> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"><a href="http://mediafree.co/l2y54l6fqew1/hi-oftrco.iso.html" target="_blank" data-cke-saved-href="http://mediafree.co/l2y54l6fqew1/hi-oftrco.iso.html">Offworld.Trading.Company-HI2U.iso</a></div> </div> <p><strong>USERSCLOUD</strong></p> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"><a href="https://userscloud.com/krigot141ekc" target="_blank" data-cke-saved-href="https://userscloud.com/krigot141ekc">Offworld.Trading.Company-HI2U.iso</a></div> </div> <p><strong>JHEBERG</strong></p> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"><a href="http://jheberg.net/captcha/hi-oftrco/" target="_blank" data-cke-saved-href="http://jheberg.net/captcha/hi-oftrco/">Offworld.Trading.Company-HI2U.iso</a></div> </div> <p><strong>GO4UP</strong></p> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"><a href="http://go4up.com/dl/9bffa4cfb5f8/hi-oftrco.iso" target="_blank" data-cke-saved-href="http://go4up.com/dl/9bffa4cfb5f8/hi-oftrco.iso">Offworld.Trading.Company-HI2U.iso</a></div> </div> <p><strong>MULTI LINKS</strong></p> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"><a href="http://www.multiup.org/download/8a76e30e7547e475ff0709052b81235a/hi-oftrco.iso" target="_blank" data-cke-saved-href="http://www.multiup.org/download/8a76e30e7547e475ff0709052b81235a/hi-oftrco.iso">Offworld.Trading.Company-HI2U.iso</a></div> </div> <p><strong>TORRENT</strong></p> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"></div> </div> <div> <blockquote><p>Enjoy</p></blockquote> </div> <div id="tabs-21031-0-1"> <div class="game_area_sys_req_leftCol"> <div class="game_area_sys_req_leftCol"> <div class="game_area_sys_req_leftCol"> <div class="game_area_sys_req_leftCol"> <div class="game_area_sys_req_leftCol"> <div class="game_area_sys_req_leftCol"> <div class="game_area_sys_req_leftCol"> <div class="game_area_sys_req_leftCol"> <div class="game_area_sys_req_leftCol"> <div class="game_area_sys_req_leftCol"> <div class="game_area_sys_req_leftCol"> <div class="game_area_sys_req_leftCol"> <div class="game_area_sys_req_leftCol"> <div class="game_area_sys_req_leftCol"> <div class="game_area_sys_req_leftCol"> <div class="game_area_sys_req_leftCol"> <div class="game_area_sys_req_leftCol"> <div class="game_area_sys_req_leftCol"> <div class="game_area_sys_req_leftCol"> <div class="game_area_sys_req_leftCol"> <div class="game_area_sys_req_leftCol"> <div class="game_area_sys_req_leftCol"> <div class="game_area_sys_req_leftCol"> <div class="game_area_sys_req_leftCol"><strong>MINIMUM:</strong></p> <ul> <li> <ul class="bb_ul"> <li><strong>OS:</strong> Windows 10 / 8.1 / 7 64-bit</li> <li><strong>Processor:</strong> 1.8 GHz Intel Core 2 Duo / 2.0 GHz AMD Athlon X2 64</li> <li><strong>Memory:</strong> 2 GB RAM</li> <li><strong>Graphics:</strong> Nvidia GeForce 8800 GT / ATI Radeon HD 3870 / Intel HD Graphics 4600</li> <li><strong>DirectX:</strong> Version 11</li> <li><strong>Network:</strong> Broadband Internet connection</li> <li><strong>Storage:</strong> 2 GB available space</li> <li><strong>Sound Card:</strong></li> </ul> </li> </ul> </div> <div class="game_area_sys_req_rightCol"><strong>RECOMMENDED:</strong></p> <ul> <li> <ul class="bb_ul"> <li><strong>Processor:</strong> 3 GHz Intel Quad-Core Processor / 3.2 GHz AMD Six-Core Processor</li> <li><strong>Memory:</strong> 4 GB RAM</li> <li><strong>Graphics:</strong> Nvidia GeForce GTX 460 / AMD Radeon HD 7850</li> <li><strong>DirectX:</strong> Version 11</li> <li><strong>Network:</strong> Broadband Internet connection</li> <li><strong>Storage:</strong> 2 GB available space</li> <li><strong>Sound Card:</strong></li> </ul> </li> </ul> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> <div id="tabs-21031-0-3"><center><br /> <iframe src="https://www.youtube.com/embed/wHWb_IsM1HU" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe></center></div> <div id="tabs-21031-0-4"> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"><strong>Offworld Trading Company Free Download</strong><br /> – Extract<br /> – Burn or mount the .iso<br /> – Run setup.exe and install<br /> – Copy Crack<br /> – Play</div> </div> </div> <div style="font-size:0px;height:0px;line-height:0px;margin:0;padding:0;clear:both"></div> <div class="wp_rp_wrap wp_rp_vertical_m" id="wp_rp_first"><div class="wp_rp_content"><h3 class="related_post_title">You May Also Like:</h3><ul class="related_post wp_rp"><li data-position="0" data-poid="in-22373" data-post-type="none" ></li><li data-position="1" data-poid="in-22225" data-post-type="none" ></li><li data-position="2" data-poid="in-23294" data-post-type="none" ></li><li data-position="3" data-poid="in-21988" data-post-type="none" ></li><li data-position="4" data-poid="in-22659" data-post-type="none" ></li><li data-position="5" data-poid="in-22357" data-post-type="none" ></li></ul></div></div> </div></content></entry><entry><title type='text'>Left Alone Free Download</title><content type='html'><div class="post-content clear-block"> <p style="text-align: center;"></p> <h5>ABOUT THE GAME</h5> <p>Left alone is a psychological horror game set in multiple believable interior and exterior environments. The game has a unique, high octane atmosphere which means you’ll feel like you’re truly beginning an adventure you’ll never quite forget.</p> <p>Title: Left Alone<br /> Genre: Action, Adventure, Indie<br /> Developer: Volumetric Games<br /> Publisher: Volumetric Games<br /> Release Date: 28 Apr, 2016</p> <p>Left Alone Free Download<br /> Size: 680 MB<br /> ——————————-</p> <p><strong>ONE FTP LINK</strong></p> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"></div> </div> <p><strong>DIRECT LINK</strong></p> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"><a href="http://kumpulbagi.id/anas45/anas45-363423/plaza-left-alone,2696467.iso" target="_blank" data-cke-saved-href="http://kumpulbagi.id/anas45/anas45-363423/plaza-left-alone,2696467.iso">Left.Alone-PLAZA.iso</a></div> </div> <p><strong>OPENLOAD</strong></p> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"><a href="https://openload.co/f/ZYE1o2I-3Vc/plaza-left.alone.iso" target="_blank" data-cke-saved-href="https://openload.co/f/ZYE1o2I-3Vc/plaza-left.alone.iso">Left.Alone-PLAZA.iso</a></div> </div> <p><strong>UP07</strong></p> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"><a href="http://up07.net/5xicihuwfppk" target="_blank" data-cke-saved-href="http://up07.net/5xicihuwfppk">Left.Alone-PLAZA.iso</a></div> </div> <p><strong>1FICHIER</strong></p> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"><a href="https://1fichier.com/?9sy0zkmtaf" target="_blank" data-cke-saved-href="https://1fichier.com/?9sy0zkmtaf">Left.Alone-PLAZA.iso</a></div> </div> <p><strong>UPTOBOX</strong></p> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"><a href="http://uptobox.com/cn3svruftm6y" target="_blank" data-cke-saved-href="http://uptobox.com/cn3svruftm6y">Left.Alone-PLAZA.iso</a></div> </div> <p><strong>DOWNACE</strong></p> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"><a href="https://downace.com/1jjM" target="_blank" data-cke-saved-href="https://downace.com/1jjM">Left.Alone-PLAZA.iso</a></div> </div> <p><strong>HUGEFILES</strong></p> <!-- Quick Adsense WordPress Plugin: http://quicksense.net/ --> <div style="float:none;margin:10px 0 10px 0;text-align:center;"> <center><script language='Javascript'> <!-- document.write(unescape('%3C%64%69%76%20%73%74%79%6C%65%3D%22%68%65%69%67%68%74%3A%32%38%32%70%78%3B%77%69%64%74%68%3A%33%33%36%70%78%3B%6F%76%65%72%66%6C%6F%77%3A%68%69%64%64%65%6E%3B%62%61%63%6B%67%72%6F%75%6E%64%3A%23%63%63%63%3B%22%20%69%64%3D%22%61%64%64%69%76%22%3E%0A%3C%69%66%72%61%6D%65%20%73%74%79%6C%65%3D%22%68%65%69%67%68%74%3A%37%35%30%70%78%3B%77%69%64%74%68%3A%33%33%36%70%78%22%20%73%72%63%3D%22%68%74%74%70%3A%2F%2F%6F%63%63%65%61%6E%67%61%6D%65%73%72%65%76%69%65%77%73%2E%62%6C%6F%67%73%70%6F%74%2E%63%6F%6D%2F%70%2F%32%35%30%2E%68%74%6D%6C%3F%69%64%3D%78%32%6B%67%30%33%6A%22%20%73%63%72%6F%6C%6C%69%6E%67%3D%22%6E%6F%22%20%69%64%3D%22%61%64%66%72%61%6D%65%22%3E%3C%2F%69%66%72%61%6D%65%3E%3C%2F%64%69%76%3E%0A%3C%21%2D%2D%61%64%64%20%6A%71%75%65%72%79%20%69%66%20%6E%6F%74%20%61%64%64%65%64%2D%2D%3E%0A%3C%73%63%72%69%70%74%20%73%72%63%3D%22%68%74%74%70%73%3A%2F%2F%61%6A%61%78%2E%67%6F%6F%67%6C%65%61%70%69%73%2E%63%6F%6D%2F%61%6A%61%78%2F%6C%69%62%73%2F%6A%71%75%65%72%79%2F%31%2E%31%31%2E%33%2F%6A%71%75%65%72%79%2E%6D%69%6E%2E%6A%73%22%3E%3C%2F%73%63%72%69%70%74%3E%0A%3C%21%2D%2D%61%64%64%20%6A%71%75%65%72%79%20%69%66%20%6E%6F%74%20%61%64%64%65%64%2F%2D%2D%3E%0A%3C%73%63%72%69%70%74%3E%6A%51%75%65%72%79%28%77%69%6E%64%6F%77%29%2E%6C%6F%61%64%28%20%66%75%6E%63%74%69%6F%6E%28%29%20%7B%0A%6A%51%75%65%72%79%28%22%23%61%64%66%72%61%6D%65%22%29%2E%6C%6F%61%64%28%20%66%75%6E%63%74%69%6F%6E%28%29%20%7B%6A%51%75%65%72%79%28%27%23%61%64%66%72%61%6D%65%27%29%2E%63%73%73%28%27%68%65%69%67%68%74%27%2C%27%39%30%27%29%0A%73%65%74%54%69%6D%65%6F%75%74%28%20%66%75%6E%63%74%69%6F%6E%28%29%7B%20%6A%51%75%65%72%79%28%27%23%61%64%64%69%76%27%29%2E%63%73%73%28%27%62%61%63%6B%67%72%6F%75%6E%64%27%2C%27%74%72%61%6E%73%70%61%72%65%6E%74%27%29%7D%2C%20%31%30%30%30%20%29%3B%7D%29%3B%0A%24%28%27%23%61%64%66%72%61%6D%65%27%29%2E%6C%6F%61%64%28%20%66%75%6E%63%74%69%6F%6E%28%29%20%7B%24%28%27%23%61%64%66%72%61%6D%65%27%29%2E%63%6F%6E%74%65%6E%74%73%28%29%2E%66%69%6E%64%28%22%62%6F%64%79%22%29%2E%61%64%64%43%6C%61%73%73%28%27%69%66%72%61%6D%65%64%27%29%3B%7D%29%3B%0A%7D%29%3B%3C%2F%73%63%72%69%70%74%3E')); //--> </script></center> </div> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"><a href="http://hugefiles.net/eotqcncouwxj" target="_blank" data-cke-saved-href="http://hugefiles.net/eotqcncouwxj">Left.Alone-PLAZA.iso</a></div> </div> <p><strong>MEDIAFREE</strong></p> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"><a href="http://mediafree.co/7fwl6l1mrhpy/plaza-left.alone.iso.html" target="_blank" data-cke-saved-href="http://mediafree.co/7fwl6l1mrhpy/plaza-left.alone.iso.html">Left.Alone-PLAZA.iso</a></div> </div> <p><strong>USERSCLOUD</strong></p> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"><a href="https://userscloud.com/gk64s7p2nxu9" target="_blank" data-cke-saved-href="https://userscloud.com/gk64s7p2nxu9">Left.Alone-PLAZA.iso</a></div> </div> <p><strong>JHEBERG</strong></p> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"><a href="http://jheberg.net/captcha/plaza-leftalone/" target="_blank" data-cke-saved-href="http://jheberg.net/captcha/plaza-leftalone/">Left.Alone-PLAZA.iso</a></div> </div> <p><strong>GO4UP</strong></p> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"><a href="http://go4up.com/dl/12a9e74f7690/plaza-left.alone1.iso" target="_blank" data-cke-saved-href="http://go4up.com/dl/12a9e74f7690/plaza-left.alone1.iso">Left.Alone-PLAZA.iso</a></div> </div> <p><strong>MULTI LINKS</strong></p> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"><a href="http://www.multiup.org/download/e3e833e74d99bb97f9047796ad546da3/plaza-left.alone.iso" target="_blank" data-cke-saved-href="http://www.multiup.org/download/e3e833e74d99bb97f9047796ad546da3/plaza-left.alone.iso">Left.Alone-PLAZA.iso</a></div> </div> <p><strong>TORRENT</strong></p> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"></div> </div> <div> <blockquote><p>Enjoy</p></blockquote> </div> <div id="tabs-21024-0-1"> <div class="game_area_sys_req_leftCol"> <div class="game_area_sys_req_leftCol"> <p><strong>MINIMUM:</strong></p> <ul> <li> <ul class="bb_ul"> <li><strong>OS:</strong> Windows 7 64-bit</li> <li><strong>Processor:</strong> Quad-core CPU ~ 2.5Ghz</li> <li><strong>Memory:</strong> 2 GB RAM</li> <li><strong>Graphics:</strong> GTX 560m / HD6870 1GB or equivalent</li> <li><strong>DirectX:</strong> Version 10</li> <li><strong>Storage:</strong> 1 GB available space</li> </ul> </li> </ul> </div> </div> </div> <div id="tabs-21024-0-3"><center><br /> <iframe src="https://www.youtube.com/embed/EPe5_1wp44Y" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe></center></div> <div id="tabs-21024-0-4"> <div class="codecolorer-container text twitlight"> <div class="text codecolorer"><strong>Left Alone Free Download</strong><br /> 1. Extract release<br /> 2. Mount ISO<br /> 3. Install the game<br /> 4. Copy crack from the PLAZA folder<br /> 5. Play!</div> </div> </div> <div style="font-size:0px;height:0px;line-height:0px;margin:0;padding:0;clear:both"></div> <div class="wp_rp_wrap wp_rp_vertical_m" id="wp_rp_first"><div class="wp_rp_content"><h3 class="related_post_title">You May Also Like:</h3><ul class="related_post wp_rp"><li data-position="0" data-poid="in-22746" data-post-type="none" ></li><li data-position="1" data-poid="in-22789" data-post-type="none" ></li><li data-position="2" data-poid="in-22385" data-post-type="none" ></li><li data-position="3" data-poid="in-1216" data-post-type="none" ></li><li data-position="4" data-poid="in-23032" data-post-type="none" ></li><li data-position="5" data-poid="in-23056" data-post-type="none" ></li></ul></div></div> </div></content></entry></feed>
I get the error, When I use to get data from it using xmls function in php. I get correct result and when I try my blogger rss feed or some other website's feeds I get correct results,So my codes which use to get data from xml is correct but the above code may be wrong or I am doing some thing else.
Your approach will be highly appreciable for me. Please help me
instead of htmlentities() function you can use the format of rss 2.0, I call it second way. Any ways, You can use.
<![CDATA[".$VARIABLE."]]>
Hope it works for you.
I m recording an imacro macro.
Here is my script:
VERSION BUILD=8920312 RECORDER=FX
TAB T=1
TAG POS=1 TYPE=EM ATTR=TXT:Lui<SP>écrire
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:postform ATTR=ID:subj CONTENT=Hello
TAG POS=1 TYPE=TEXTAREA FORM=ID:postform ATTR=ID:text CONTENT=Bonjour
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:postform ATTR=ID:inclure CONTENT=YES
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:postform ATTR=*
Here is the code in the body of the page:
<div id="form-subj" class="rc-form-field ">
<label for="subj">Sujet :</label>
<span class="field-wrapper">
<input id="subj" type="text" value="" name="subj" maxlength="40">
</span>
</div>
I attached a capture too of the page.
I suppose that the field-wrapper is causing the error.
The attachment of the Page HTML is not complete.
Please revise.
Sorry for my late answer.
Here is the page html
<div id="content">
<div id="ctn-iframe">
<p id="load-iframe" style="display: none;">
<img src="/static/img/loader.gif?v2.2"/>
</p>
<iframe data-src="http://legacy.reseaucontact.com/bp/?action=post&ruid=3923690" frameborder="0" id="iframe-legacy" name="iframeLegacy" width="100%" scrolling="no" onload="window.parent.scroll(0,0);" src="http://legacy.reseaucontact.com/bp/?action=post&ruid=3923690" style="display: inline-block; height: 623px;"/>
</div>
</div>
<div id="aside">
<div class="inner">
<section id="search-container">
<script type="text/javascript" src="/static/bundles/applicationrc/js/plugin/jquery-ui.js?v2.2"/>
<script type="text/javascript">
<section id="widget-community-stats">
<section id="widget-selection-mois" class="widget autopromo">
<div>
<h3 class="footer-title">
<div class="clearfix">
<p>Vous voulez plus de visites sur votre fiche? Envoyez-nous votre photo pour être membre-vedette!</p>
Soumettre ma photo
</div>
</div>
<script type="text/javascript">
</section>
</div>
</div>
<div id="main-footer">
<div class="inner-shadow" style="display: block;" id="inner-shadow-1"/>
<div class="inner-shadow" style="display: block;" id="inner-shadow-2"/>
<div class="inner-shadow" style="display: block;" id="inner-shadow-3"/>
</div>
</div>
I have a code in CouchCMS to repeat generate a repetitive
<cms:folders masterpage='business.php' folder=k_folder_name>
<div class="big">
<cms:repeat count='2'>
<div class="small">
<a href="<cms:show k_folder_link />">
<img src="<cms:show k_folder_image />" />
<cms:show k_folder_name />
</a>
</div>
</cms:repeat>
</div>
</cms:folders>
The output of the above code is:
<div class="big">
<div class="small">
<a href="http://localhost/cmi/business.php?f=2">
<img src="" />
folder2
</a>
</div>
<div class="small">
<a href="http://localhost/cmi/business.php?f=2">
<img src="" />
folder2
</a>
</div>
</div>
You can see that the name folder2 is being repeated twice. And hence the output that I am getting is that the same folder image and folder name are being outputted.
My aim is to achieve the following code:
<div class="big">
<div class="small">
<a href="http://localhost/cmi/business.php?f=1">
<img src="" />
folder1
</a>
</div>
<div class="small">
<a href="http://localhost/cmi/business.php?f=2">
<img src="" />
folder2
</a>
</div>
</div>
where in folder1 and folder2 are both displayed. What changes will I need to do in the Couch coding?
The cms:folders tag itself will repeat the enclosed contents as many times as there are folders to be listed so no need for the additional cms:repeat tag. Following should produce the code you are looking for
<div class="big">
<cms:folders masterpage='business.php'>
<div class="small">
<a href="<cms:show k_folder_link />">
<img src="<cms:show k_folder_image />" />
<cms:show k_folder_name />
</a>
</div>
</cms:folders>
</div>
Hi I am doing a screen scrape on a weather website that has inline styles in it's div and has no class or id here is their code:
<div class="TodaysForecastContainer">
<div class="TodaysForecastContainerInner">
<div style="font-size:12px;"><u>This morning</u></div>
<div style="position:absolute;top:17px;left:3px;">
<a href="forecastPublicExtended.asp#Period0" target="_blank">
<img src="./images/wimages/b_cloudy.gif" height="50px" width="50px" alt="weather image">
</a> </div>
<div style="position:absolute; top:25px; left:57px; text-align:left; height:47px; width:90px;">
Sunny Breaks </div>
</div>
<div class="TodaysForecastContainerInner">
<div style="font-size:12px;"><u>This afternoon</u></div>
<div style="position:absolute;top:17px;left:3px;">
<a href="forecastPublicExtended.asp#Period0" target="_blank">
<img src="./images/wimages/b_pcloudy.gif" height="50px" width="50px" alt="weather image">
</a> </div>
<div style="position:absolute; top:25px; left:57px; text-align:left; height:47px; width:90px;">
Mix of Sun and Cloud </div>
</div>
The problem is the absolute position inline style and they have no class or id, I was hoping I could add a class name and remove inline style on div with "This morning", div containing the image and also remove the link and the div with discription(ex. Sunny Breaks)also changing all of the TodaysForecastContainerInner since it has about 4 forecast. making it similar to:
<div class="day>This morning</div><div class="thumbnail"><img src="sample.jpg"></div><div class="description">Sunny Breaks</div>
I was using :
foreach($html->find('.TodaysForecastContainerInner div') as $e)
echo $e->innertext . '<br>';
which removes all divs living me with u and img tag,
I just can't style the div with discription I use img and u tag to style the other two divs, I'm just a beginner at php I hope someone could give me advice thank you so much.
Check out the phpQuery library. It can do jQuery-like manipulation using PHP. This code essentially accomplishes what you are trying to do:
<?php
include 'phpQuery-onefile.php';
$text = <<<EOF
<div class="TodaysForecastContainer">
<div class="TodaysForecastContainerInner">
<div style="font-size:12px;"><u>This morning</u></div>
<div style="position:absolute;top:17px;left:3px;">
<a href="forecastPublicExtended.asp#Period0" target="_blank">
<img src="./images/wimages/b_cloudy.gif" height="50px" width="50px" alt="weather image">
</a>
</div>
<div style="position:absolute; top:25px; left:57px; text-align:left; height:47px; width:90px;">
Sunny Breaks
</div>
</div>
<div class="TodaysForecastContainerInner">
<div style="font-size:12px;"><u>This afternoon</u></div>
<div style="position:absolute;top:17px;left:3px;">
<a href="forecastPublicExtended.asp#Period0" target="_blank">
<img src="./images/wimages/b_pcloudy.gif" height="50px" width="50px" alt="weather image">
</a>
</div>
<div style="position:absolute; top:25px; left:57px; text-align:left; height:47px; width:90px;">
Mix of Sun and Cloud
</div>
</div>
EOF;
$doc = phpQuery::newDocumentHTML( $text );
$containers = pq('.TodaysForecastContainerInner', $doc);
foreach( $containers as $container ) {
$div = pq('div', $container);
$div->eq(0)->removeAttr('style')->addClass('day')->html( pq( 'u', $div->eq(0) )->html() );
$div->eq(1)->removeAttr('style')->addClass('thumbnail')->html( pq( 'img', $div->eq(1))->removeAttr('height')->removeAttr('width')->removeAttr('alt') );
$div->eq(2)->removeAttr('style')->addClass('description');
}
print $doc;
Result:
<div class="TodaysForecastContainer">
<div class="TodaysForecastContainerInner">
<div class="day">This morning</div>
<div class="thumbnail"><img src="./images/wimages/b_cloudy.gif"></div>
<div class="description">
Sunny Breaks
</div>
</div>
<div class="TodaysForecastContainerInner">
<div class="day">This afternoon</div>
<div class="thumbnail"><img src="./images/wimages/b_pcloudy.gif"></div>
<div class="description">
Mix of Sun and Cloud
</div>
</div>
It's easier to do it on the client than on the server.
This jQuery+Javascript will clear your inline styles and apply a class name to each:
$(document).ready(function() {
var target = $('.TodaysForecastContainerInner div')
for(var x=0;x< target.length;x++) {
target.eq(x).attr('style','');
target.eq(x).addClass("A_"+x)
}
})
Result:
<div class="TodaysForecastContainerInner">
<div style="" class="A_0"><u>This morning</u></div>
<div style="" class="A_1">
<a target="_blank" href="forecastPublicExtended.asp#Period0">
<img height="50px" width="50px" alt="weather image" src="./images/wimages/b_cloudy.gif">
</a> </div>
<div style="" class="A_2">
Sunny Breaks </div>
</div>
You can the use a stylesheet to make it look the way you want.