0
$fh = fopen('http:xxxxxxx.com/rates.php','r') or die($php_errormsg);
echo $fh ;

result

<div class="Cf_row_v_lft splcolor2 Itemcont"> <div class="Itemdiv"><b>88</b></div> <div> 17.4</div> </div> <div class="Cf_row_v_RHT splcolor2"> <div> <a class="splcolor2" target="_blank" href="/item/0/1/milk"><img style="display:none;visibility:hidden;" data-cfsrc='/item/article/t_49.png' width="22" align='absmiddle' data-cfstyle='margin:0;border:0;'/><noscript><img src='/item/article/t_50.png' width="22" align='absmiddle' style='margin:0;border:0;'/></noscript></a></div> <div><b>NED</b></div> </div> </div> <div class="Cf_row_v_RHT splcolor2 itemcont"> <div class="Itemdiv"><b>133</b></div> <div>20.58</div>  </div>  </div><div class="showhidecontentdadt-3 showhidecontentdadta">This price update at Mar 3 2014</div>

i just want to print only data which class="Itemdiv" , <div>20.58</div> and <div class="showhidecontentdadt-3 showhidecontentdadta">This price update at Mar 3 2014</div> only

deceze
  • 510,633
  • 85
  • 743
  • 889
user3346567
  • 39
  • 1
  • 3
  • possible duplicate of [How do you parse and process HTML/XML in PHP?](http://stackoverflow.com/questions/3577641/how-do-you-parse-and-process-html-xml-in-php) – deceze Mar 31 '14 at 13:11
  • do you need content with i.e. `
    ...content...
    ` or without that container?
    – MSadura Mar 31 '14 at 13:17

1 Answers1

0

CSS helps you! You have to define your print styles inside @media print {//here} . Visit here: http://coding.smashingmagazine.com/2011/11/24/how-to-set-up-a-print-style-sheet/

Maysam
  • 7,246
  • 13
  • 68
  • 106