我每天都会收到一封包含html文档的电子邮件,其中包含前一天的统计信息。这个HTML很难为所有用户阅读,所以我想从这个表中提取信息"自动"用PHP脚本。我将源代码放在这里,我只编辑敏感信息。这些线条是无尽的#34;所以我只包括几行,这样你就可以看到这个想法。
只是为了让您了解我想要什么或需要什么,就是将大量信息捆绑在一起,并使其成为可搜索的"在PHP中,所以我可以创建自己的信息自定义视图。如果是那天有3个卖家,而不是50行商品,它将是3行,其中它表示商品的数量而不是每件商品。
<html dir="ltr"><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8"><title>Outdata of rapport</title> <style>table.list { border-collapse: collapse; }</style> </head> <!script!> <body bgcolor="#E8EAD8"> <blockquote> <p align=left><font size=+2><b> </b></font></p> <p align=left> <font style="font-family:monospaced"> <table class="list" border=1 cellspacing=0 cellpadding=1 rules=groups borderColor=black ><colgroup><colgroup> <tbody><tr><td style= background:#5dcbfd ><font face="courier new" size="2"><nobr id=l0002003>Data statistic </nobr></font></td> <td style= background:#5dcbfd ><font face="courier new" size="2"><nobr id=l0002030>Numbers</nobr></font></td> </tr> <tbody><tr><td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0004003>Transfered posts </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0004030> 140</nobr></font></td> </tr> <tr><td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0005003>Defined sum lines</nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0005030> 1</nobr></font></td> </tr> <tbody></tbody></table> <table class="list" border=1 cellspacing=0 cellpadding=1 rules=groups borderColor=black ><colgroup><colgroup><colgroup><colgroup><colgroup><colgroup><colgroup><colgroup><colgroup><colgroup><colgroup> <tbody><tr><td style= background:#5dcbfd ><font face="courier new" size="2"><nobr id=l0008003> Date </nobr></font></td> <td style= background:#5dcbfd ><font face="courier new" size="2"><nobr id=l0008015>Group</nobr></font></td> <td style= background:#5dcbfd ><font face="courier new" size="2"><nobr id=l0008026>Varegrp.betegn. </nobr></font></td> <td style= background:#5dcbfd ><font face="courier new" size="2"><nobr id=l0008047>Ware</nobr></font></td> <td style= background:#5dcbfd ><font face="courier new" size="2"><nobr id=l0008056>Ware text </nobr></font></td> <td style= background:#5dcbfd ><font face="courier new" size="2"><nobr id=l0008097>Seller </nobr></font></td> <td style= background:#5dcbfd ><font face="courier new" size="2"><nobr id=l0008106>Name seller </nobr></font></td> <td style= background:#5dcbfd ><font face="courier new" size="2"><nobr id=l0008132>Fil.</nobr></font></td> <td style= background:#5dcbfd ><font face="courier new" size="2"><nobr id=l0008137>Name on filial </nobr></font></td> <td style= background:#5dcbfd ><font face="courier new" size="2"><nobr id=l0008168> DB</nobr></font></td> <td style= background:#5dcbfd ><font face="courier new" size="2"><nobr id=l0008179>NumPos</nobr></font></td> </tr> <tbody><tr><td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0010003> 30.04.2015</nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0010015>030001 </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0010026>Mobile </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0010047>10038 </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0010056> 4G, </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0010097>99999999</nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0010106>Seller Two </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0010132>0171</nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0010137>Store </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0010168> 1.000,40 </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0010179> 2 </nobr></font></td> </tr> <tr><td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0011003> 30.04.2015</nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0011015>030001 </nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0011026>Mobile </nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0011047>10038 </nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0011056> 4G, </nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0011097>99999999</nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0011106>Seller One </nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0011132>0171</nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0011137>Store </nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0011168> 480,20 </nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0011179> 1 </nobr></font></td> </tr> <tr><td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0012003> 30.04.2015</nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0012015>030306 </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0012026>Protection Mobile </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0012047>10793 </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0012056> Wallet Case for Galaxy S5 bl</nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0012097>99999999</nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0012106>Seller One </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0012132>0171</nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0012137>Store </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0012168> 195,20 </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0012179> 1 </nobr></font></td> </tr> <tr><td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0013003> 30.04.2015</nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0013015>030306 </nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0013026>Protection Mobile </nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0013047>10794 </nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0013056> Slim Wallet Case Galaxy S5, Brown</nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0013097>99999999</nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0013106>Seller Two </nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0013132>0171</nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0013137>Store </nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0013168> 190,20 </nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0013179> 1 </nobr></font></td> </tr> <tr><td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0014003> 30.04.2015</nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0014015>030304 </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0014026>Charger Mobile </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0014047>10865 </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0014056> TravelCharger Micro USB, Black </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0014097>99999999</nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0014106>Seller One </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0014132>0171</nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0014137>Store </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0014168> 180,20 </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0014179> 1 </nobr></font></td> </tr> <tr><td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0015003> 30.04.2015</nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0015015>030306 </nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0015026>Protection Mobile </nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0015047>11092 </nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0015056> Slim Wallet Case f Xperia Z3 Comp</nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0015097>99999999</nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0015106>Seller One </nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0015132>0171</nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0015137>Store </nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0015168> 250,20 </nobr></font></td> <td style= background:#d7ecf4 ><font face="courier new" size="2"><nobr id=l0015179> 1 </nobr></font></td> </tr> <tr><td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0016003> 30.04.2015</nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0016015>030306 </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0016026>Protection Mobile </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0016047>11099 </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0016056> Slim Wallet Case f Xperia Z3 blac</nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0016097>99999999</nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0016106>Seller One </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0016132>0171</nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0016137>Store </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0016168> 170,20 </nobr></font></td> <td style= background:#eef9ff ><font face="courier new" size="2"><nobr id=l0016179> 1 </nobr></font></td> </tr><tbody></tbody></table> </p> </blockquote> </body> </html>