happyturlte Posted February 10, 2010 Share Posted February 10, 2010 HTML Code: <span id="ctl00"><span> <div class="ldpPropFeatures"> <div class="ldpSecHeadline">Interior Features</div> Master bathroom, Dishwasher, Disposal, Range, Refrigerator, Wall/built-in oven, Basement interior access, Full basement, Partially finished basement, Bay/bow window(s), Bedroom(s) on upper level(s), Bathroom(s) on upper level(s), Cathedral ceiling(s), Cedar closets, Ceiling fan(s), Ceramic tile flooring, Family room upstairs, Tile flooring, Wall to wall carpeting, Wood floors, Work area, Central vacuum system, Intercom system, Security features, Walk-up attic, Wet bar, Laundry on 1st floor/level, Linen closet(s), Master bedroom on 1st floor/level, Sun room, Pantry, Skylight(s), Gas laundry hookups, Ice maker connection, Washer hookups, Insulated door(s), Insulated window(s), Programmable thermostat, Foyer, Game room, Media room, Sunroom, Bedroom 2 is 15X19, Bedroom 3 is 14X18 </div> </span><span> <div class="ldpPropFeatures"> <div class="ldpSecHeadline">Exterior Features</div> Decorator lighting, Patio, Porch, Professionally landscaped, Sprinkler system, Close to public transportation, Shopping nearby, Balcony, Automatic garage door, Detached parking, Heated garage, Storage in parking area, Paved drive, Public road, TV cable available, Gas connection </div> </span><span> <div class="ldpPropFeatures"> <div class="ldpSecHeadline">Listing Information</div> Refreshed at 11:59 AM PT (less than 5 minutes ago)<br/>Added on Oct 20, 2009 (113 days ago) </div> </span></span> I want to get: Master bathroom, Dishwasher, Disposal, Range, Refrigerator, Wall/built-in oven, Basement interior access, Full basement, Partially finished basement, Bay/bow window(s), Bedroom(s) on upper level(s), Bathroom(s) on upper level(s), Cathedral ceiling(s), Cedar closets, Ceiling fan(s), Ceramic tile flooring, Family room upstairs, Tile flooring, Wall to wall carpeting, Wood floors, Work area, Central vacuum system, Intercom system, Security features, Walk-up attic, Wet bar, Laundry on 1st floor/level, Linen closet(s), Master bedroom on 1st floor/level, Sun room, Pantry, Skylight(s), Gas laundry hookups, Ice maker connection, Washer hookups, Insulated door(s), Insulated window(s), Programmable thermostat, Foyer, Game room, Media room, Sunroom, Bedroom 2 is 15X19, Bedroom 3 is 14X18 AND Decorator lighting, Patio, Porch, Professionally landscaped, Sprinkler system, Close to public transportation, Shopping nearby, Balcony, Automatic garage door, Detached parking, Heated garage, Storage in parking area, Paved drive, Public road, TV cable available, Gas connection If anyone can help please let me know. Thanks, Dennis Link to comment https://forums.phpfreaks.com/topic/191686-please-help/ Share on other sites More sharing options...
sader Posted February 10, 2010 Share Posted February 10, 2010 try look if this works preg_match_all('/<\/div>(.+?)<\/div>/sim', $long_html, $result, PREG_PATTERN_ORDER); for ($i = 0; $i < count($result[0])-1; $i++) { echo trim($result[1][$i])."<hr />"; } Link to comment https://forums.phpfreaks.com/topic/191686-please-help/#findComment-1010383 Share on other sites More sharing options...
happyturlte Posted February 10, 2010 Author Share Posted February 10, 2010 Thanks. It worked. Link to comment https://forums.phpfreaks.com/topic/191686-please-help/#findComment-1010392 Share on other sites More sharing options...
happyturtle Posted February 10, 2010 Share Posted February 10, 2010 It worked by then when I changed the code it will not get the data anymore. It skips over that entire section... <span id="ctl00"><span> <div class="ldpPropFeatures"> <div class="ldpSecHeadline">Interior Features</div> Dishwasher, Range, Full basement, Walk-out basement, Wall to wall carpeting </div> </span><span> <div class="ldpPropFeatures"> <div class="ldpSecHeadline">Exterior Features</div> Deck, Close to public transportation, Shopping nearby, Paved drive, Public road </div> </span><span> Is there any way to just get that area / part? Thanks, Dennis Link to comment https://forums.phpfreaks.com/topic/191686-please-help/#findComment-1010457 Share on other sites More sharing options...
sader Posted February 11, 2010 Share Posted February 11, 2010 what exactly u changed? cuz I tested and that part of html code is not skiped regexp works as it worked before. Need more details Link to comment https://forums.phpfreaks.com/topic/191686-please-help/#findComment-1010460 Share on other sites More sharing options...
happyturtle Posted February 11, 2010 Share Posted February 11, 2010 This is the full code: <body> <form name="aspnetForm" method="post" action="default.aspx?lid=1115723055" id="aspnetForm"> <div> </div> <div> <link type="text/css" rel="stylesheet" href="http://static.move.com/lib/cb/1_0_18/rdc.css"><div class="cbBrchHdr"><img src="http://static.move.com/cb/v1/rdc/navbar/RDClogo_white.gif" alt="REALTOR.com® - Official Site of the National Association of REALTORS®" title="REALTOR.com® - Official Site of the National Association of REALTORS®" style="border:0;"></div><div class="mvCB"></div> <div class="ListingDetail"> <div class="ShowCase"> <table width="100%"> <tr> <td> <h1 class="Address"> Burlington, MA 01803</h1> <div class="PriceRow"> <span class="Price">$449,900</span> </div> <div class="ExtraFeatures"> <b>4 Bed, 1.5 Bath </b> <span class="featureBar">|</span> 1,800 Sq Ft on 0.46 Acres <span class="ldpSqFtLot">(20,037 Sq Ft Lot)</span> | <h2>MLS #71025639</h2> | Refreshed 6 minutes ago </div> </td> <td align="right" valign="top"> <div> </div> </td> </tr> </table> </div> <div class="Title"> <div>Just Listed First OH TODAY Sunday Jan 31, 2010</div> </div> <div class="Photos"> <table cellspacing="0" cellpadding="0" border="0" style="border-width:0px;width:630px;border-collapse:collapse;"> <tr> <td align="center" valign="middle"><img src="http://p.rdcpix.com/v01/l2f958042-m0m.jpg" style="border-width:0px;" /></td><td style="background-color:White;width:10px;"></td><td align="center" valign="middle"><img src="http://p.rdcpix.com/v01/l2f958042-m1m.jpg" style="border-width:0px;" /></td> </tr><tr style="background-color:White;height:10px;"> <td colspan="3" style="background-color:White;height:10px;"></td> </tr><tr> <td align="center" valign="middle"><img src="http://p.rdcpix.com/v01/l2f958042-m2m.jpg" style="border-width:0px;" /></td><td style="background-color:White;width:10px;"></td><td align="center" valign="middle"><img src="http://p.rdcpix.com/v01/l2f958042-m3m.jpg" style="border-width:0px;" /></td> </tr> </table> </div> <div> <div class="CaptionHeader"> <b>Contact Information</b> for Burlington, MA 01803 </div> <div class="AgentInfo"> <span class="listPresent">Presented by</span><br /> <div class="listAgOfName"><h2>PAUL CONTI</h2></div> <table> <tr> <td valign="top"> <img class="agOfPhoto" src="http://homepics.realtor.com/image8/http/mlspin/agents/41923s.jpg" style="border-width:0px;" /> </td> <td valign="top"> Voice Mail: (781) 416-4831<br />Mobile: (781) 254-2709<br /> </td> </tr> </table> </div> <div class="OfficeInfo"> <span class="listPresent">Brokered by </span> <br /> <div class="listAgOfName">PRUDENTIAL SUBURBAN REALTORS</div> <table> <tr> <td valign="top"> <img class="ofPhoto" src="http://homepics.realtor.com/image8/http/mlspin/brokers/10882s.gif" style="border-width:0px;" /> </td> <td valign="top"> Prudential. . .you know us. . .We know Real Estate!<br /><br /> Office: (781) 272-2070<br />Fax: (781) 229-1659<br />Toll Free: (800) 649-2070<br /> </td> </tr> </table> </div> <div class="mvCB"> </div> </div> <div> <hr class="ohLine" /> <div class="prtCalendar"> <em></em> <h2> Upcoming Open Houses</h2> <div class="tOHGrid"> <table id="tOHGrid" border="0" cellpadding="0" cellspacing="0"> <tr> <td> <div class="ohDates"> <h2> Sunday, February 14, 12:30pm - 2pm </h2> <br/> </div> </td> </tr> </table> </div> </div> </div> <div class="ldpPropInfo"> <div class="CaptionHeader"> <h2><b>Property Information</b><a name="prop_info"> </a></h2> </div> <div class="ldpSMWrap"> <div class="ldpSMtop"></div> <div class="ldpSMmiddle"> <img onerror="this.style.display='none';" src="http://homepics.realtor.com/image8/http/mlspin/agents/41923s.jpg" style="border-width:0px;" /> <div> <b>Message from PAUL CONTI</b> Great opportunity: Young 4 bedroom Colonial on a quiet side street. </div> </div> <div class="ldpSMbottom"></div> </div> <div class="ldpPropDesc"> Young Garrison Colonial on a quiet Burlington side street close to many town amenities and major routes featuring 4 bedrooms, a nice first floor addition, front to back first floor family room, formal dining, fist floor laundry and full walkout basement. This home offers maintenance free vinyl siding, Anderson wood frame windows, new heating system, new front steps, door and railings and a large level lot. Call Paul Conti 781-254-2709. </div> <table class="ldpPropFeatures" border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="3" class="ldpPFHeadline"><h3>Property Features</h3></td> </tr> <tr> <td> <ul> <li><h3>Single Family Property</h3></li> <li>Year Built: 1986</li> <li>4 total bedroom(s)</li> <li>1.5 total bath(s)</li> <li>1 total full bath(s)</li> <li>1 total half bath(s)</li> <li>8 total rooms</li> <li>Approximately 1800 sq. ft.</li></ul></td><td><ul> <li><h3>Type: Detached home</h3></li> <li>Style: Garrison</li> <li>Basement</li> <li>Fireplace(s)</li> <li>5 open parking space(s)</li> <li>Heating features: Hot water, Baseboard, Oil</li> <li>Exterior construction: Frame, Vinyl siding</li></ul></td><td><ul> <li>Roofing: Shingle</li> <li>Lot is 20000 sq. ft.</li> <li>Approximately 0.46 acre(s)</li> <li>Lot size is less than 1/2 acre</li> <li>Elementary School: Pine Glen</li> <li>Middle School: Marshall Simond</li> <li>High School: Burlington</li> </ul> </td> </tr> </table> <span id="ctl00"><span> <div class="ldpPropFeatures"> <div class="ldpSecHeadline">Interior Features</div> Dishwasher, Range, Full basement, Walk-out basement, Wall to wall carpeting </div> </span><span> <div class="ldpPropFeatures"> <div class="ldpSecHeadline">Exterior Features</div> Deck, Close to public transportation, Shopping nearby, Paved drive, Public road </div> </span><span> <div class="ldpPropFeatures"> <div class="ldpSecHeadline">Listing Information</div> Refreshed at 5:15 PM PT (6 minutes ago)<br/>Added on Jan 29, 2010 (12 days ago) </div> </span></span> <div id="PropUrlSection" class="ldpPropFeatures"> <div class="ldpSecHeadline">To access this page directly, use</div> http://www.realtor.com/realestateandhomes-detail/Burlington_MA_01803_1115723055 </div> <div class="clear"></div> </div> Link to comment https://forums.phpfreaks.com/topic/191686-please-help/#findComment-1010466 Share on other sites More sharing options...
sader Posted February 11, 2010 Share Posted February 11, 2010 u need to retrive only two last onces? Link to comment https://forums.phpfreaks.com/topic/191686-please-help/#findComment-1010475 Share on other sites More sharing options...
happyturtle Posted February 11, 2010 Share Posted February 11, 2010 yes Link to comment https://forums.phpfreaks.com/topic/191686-please-help/#findComment-1010511 Share on other sites More sharing options...
happyturtle Posted February 18, 2010 Share Posted February 18, 2010 can anyone help me out? thanks, dennis Link to comment https://forums.phpfreaks.com/topic/191686-please-help/#findComment-1014458 Share on other sites More sharing options...
happyturtle Posted March 2, 2010 Share Posted March 2, 2010 can anyone help me out? thanks, dennis Link to comment https://forums.phpfreaks.com/topic/191686-please-help/#findComment-1020439 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.