xml reading issue coming from third party - php
i have created a script in php/laravel which downloads the thousands of xml files from the third party server everyday and i don't have any control over their xml files. i am extracting them, reading and inserting them into my database. one of the xml file is throwing an error.
local.ERROR: XMLReader::readOuterXml(): DRHBN.xml:17106: parser error : Couldn't find end of Start Tag commo {"exception":"[object] (ErrorException(code: 0): XMLReader::readOuterXml(): DRHBN.xml:17106: parser error : Couldn't find end of Start Tag commo at
and here is the xml line number 17106 from DRHBN.xml
<Listing><Address><commons:preference-order>1</commons:preference-order><commons:address-preference-order>1</commons:address-preference-order><commons:FullStreetAddress>6100 Goldenseal Ct. NW</commons:FullStreetAddress><commons:UnitNumber>Plan: The Oakwood</commons:UnitNumber><commons:City>Albuquerque</commons:City><commons:StateOrProvince>NM</commons:StateOrProvince><commons:PostalCode>87120</commons:PostalCode><commons:Country>US</commons:Country></Address><ListPrice commons:isgSecurityClass="Public">351990</ListPrice><ListingURL>https://listings.listhub.net/pages/DRHBN/94121-4714/?channel=visualshows</ListingURL><ProviderName>D.R. Horton Homes</ProviderName><ProviderURL>https://www.drhorton.com</ProviderURL><ProviderCategory>HomeBuilder</ProviderCategory><LeadRoutingEmail>infoabq#drhorton.com</LeadRoutingEmail><Bedrooms>3</Bedrooms><Bathrooms>2</Bathrooms><PropertyType otherDescription="Single Family">Residential</PropertyType><PropertySubType otherDescription="Single Family">Single Family Detached</PropertySubType><ListingKey>3yd-DRHBN-94121-4714</ListingKey><ListingCategory>Purchase</ListingCategory><ListingStatus>Active</ListingStatus><MarketingInformation><commons:PermitAddressOnInternet commons:isgSecurityClass="Public">true</commons:PermitAddressOnInternet><commons:VOWAddressDisplay commons:isgSecurityClass="Public">true</commons:VOWAddressDisplay><commons:VOWAutomatedValuationDisplay commons:isgSecurityClass="Public">true</commons:VOWAutomatedValuationDisplay><commons:VOWConsumerComment commons:isgSecurityClass="Public">true</commons:VOWConsumerComment></MarketingInformation><Photos><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/1?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/2?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/3?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/4?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/5?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/6?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/7?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/8?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/9?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/10?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/11?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/12?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/13?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/14?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/15?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/16?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/17?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/18?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/19?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/20?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/21?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/22?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/23?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/24?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/25?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/26?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/27?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/28?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/29?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/30?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/31?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/32?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/33?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/34?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/35?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/36?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/37?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/38?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/39?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/40?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/41?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/42?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/43?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/44?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/45?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/46?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/47?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/48?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/49?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/50?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/51?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/52?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/53?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/54?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/55?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/56?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/57?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/58?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/59?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/60?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/61?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/62?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/63?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/64?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/65?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/66?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/67?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/68?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/69?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/70?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/71?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/72?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/73?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/74?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/75?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/76?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/77?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/78?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/79?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/80?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/81?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/82?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/83?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/84?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/85?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/86?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/87?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/88?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/89?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/90?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/91?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/92?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/93?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/94?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/95?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/96?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/97?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/98?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/99?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/100?lm=20210202T110438</MediaURL></Photo></Photos><DiscloseAddress>true</DiscloseAddress><ListingDescription>The Oakwood is a thoughtfully designed single-story home with three bedrooms and two bathrooms. The covered entry invites guests to your home. The tech room is found off the foyer for a second living area or office. The split design has the largest bedroom separate from the secondary bedrooms. The kitchen features a corner pantry and island and looks out over the spacious great room and dining area. The largest bedroom includes both a bathtub and a walk-in shower, with a large walk-in closet as well. The covered patio is a great place to entertain or just relax in your backyard.</ListingDescription><MlsId>DRHBN</MlsId><MlsName>D.R. Horton</MlsName><MlsNumber>94121+4714</MlsNumber><LivingArea>2105</LivingArea><ListingTitle>The Oakwood</ListingTitle><FullBathrooms>2</FullBathrooms><ThreeQuarterBathrooms>0</ThreeQuarterBathrooms><HalfBathrooms>0</HalfBathrooms><OneQuarterBathrooms>0</OneQuarterBathrooms><PartialBathrooms>0</PartialBathrooms><ListingParticipants><Participant><ParticipantKey>3yd-DRHBN-94121</ParticipantKey><ParticipantId>94121</ParticipantId><FirstName>Online</FirstName><LastName>Sales Counselor</LastName><Role>Listing</Role><PrimaryContactPhone>5057501209</PrimaryContactPhone><Email>infoabq#drhorton.com</Email><WebsiteURL>https://www.drhorton.com/new-mexico/albuquerque/albuquerque/la-cuentista.aspx</WebsiteURL></Participant></ListingParticipants><Offices><Office><OfficeKey>3yd-DRHBN-940</OfficeKey><OfficeId>940</OfficeId><OfficeCode><OfficeCodeId>940</OfficeCodeId></OfficeCode><Name>D.R. Horton - Albuquerque</Name><CorporateName>D.R. Horton - Albuquerque</CorporateName><BrokerId>divisions</BrokerId><Address><commons:preference-order>1</commons:preference-order><commons:address-preference-order>1</commons:address-preference-order><commons:FullStreetAddress>6100 Goldenseal Ct. NW</commons:FullStreetAddress><commons:City>Albuquerque</commons:City><commons:StateOrProvince>NM</commons:StateOrProvince><commons:PostalCode>87120</commons:PostalCode><commons:Country>US</commons:Country></Address><Website>https://www.drhorton.com</Website></Office></Offices><Brokerage><Name>D.R. Horton Homes</Name></Brokerage><Builder><Name>D.R. Horton - Albuquerque</Name><WebsiteURL>https://www.drhorton.com</WebsiteURL></Builder><Location><Latitude>35.17669</Latitude><Longitude>-106.7101</Longitude><Community><commons:Subdivision commons:isgSecurityClass="Public">La Cuentista</commons:Subdivision><commons:Schools><commons:School><commons:Name>Sunset View Elementary School</commons:Name><commons:SchoolCategory>Elementary</commons:SchoolCategory><commons:District commons:isgSecurityClass="Public">Albuquerque Public Schools</commons:District></commons:School><commons:School><commons:Name>Volcano Vista High School</commons:Name><commons:SchoolCategory>High</commons:SchoolCategory><commons:District commons:isgSecurityClass="Public">Albuquerque Public Schools</commons:District></commons:School><commons:School><commons:SchoolCategory>JuniorHigh</commons:SchoolCategory><commons:District commons:isgSecurityClass="Public">Albuquerque Public Schools</commons:District></commons:School><commons:School><commons:Name>Tony Hillerman Middle School</commons:Name><commons:SchoolCategory>Middle</commons:SchoolCategory><commons:District commons:isgSecurityClass="Public">Albuquerque Public Schools</commons:District></commons:School></commons:Schools></Community><Neighborhoods><Neighborhood><Name>La Cuentista</Name><Description>La Cuentista is the Westsides hottest community! Offering D.R Hortons most popular single-story floor plans from 1,746 to 2,482 square feet with views of the Sandia and city lights. Homes start in the low-$300,000s and offer the most popular, in-demand options like the Multi-Gen floor plan, 9 ceilings with 8 doors, hard tile living rooms and covered patios standard. Located on the Northwest side of Albuquerque, only minutes from I-40, Montano, Coors and Paseo Del Norte. Perfect location for commuting to Downtown or Northeast AlbuquerqueThe La Cuentista community is just a short distance away from Volcano Vista High School and has a variety of shopping centers nearby. Due to it's location near the edge of Albuquerque, there are many recreational activities that are easily accessible such as the Petroglyph National Park. Give us a call and schedule a tour of your dream home!When you choose Americas Builder to construct your home, you select the features and location that work best for you. Below is a list of reasons why its a smart idea to choose the largest home builder in the nation: The benefits of high quality, new home construction include the most advanced technology, energy efficiencies and building standards. A robust new home warranty provides buyers peace of mind. New houses typically dont require the upgrades and maintenance needed in pre-owned homes before moving in or during the initial years of ownership.</Description></Neighborhood></Neighborhoods></Location><DetailedCharacteristics><ArchitectureStyle otherDescription="">Other</ArchitectureStyle><IsNewConstruction>true</IsNewConstruction><NumFloors>1.0</NumFloors><NumParkingSpaces>2</NumParkingSpaces><RoofTypes><RoofType>Unknown</RoofType></RoofTypes><Rooms><Room>Bedroom</Room><Room>Bedroom</Room><Room>Bedroom</Room><Room>Full Bath</Room><Room>Full Bath</Room></Rooms></DetailedCharacteristics><ModificationTimestamp commons:isgSecurityClass="Public">2021-02-06T21:31:14+00:00</ModificationTimestamp><Disclaimer commons:isgSecurityClass="Public">Copyright © 2021 D.R. Horton. All rights reserved. All information provided by the listing agent/broker is deemed reliable but is not guaranteed and should be independently verified.</Disclaimer></Listing>
how do i get any ride of this invalid xml issue?
Related
How to call specific data in json object
Ok I am making an api call to google places API and getting back a JSON object. I have been able to do work with this object with Ajax but now I have to integrate my code into a Wordpress instance and I am making the API call inside functions.php because I want to use the get_theme_mod(); method. Since I am fairly new to php I don't know how to output specific data from this object. My object is below, I am trying to access the reviews returned by this object (all 5). I know I can do this with Ajax fairly easily but I am really struggling with the syntax in PHP. This is my PHP API call function do_api_call(){ $url = $my_url; $data = file_get_contents($url); $rev = json_encode($data); echo $rev; } {"html_attributions":[],"result":{"address_components":[{"long_name":"76","short_name":"76","types":["street_number"]},{"long_name":"North Main Street","short_name":"N Main St","types":["route"]},{"long_name":"Concord","short_name":"Concord","types":["locality","political"]},{"long_name":"Merrimack County","short_name":"Merrimack County","types":["administrative_area_level_2","political"]},{"long_name":"New Hampshire","short_name":"NH","types":["administrative_area_level_1","political"]},{"long_name":"United States","short_name":"US","types":["country","political"]},{"long_name":"03301","short_name":"03301","types":["postal_code"]},{"long_name":"4915","short_name":"4915","types":["postal_code_suffix"]}],"adr_address":"<span class=\"street-address\">76 N Main St</span>, <span class=\"locality\">Concord</span>, <span class=\"region\">NH</span> <span class=\"postal-code\">03301-4915</span>, <span class=\"country-name\">USA</span>","formatted_address":"76 N Main St, Concord, NH 03301, USA","formatted_phone_number":"(603) 856-7181","geometry":{"location":{"lat":43.20638719999999,"lng":-71.53594079999999},"viewport":{"northeast":{"lat":43.20770828029149,"lng":-71.53477561970848},"southwest":{"lat":43.2050103197085,"lng":-71.5374735802915}}},"icon":"https://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png","id":"9496ddb6eb5f976d65d829a5bc2a11c16235f24c","international_phone_number":"+1 603-856-7181","name":"The Crazy Goat","opening_hours":{"open_now":true,"periods":[{"close":{"day":0,"time":"1800"},"open":{"day":0,"time":"1200"}},{"close":{"day":2,"time":"2200"},"open":{"day":2,"time":"1200"}},{"close":{"day":3,"time":"2200"},"open":{"day":3,"time":"1200"}},{"close":{"day":4,"time":"2200"},"open":{"day":4,"time":"1200"}},{"close":{"day":5,"time":"2200"},"open":{"day":5,"time":"1200"}},{"close":{"day":6,"time":"2200"},"open":{"day":6,"time":"1200"}}],"weekday_text":["Monday: Closed","Tuesday: 12:00 – 10:00 PM","Wednesday: 12:00 – 10:00 PM","Thursday: 12:00 – 10:00 PM","Friday: 12:00 – 10:00 PM","Saturday: 12:00 – 10:00 PM","Sunday: 12:00 – 6:00 PM"]},"photos":[{"height":1536,"html_attributions":["The Crazy Goat"],"photo_reference":"CmRaAAAAuVKW68MbnuWHZyE8nw6AfMeYfqR8hoZBNmlFFReExDzbgqrkY2NtZro_f8cBWLRzVTajatvGjpv9Mffqv_zeCFuGJIz0jBreCN-0d8YQkc11gzjwZT_-TVS-dwvvx0efEhD_NXSEyy9Q7VZJd2tIFK_iGhT-pd1t-6YpKzhr8nVvaGlfFv36gw","width":2048},{"height":3024,"html_attributions":["a beauregard"],"photo_reference":"CmRaAAAA8jPB2uPOxWd_-1inL9GMO7tWdIfhvaVCYFODb2yessHQ_Jy7Wyo99z9Qrlohho0tdFlz4GyuGgtO1CEirdeLYJJb25QbX4ZdBClQwDjYBDUC0spd_tPFLAnsFCLk664ZEhBGqm26u-aeqnDBQzWKPTc2GhR2OUmpnyErQr3rsbmOC92nva595A","width":4032},{"height":2988,"html_attributions":["Vicky and Snickers Anderson"],"photo_reference":"CmRZAAAAk-Z3Ml_aMD8_xwpZBT85JDfd9dtrq_LponeZICHGhbRp1KozF4H8Ig36ikIYcbJyH0DWf-4_ylRWviWYDBkuJWcKyvHRSzjquxuE_MNN5FjjkWX3aPBcNWxTnh9RQ8OcEhAE9Y91__B86071fFBuZFDAGhSF5XxgaAxsUl8Im4_lgVCMIgGPNA","width":5312},{"height":4032,"html_attributions":["a beauregard"],"photo_reference":"CmRaAAAAgaVjlQzuv7F-88pv8GPd-IkGzo9oH1gQoKc_ZmVmQjVqWeeljkVLSsti3oLzkau3IXW3JOJ7KyOvlsOUTGNOJnBA31OIttfCbmCFPSCiyywmu7yUHnf_w0CKLw5hT_RWEhCpSZtnAKj3umsNcJUtI7K3GhR4g14ff5ekvKuB_rW0YlL_FWotxg","width":3024},{"height":3024,"html_attributions":["a beauregard"],"photo_reference":"CmRaAAAA3so1UtaPCAqJlbpxhyfbBefycY4FspxrNPDBH-xeBoTMTgkTCb3uT9p8l3Umgu2VpCatqTu3fDFgbj5VmjNGvk7ngtYYhD2UCMXoCxuxHjL9kzvoaDdL8SoyJUFWBnlZEhCeTxLqrBsM8R6IPd8iK_h2GhTmgvfEor4xDZNha0teaiw3KyHhrQ","width":4032},{"height":4032,"html_attributions":["Michael Brady"],"photo_reference":"CmRaAAAAlxoITLsevfPLrsV5rCHt1IuJBs-sKE6tTuQmmKg6xbAi2puyrhlG3aEY9GoFUCRpApEL30TssUQPN31U6kkCdIDofmJktXYvpvJ9nb2EItJDyVE32s7XE15XJEx3mvPKEhA19O6fhPnSKbSD2bE-lTqPGhRjw-0d1TspjpQC3yhez71pWyJKOA","width":3024},{"height":2592,"html_attributions":["Maxwell Murdoch Snelling"],"photo_reference":"CmRaAAAApttZtrF9LRbcVHeCokgPipfdh-Gs-v6G9ze8vAXh2YPP8PEx3cWy7AEgY72_79VFPAMWTkKgbrOceNiqn7t6R0USgUvD9hnPq_WLc9jPt-Fbwt0HwoO2QZtb0l7Xry_IEhD9SRgHx9fiVLGWyxfIs67LGhSprzTG6Srq3f4HkpBZhytA__2wvQ","width":1944},{"height":3024,"html_attributions":["a beauregard"],"photo_reference":"CmRaAAAA2lGLeytP1Eo0nIe_a-ml4eW9xdMXbiTo8BQij_tL2IBtd9Qd1pJDEhPEF-4ypXhraLSgTLa9Bv8D6pOelpvRoEw3GoO5_G1ZPyV5cDqqRXYEaZL7AGN77otQ0Qo50rb9EhBK4oPCeFf4BKD5_lyjfqKmGhR59yKmhuLhv-qTKzyD0jlau1YwHQ","width":4032},{"height":5312,"html_attributions":["Dennis Shanoff"],"photo_reference":"CmRaAAAAdlDGdD00jBf5hOZ49bpJUfjPzH0m0G5sIXOkP5KEqbksfqL33k-9uxUyW3LqhJjat4Jbggq6C_8bmfsclSFjdhJz2NayfOsE-nyyMNEN-GwPtZfhpc50HT9Nkn5jKNWxEhCCkJ6WpbssuAGn-JdibF_LGhSPJDtJGvkFcwb6HRhoVxWBrR4EbQ","width":2988},{"height":3024,"html_attributions":["a beauregard"],"photo_reference":"CmRaAAAAL5u0ksBwwzBYwycDHNqTEtKqdaGpPRB9REBvNVl_6E4HgiuEOkYpZphocizNd-EozrlE05Zwz1wC2ZcibsqF0CI3-wP8yJyFC76Lu-yZkHrNyAUxs85GGg8xOLTUAzlXEhBQne5bG7eQQn8pW8DszBqVGhQqkbf-vt6WC8QRdGzuGeUpoYQaww","width":4032}],"place_id":"ChIJbQa_U41q4okRJsbAM3zX_WM","rating":3.4,"reference":"CmRRAAAAPU4b-A3ebudL3C27zOGt3pH0uqRXiRmY_feRH3O4SXJpIB7ghnQRsOwDRe0nUssISkr3V_pdwv6BXxHeMvneYGUWLFOTRe_aUlnDQKGpkrXj3bOoFBx7QGdo5ZWgJbKpEhDIJX5_r27SlpSsb9hLIpHZGhSC_JiK3IVPnom3nuQLNOOXZUFsaw","reviews":[{"author_name":"Papa Joe Gaudet","author_url":"https://www.google.com/maps/contrib/111381118825182249763/reviews","language":"en","profile_photo_url":"https://lh4.googleusercontent.com/-lJEMylIg98M/AAAAAAAAAAI/AAAAAAAATvY/njN-66RVAp0/s128-c0x00000000-cc-rp-mo-ba5/photo.jpg","rating":5,"relative_time_description":"2 weeks ago","text":"I dropped in on a cold quiet Tuesday evening. The food was outstanding as was the service. I wish I had more time to enjoy the atmosphere. Next time (and there will be a next time), I'll bring a date. She'll very likely appreciate my good taste. BTW, they are hiring right now and the staff looks happy.","time":1515541362},{"author_name":"Christine D'","author_url":"https://www.google.com/maps/contrib/110635532521172813159/reviews","language":"en","profile_photo_url":"https://lh6.googleusercontent.com/-neX3OzkbUe4/AAAAAAAAAAI/AAAAAAAAAAA/AA6ZPT6K8ZOkQiewnkB6bxg3VaKuVFIa5Q/s128-c0x00000000-cc-rp-mo-ba4/photo.jpg","rating":5,"relative_time_description":"a week ago","text":"Late lunch on a Friday afternoon. We had sandwiches (a burger and chicken sand.) which were both quite good. Flat bread with goat cheese bruschetta app was delicious! Waiter/bartender was knowledgeable and SO personable. Even if we had struck out with our food selections he would be reason enough to go back. He engaged with every patron in the place. The only thing I'm sorry about is that I didn't get his name. The Crazy Goat is lucky to have him.","time":1515820810},{"author_name":"Lee Goodwin","author_url":"https://www.google.com/maps/contrib/117058651202426601746/reviews","language":"en","profile_photo_url":"https://lh4.googleusercontent.com/-XcqH9W_RTeY/AAAAAAAAAAI/AAAAAAAAAEI/Y75Cnl2eE_k/s128-c0x00000000-cc-rp-mo/photo.jpg","rating":5,"relative_time_description":"a month ago","text":"The food is delicious. I had a special of stuffed roasted acorn squash, unreal. The atmosphere and server John were excellent. Can't wait to come here again!","time":1512852799},{"author_name":"happy2say1hello","author_url":"https://www.google.com/maps/contrib/109024209580809571111/reviews","language":"en","profile_photo_url":"https://lh3.googleusercontent.com/-Oct8pO1R3w4/AAAAAAAAAAI/AAAAAAAAAAA/AA6ZPT4gyixHn6uuGcL_-2l1PmC9ztLTUg/s128-c0x00000000-cc-rp-mo/photo.jpg","rating":1,"relative_time_description":"a month ago","text":"I worked here and the owners treated the staff like garbage. Worst job experience I've ever had. Not to mention the food wasn't that great but so expensive. Please save your money for a restaurant that treats its staff better.","time":1512504706},{"author_name":"Tracy Long","author_url":"https://www.google.com/maps/contrib/102667733449818335247/reviews","language":"en","profile_photo_url":"https://lh4.googleusercontent.com/-uc5qHDhCNjs/AAAAAAAAAAI/AAAAAAAAAAA/AA6ZPT6KjwgNKU-cDRvtgpFDyG809i0BlA/s128-c0x00000000-cc-rp-mo/photo.jpg","rating":3,"relative_time_description":"in the last week","text":"Server was very personable and friendly. Food was ok. Very limited menu. Liked the ambiance.","time":1516936344}],"scope":"GOOGLE","types":["restaurant","food","point_of_interest","establishment"],"url":"https://maps.google.com/?cid=7205151907306849830","utc_offset":-300,"vicinity":"76 North Main Street, Concord","website":"http://www.crazygoatconcord.com/"},"status":"OK"}
Try this: $rev = json_decode($data,true); $reviews = $rev["result"]["reviews"]; foreach($reviews as $review){ $author_name = $review["author_name"]; echo $author_name."<br>"; }
postman chrome shows 404 error on calling of wordpress url from .net
In a project, I have to show wp posts in website via .net. So, I created a php file in project root folder as 'latestnews.php'. When called from browser, everything is working fine and data is shown. But in postman though the data is shown status is coming as 404 not found. How to solve this issue? Any help/suggestions are welcome. Url: http://109.74.4.178/worldwaterweek/latestnews.php?numberposts=5 latestnews.php <?php define('WP_USE_THEMES', false); require( dirname( __FILE__ ) . '/wp-blog-header.php' ); $num = $_GET["numberposts"] ?: '10'; $posts = get_posts(array( 'posts_per_page' => $num, )); $array = array(); foreach($posts as $val) { start_wp(); $array[] = array( 'id' => $val->ID, 'title' => $val->post_title, 'link' => get_permalink($val->ID), 'publish_date' => $val->post_date, 'content' => strip_tags($val->post_content), 'image' => get_the_post_thumbnail_url($val->ID, 'full') ); } echo json_encode($array); ?>
It is working fine and I am getting below data: [{"id":2446,"title":"Scientific Programme Committee (SPC)","link":"http://109.74.4.178/worldwaterweek/scientific-programme-committee-spc/","publish_date":"2017-02-11 10:23:39","content":"[vc_row][vc_column width=\"1/2\"][vc_column_text]\r\n\r\nThe Scientific Programme Committee (SPC) is comprised of a number of professors, scientists and experts from the water and development fields. The work of the SPC involves setting the overall theme and scope for World Water Week in Stockholm.\r\n\r\n[/vc_column_text][vc_column_text]\r\n\r\nThe committee also determines the seminars topics, selects from submitted abstracts and develops the seminars programmes.\u00a0 It is aided in its work by the Young Scientific Programme Committee.\r\n\r\n[/vc_column_text][/vc_column][vc_column width=\"1/2\"][vc_column_text]2017 SPC\r\n\r\n \tProf. Torkil J\u00f8nch Clausen, DHI (Chair)\r\n \tMs. Danka Thalmeinerova, GWP\r\n \tDr. Marianne Kjell\u00e9n, UNDP\r\n \tDr. Phil Graham, SMHI & BTC\r\n \tMs. Renee Andersson, Sustainability Consultant\r\n \tDr. Louise Karlberg, SEI\r\n\r\n(swipe to the next slide to continue)[/vc_column_text][/vc_column][/vc_row]","image":"http://109.74.4.178/worldwaterweek/wp-content/uploads/2015/11/Open-for-Submissions-WWW-2017.jpg"},{"id":8907,"title":"2017 SPC members (continued)","link":"http://109.74.4.178/worldwaterweek/2017-spc-members/","publish_date":"2017-02-11 10:21:21","content":"[vc_row][vc_column width=\"1/2\"][vc_column_text](continued 2017 SPC members list)\r\n\r\n \tDr. Robert Bos, IWA\r\n \tMr. Will Sarni, Deloitte\r\n \tProf. Kalanithy Vairavamoorthy, IWMI\r\n \tMr. Gyewoon Choi, Incheon National University\r\n \tMs. Eiman Karar, UNEP\r\n \tDr. Guillermo Donoso Harris, Universiad Pontificia\r\n \tDr. Diego Rodr\u00edguez, The World Bank Group\r\n\r\n[/vc_column_text][/vc_column][vc_column width=\"1/2\"][vc_column_text]\r\n\r\n \tDr. Dipak Gyawali, Nepal Academy of Science and Technology\r\n \tMr. Jon Lane, Water and Sanitation Consultant\r\n \tMr. Rami AbdelRahman, SIWI\r\n \tMs. Pritha Hariram, IWA (co-opted member)\r\n \tMr. Victor Arroyo, CAF (co-opted member)\r\n \tDr. Pay Drechsel, IWMI (co-opted member)\r\n \tMr. Torgny Holmgren, SIWI (Vice Chair)\r\n \tMs. Karin Lex\u00e9n, SIWI\r\n \tMr. Adrian Puigarnau, SIWI (Secretary)\r\n\r\n[/vc_column_text][/vc_column][/vc_row]","image":"http://109.74.4.178/worldwaterweek/wp-content/uploads/2016/09/Closing-Plenary-2016-3.jpg"},{"id":855,"title":"Young Scientific Programme Committee (YPSC)","link":"http://109.74.4.178/worldwaterweek/young-scientific-programme-committee-2/","publish_date":"2017-02-10 12:10:43","content":"[vc_row][vc_column width=\"1/2\"][vc_column_text]2017 Young Scientific Programme Committee\r\n\r\n \tShubhra Bhattacharjee, Bangladesh\r\n \tMadison Condon, USA\r\n \tDavid Ginting, Indonesia\r\n \tRianna Gonzales, Trinidad and Tobago\r\n\r\n[/vc_column_text][/vc_column][vc_column width=\"1/2\"][vc_column_text]\r\n\r\n \tKanokphan Jongjarb, Thailand\r\n \tMarielle Larson, USA\r\n \tSofia Murad, USA\r\n \tMatthijs Wessels, Holland\r\n \tMarij Zwart, The Netherlands\r\n\r\n[/vc_column_text][/vc_column][/vc_row]","image":"http://109.74.4.178/worldwaterweek/wp-content/uploads/2016/11/OC-slider-iStock_000047541008.png"},{"id":4487,"title":"Shubhra Bhattacharjee","link":"http://109.74.4.178/worldwaterweek/shubhra-bhattacharjee/","publish_date":"2017-02-10 11:46:49","content":"Shubhra Bhattacharjee is a trained and experienced sustainability professional with a track record of managing complex projects and developing innovative solutions in response to the sustainability challenges faced by business and, in turn, society today. Shubhra joins Solidaridad after an extensive spell of working on the brand side of the sector, with experience working in environmental and social compliances at Lidl HK Ltd., Target Australia and Li & Fung Bangladesh. He audited a number of factories of textile, leather and ceramic sectors. Besides that, a number of training materials on environmental issues was developed by him for factories. He also possesses experience as an environmental manager at a large textile industry. Shubhra holds Bachelor & Master\u2019s degree in Environmental Sciences with concentration in wastewater treatment and public health from Jahangirnagar University, Bangladesh. Shubhra\u2019s interest lies on development of cost effective wastewater treatment and improve water conservation. Shubhra has over 6 years of experience in water and wastewater resource management, treatment, and water conservation.\r\n\r\nShubhra specializes on water quality assessment, wastewater treatment and groundwater governance.","image":"http://109.74.4.178/worldwaterweek/wp-content/uploads/2017/02/shubhra-bhattacharjee.png"},{"id":4485,"title":"Madison Condon","link":"http://109.74.4.178/worldwaterweek/madison-condon/","publish_date":"2017-02-10 11:44:57","content":"Madison Condon is an Earth Institute Postdoctoral Research Fellow at Columbia University where she works in collaboration with the Columbia Water Center and Columbia Law School. She received her J.D. from Harvard University and her Masters in Law and Diplomacy from The Fletcher School at Tufts University. As a Fulbright Fellow based in the Netherlands, she researched the impact of foreign investment on customary water rights in rural Tanzania. Prior to joining the Earth Institute, Madison clerked for Judge Jane Kelly of the Court of Appeals for the Eighth Circuit. She received a B.S. in Environmental Engineering from Columbia University.\r\n\r\nMadison\u2019s research focuses on environmental law, land and water rights, and international trade and investment law. With the Columbia Water Center and the Columbia Center for Sustainable Investment she is engaged with a three-year project to understand water-related risks in the international mining industry. She also works on a UNESCO-funded project investigating mines the environmental liabilities of state owned mining companies in East Africa.","image":"http://109.74.4.178/worldwaterweek/wp-content/uploads/2017/02/madison-condon.png"}]
Found the solution. Instead of loading wp-blog-header.php which in turn loads wp-load.php(loads wp library) and template-loader.php(loads wp templates), I added wp-load.php only. So, I guess wp template was creating the errors.
Get my Apps Data iTunes Connect
I'm looking for a script or series of scripts that download and parse iTunes Connect sales data and AppStore comments, ratings and rankings data for a defined app. I want to get my apps data on my web site .
You can do this by making following request in PHP $response = file_get_contents("https://itunes.apple.com/lookup?id={YOUR_APP_ID}&entity=software"); For Example: $response = file_get_contents("https://itunes.apple.com/lookup?id=317469184&entity=software"); Will give following JSON output: { "resultCount":1, "results": [ { "kind":"software", "features":[], "supportedDevices":["iPad23G", "iPhone5s", "iPad2Wifi", "iPhone5c", "iPadThirdGen", "iPadFourthGen4G", "iPhone4", "iPadMini", "iPadThirdGen4G", "iPadFourthGen", "iPhone5", "iPodTouchFifthGen", "iPadMini4G", "iPhone4S"], "isGameCenterEnabled":false, "screenshotUrls":["http://a2.mzstatic.com/us/r30/Purple/v4/25/c1/45/25c145d7-5272-4f41-536f-c5744cd0c61e/screen1136x1136.jpeg", "http://a4.mzstatic.com/us/r30/Purple/v4/61/3c/0c/613c0c2e-1263-c54c-8658-2de8e6a0dd4b/screen1136x1136.jpeg", "http://a5.mzstatic.com/us/r30/Purple/v4/fa/19/ad/fa19ad92-85cc-c4bf-921b-f575a543327c/screen1136x1136.jpeg", "http://a1.mzstatic.com/us/r30/Purple4/v4/3d/5d/97/3d5d9701-f6d9-cc12-7e91-b9ede19e9776/screen1136x1136.jpeg", "http://a2.mzstatic.com/us/r30/Purple6/v4/52/cc/ee/52cceed3-5837-9987-4c10-7cd02bf33b1e/screen1136x1136.jpeg"], "ipadScreenshotUrls":[], "artworkUrl60":"http://a1156.phobos.apple.com/us/r30/Purple2/v4/54/93/ac/5493acfd-1a6e-7960-dda5-7de005232d35/AppIcon57x57.png", "artworkUrl512":"http://a1105.phobos.apple.com/us/r30/Purple4/v4/95/77/8b/95778b7e-8897-3b68-b8f9-134f34531b25/mzl.sobbgbbg.png", "artistViewUrl":"https://itunes.apple.com/us/artist/espn/id317469187?uo=4", "artistId":317469187, "artistName":"ESPN", "price":0.00, "version":"4.0.5", "description":"Introducing the all-new SportsCenter app, a supercharged update to the popular ScoreCenter app packed with live scores, breaking news, video highlights, in-depth analysis, personalized alerts and more. What more could any sports fan ask for? \n\nFeatures include: \n- Instant scores and updates on the biggest games of the day as well as your favorite teams \n- Breaking news and analysis across hundreds of leagues and teams, all powered by ESPN's authoritative newsroom \n- Dozens of notification options: never miss another kickoff, scoring play, substitution, final whistle or tidbit of breaking news \n- Add, edit and remove favorite teams quickly and easily for a customized experience throughout \n- Deep Twitter integration for a social perspective on news, rumors and gossip", "currency":"USD", "genres":["Sports", "Entertainment"], "genreIds":["6004", "6016"], "releaseDate":"2009-06-02T07:00:00Z", "sellerName":"ESPN Inc.", "bundleId":"com.espn.ScoreCenter", "trackId":317469184, "trackName":"ESPN SportsCenter", "primaryGenreName":"Sports", "primaryGenreId":6004, "releaseNotes":"- In-game highlights added to game pages during the Live game\n- SportsCenter TV Graphics now inside the app\n- Support for World Cup videos and games\n- Easily share video right from the News Feed\n- Improved performance \n- Enhanced design\n- The latest Breaking News", "minimumOsVersion":"7.0", "formattedPrice":"Free", "wrapperType":"software", "trackCensoredName":"ESPN SportsCenter", "languageCodesISO2A":["NB", "DA", "NL", "EN", "FR", "DE", "IT", "NN", "ES"], "fileSizeBytes":"18953341", "sellerUrl":"http://www.espn.com", "contentAdvisoryRating":"4+", "averageUserRatingForCurrentVersion":3.5, "userRatingCountForCurrentVersion":4317, "artworkUrl100":"http://a1105.phobos.apple.com/us/r30/Purple4/v4/95/77/8b/95778b7e-8897-3b68-b8f9-134f34531b25/mzl.sobbgbbg.png", "trackViewUrl":"https://itunes.apple.com/us/app/espn-sportscenter/id317469184?mt=8&uo=4", "trackContentRating":"4+", "averageUserRating":3.5, "userRatingCount":264216 } ] } Reference Link
Scraping HN Front Page - Handeling Simple HTML Dom Error
I'm using 'Simple HTML Dom' to scrape the HN Front Page (news.ycombinator.com), which works great most of the time. However, every now and then they promote a job/company that lacks the elements that the scraper is looking for, i.e. score, username and number of comments. This of course, breaks the array and thus the output of my script: <?php // 2012-02-12 Maximilian (Extract news.ycombinator.com's Front Page) // Set the header during development //header ("content-type: text/xml"); // Call the external PHP Simple HTML DOM Parser (http://simplehtmldom.sourceforge.net/manual.htm) include('lib/simple_html_dom.php'); date_default_timezone_set('Europe/Berlin'); // Download 'news.ycombinator.com' content //$tmp = file_get_contents('http://news.ycombinator.com'); //file_put_contents('get.tmp', $tmp); // Retrieve the content $html = file_get_html('tc.tmp'); // Set the extraction pattern for each item $title = $html->find("tr td table tr td.title a"); $score = $html->find("tr td.subtext span"); $user = $html->find("tr td.subtext a[href^=user]"); $link = $html->find("tr td table tr td.title a"); $time = $html->find("tr td.subtext"); $additionals = $html->find("tr td.subtext a[href^=item?id]"); // Construct the feed by looping through the items for($i=0;$i<29;$i++) { $cr=1; // Check if the item points to an external website if (!strstr($link[$i]->href,'http')) { $url = 'http://news.ycombinator.com/'.$link[$i]->href; $description = "Join the discussion on Hacker News."; } else { $url = $link[$i]->href; // Getting content here if (empty($abstract)) { $description ="Failed to load any relevant content. Please try again later."; } else { $description = $abstract; } } // Put all the items together $result .= '<item><id>f'.$i.'</id><title>'.htmlspecialchars(trim($title[$i]->plaintext)).'</title><description><![CDATA['.$description.']]></description><pubDate>'.str_replace(' | '.$additionals[$i]->plaintext,'',str_replace($score[$i]->plaintext.' by '.$user[$i]->plaintext.' ','',$time[$i]->plaintext)).'</pubDate><score>'.$score[$i]->plaintext.'</score><user>'.$user[$i]->plaintext.'</user><comments>'.$additionals[$i]->plaintext.'</comments><id>'.substr($additionals[$i]->href,8).'</id><discussion>http://news.ycombinator.com/'.$additionals[$i]->href.'</discussion><link>'.htmlspecialchars($url).'</link></item>'; } $output = '<rss><channel><id>news.ycombinator.com Frontpage</id><buildDate>'.date('Y-m-d H:i:s').'</buildDate>'.$result.'</channel></rss>'; file_put_contents('tc.xml', $output); ?> Here's an example of the correct output <item> <id>f0</id> <title>Show HN: Bootswatch, free swatches for your Bootstrap site</title> <description><![CDATA[Easy to Install Simply download the CSS file from the swatch of your choice and replace the one in Bootstrap. No messing around with hex values. Whole New Feel We've all been there with the black bar and blue buttons. See how a splash of color and typography can transform the feel of your site. Modular Changes are contained in just two LESS files, enabling modification and ensuring forward compatibility.]]></description> <pubDate>3 hours ago</pubDate> <score>196 points</score> <user>parkov</user> <comments>30 comments</comments> <id>3594540</id> <discussion>http://news.ycombinator.com/item?id=3594540</discussion> <link>http://bootswatch.com</link> </item> <item> <id>f1</id> <title>Louis CK inspires Jim Gaffigan to sell comedy special for $5 online</title> <description><![CDATA[Dear Internet Friends,Inspired by the brilliant Louis CK, I have decided to debut my all-new hour stand-up special on my website, Jimgaffigan.com.Beginning sometime in April, “Jim Gaffigan: Mr. Universe” will be available exclusively for download for only $5. A dollar from each download will go directly to The Bob Woodruff Foundation; a charity dedicated to serving injured Veterans and their families.I am confident that the low price of my new comedy special and the fact that 20% of each $5 download will be donated to this very noble cause will prevent people from stealing it. Maybe I’m being naïve, but I trust you guys.]]></description> <pubDate>57 minutes ago</pubDate> <score>25 points</score> <user>rkudeshi</user> <comments>4 comments</comments> <id>3595285</id> <discussion>http://news.ycombinator.com/item?id=3595285</discussion> <link>http://www.whosay.com/jimgaffigan/content/218011</link> </item> And here's an example of incorrect output. Note that the elements are not empty, thus I cannot seem to catch the error and simply jump to the next item. Everything past the promotion post will break: <item> <id>f14</id> <title>Build the next Legos: We're hiring an iOS Developer & Web Developer (YC S11)</title> <description><![CDATA[Interested in building the next generation of toys on digital devices such as the iPad? That’s what we’re doing here at Launchpad Toys with apps like Toontastic (Named one of the “Top 10 iPad Apps of 2011” by the New York Times and was recently added to the iTunes Hall of Fame) and an awesom]]><![CDATA[e suite of others we have under development. We’re looking for creative and playful coders that have made games or highly visual apps/sites in the past for our two open development positions. As a kid, you probably played with Legos endlessly and grew up to be a hacker because you still love building things. Sounds like you? Email us at howdy#launchpadtoys.com with a couple links to some projects and code that we can look at along with your resume.]]></description> <pubDate>2 hours ago</pubDate> <score>14 points</score> <user>bproper</user> <comments>7 comments</comments> <id>3594944</id> <discussion>http://news.ycombinator.com/item?id=3594944</discussion> <link>http://launchpadtoys.com/blog/2012/02/iosdeveloper-webdeveloper/</link> </item> <item> <id>f15</id> <title>SOPA foe Fred Wilson supports a blacklist on pirate sites</title> <description><![CDATA[VC Fred Wilson says Google, Bing, Facebook, and Twitter should warn people when they try to log in at known pirate sites: "We don't need legislation." Fred Wilson says: If they try to pass antipiracy legislation, it will once again be 'war.' (Credit: Greg Sandoval/CNET) Fred Wilson, a well-known ven]]><![CDATA[ture capitalist from New York, says he's in favor of creating a blacklist for Web sites found to traffic in pirated films, music, and other intellectual property. The co-founder of Union Square Ventures told a gathering of media executives at the Paley Center for Media yesterday that he believes a good antipiracy measure would be for Google, Twitter, Facebook, and other major sites to issue warnings to people when they try to connect with a known pirate site. Fred Wilson, a co-founder of Union Square Ventures, says 'Our children have been taught to steal.' (Credit: Union Square Ventures) Wilson favors establishing an independent group to create a "black and white list." "The blacklist are those sites we all know are bad news," he told the audience in New York.]]></description> <pubDate>14 points by bproper 2 hours ago | 7 comments</pubDate> <score>24 points</score> <user>andrewcross</user> <comments>12 comments</comments> <id>3594558</id> <discussion>http://news.ycombinator.com/item?id=3594558</discussion> <link>http://news.cnet.com/8301-31001_3-57377862-261/post-sopa-influential-tech-investor-favors-blacklisting-pirate-sites/</link> </item> So here's my question: How can I handle a situation where a particular element is missing and find() doesn't throw an error? Do I have to start from scratch, or is there a better approach in scraping the HN front page? For anyone curious, here's the whole XML file: http://thequeue.org/api/tc.xml
You have to work by chunks in order to handle that, there seems to be a dummy spacer element that can help you with that: $news = preg_split('/<tr style="height:5px"><\/tr>/',$html->find('tbody',2)->innertext); And then use subselectors: foreach($news as $article){ $article = str_get_html($article) // No upvote arrow found so its not a valid article if(count($article->find('img')) === 0){ continue; } } And for the other elements you use the same selectors
We'll thanks to Ivan's trail of thought, I am now splitting the initially scraped HTML into an array, each node representing a post. Then, going through every single post in a loop, I'll check if the up voting arrow image exists. If not, I'll not add it to the result. In the end everything will be stitched back together and the sponsored post is left out. Here's the code: $array = explode('<tr style="height:5px"></tr>',$html); foreach ($array as $post) { if (!strstr($post,'grayarrow.gif')){}else{ $clean .= $post; } } unset($array); $html = str_get_html($clean.'</body></html>');
PHP Markdown tagging last chunk of content as h3
I'm using PHP Markdown (version 1.0.1n, updated October 2009) to display text saved to a database in markdown format. I'm running into a strange issue where it's tagging the last chunk of every entry as an H3. When I search the markdown.php file, though, there isn't a single instance of H3. Here are two pieces of text from my database: Since its launch, major CPG brands, endemic as well as non-endemic, have flocked to retail websites to reach consumers deep in the purchase funnel through shopping media. In this session, you will hear about: - The prioritization of shopping media for CPG brands. - A case study of brands on Target.com on how this retailer (and others) have introduced a new channel for brand marketers to engage consumers where they are making the majority of purchase decisions: online. - How CPG brands are leveraging real-time data from shopping media to capture consumer insights and market trends. In this one, it is tagging the LI items correctly, but inside the final LI it's tagging the actual text as H3. Beyond the actual money she saves, this consumer is both empowered and psychologically gratified by getting the best value on her everyday purchases. It is essential for both marketers and retailers to focus on what motivates and activates this consumer. Diane Oshin will share insights on what influences her shopping behavior and then identify specific tools that activate her to buy. In this one, the entire paragraph starting with Diane Oshin is tagged as an H3. Here's the really odd thing: when I do a view source, both of them are tagged correctly; it's only when using Inspect Element that I see the H3. However, it's obvious in the actual display that the H3 tag is being applied: example 1 example 2 Can anyone help me out? update Per a comment below, I looked for instances of H tags. I found these functions, but don't know if this is what could be causing the issue or not. They are the only place in the entire file that appears to be creating a header tag of any kind. function doHeaders($text) { # Setext-style headers: # Header 1 # ======== # # Header 2 # -------- # $text = preg_replace_callback('{ ^(.+?)[ ]*\n(=+|-+)[ ]*\n+ }mx', array(&$this, '_doHeaders_callback_setext'), $text); # atx-style headers: # # Header 1 # ## Header 2 # ## Header 2 with closing hashes ## # ... # ###### Header 6 # $text = preg_replace_callback('{ ^(\#{1,6}) # $1 = string of #\'s [ ]* (.+?) # $2 = Header text [ ]* \#* # optional closing #\'s (not counted) \n+ }xm', array(&$this, '_doHeaders_callback_atx'), $text); return $text; } function _doHeaders_callback_setext($matches) { # Terrible hack to check we haven't found an empty list item. if ($matches[2] == '-' && preg_match('{^-(?: |$)}', $matches[1])) return $matches[0]; $level = $matches[2]{0} == '=' ? 1 : 2; $block = "<h$level>".$this->runSpanGamut($matches[1])."</h$level>"; return "\n" . $this->hashBlock($block) . "\n\n"; } function _doHeaders_callback_atx($matches) { $level = strlen($matches[1]); $block = "<h$level>".$this->runSpanGamut($matches[2])."</h$level>"; return "\n" . $this->hashBlock($block) . "\n\n"; }
I could not reproduce what you describe with the version you've been given: <?php include(__DIR__.'/php-markdown/markdown.php'); $testText = 'Since its launch, major CPG brands, endemic as well as non-endemic, have flocked to retail websites to reach consumers deep in the purchase funnel through shopping media. In this session, you will hear about: - The prioritization of shopping media for CPG brands. - A case study of brands on Target.com on how this retailer (and others) have introduced a new channel for brand marketers to engage consumers where they are making the majority of purchase decisions: online. - How CPG brands are leveraging real-time data from shopping media to capture consumer insights and market trends. '; $resultText = Markdown($testText); var_dump($resultText); The output looks fairly as you might expect it string(649) "<p>Since its launch, major CPG brands, endemic as well as non-endemic, have flocked to retail websites to reach consumers deep in the purchase funnel through shopping media. In this session, you will hear about:</p> <ul> <li><p>The prioritization of shopping media for CPG brands.</p></li> <li><p>A case study of brands on Target.com on how this retailer (and others) have introduced a new channel for brand marketers to engage consumers where they are making the majority of purchase decisions: online.</p></li> <li><p>How CPG brands are leveraging real-time data from shopping media to capture consumer insights and market trends.</p></li> </ul> " I assume something else tampering the data before it get's into the markdown parser or afterwards. But based on the data, the markdown parser does not create the <h3> tags. You must look somewhere else :(