ยินดีต้อนรับคุณ, บุคคลทั่วไป กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน

เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น

ThaiSEOBoard.comพัฒนาเว็บไซต์ProgrammingA class thats transforms a String containing HTML code into an Array
หน้า: [1]   ลงล่าง
พิมพ์
ผู้เขียน หัวข้อ: A class thats transforms a String containing HTML code into an Array  (อ่าน 733 ครั้ง)
0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้
astkboy2008
Newbie
*

พลังน้ำใจ: 6
ออฟไลน์ ออฟไลน์

กระทู้: 33



ดูรายละเอียด
« เมื่อ: 05 มกราคม 2010, 03:43:59 »

Hello every one agian
today i got new class by  Ciprian Mocanu <http://mbe.ro> <[email protected]>
Cheesy
The PHP class takes a string containing HMTL code and parses it to an array as good as possible (it tries to do its best even if the code is malformed). The class works inverse than others. It parses from the simplest HTML tags to the complex ones. It works fairly fast. It has the option to ignore single tags (such as meta tags, img tags and so on).
simple example
$html file_get_contents(&#39;http://www.google.com&#39;);
$parser = new htmlParser($html);
$ar $parser->toArray();
var_dump($ar);
How Can I Install?
 Simply copy it to wherever you like and include it in your script.
 
บันทึกการเข้า
หน้า: [1]   ขึ้นบน
พิมพ์