Rev 159 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 159 | Rev 164 | ||
|---|---|---|---|
| Line 773... | Line 773... | ||
| 773 | $dbres = $res->fetchAll(MDB2_FETCHMODE_ASSOC); |
773 | $dbres = $res->fetchAll(MDB2_FETCHMODE_ASSOC); |
| 774 | 774 | ||
| 775 | if ($dbres[0]['links']) { |
775 | if ($dbres[0]['links']) { |
| 776 | $links = explode('|', $dbres[0]['links']); |
776 | $links = explode('|', $dbres[0]['links']); |
| 777 | } else { |
777 | } else { |
| - | 778 | $db->query("DELETE FROM locum_syndetics_links WHERE isbn = '$isbn' AND updated < DATE_SUB(NOW(), INTERVAL 2 MONTH)"); |
|
| 778 | $xmlurl = "http://www.syndetics.com/index.aspx?isbn=$isbn/index.xml&client=$cust_id&type=xw10"; |
779 | $xmlurl = "http://www.syndetics.com/index.aspx?isbn=$isbn/index.xml&client=$cust_id&type=xw10"; |
| 779 | $xmlraw = file_get_contents($xmlurl); |
780 | $xmlraw = file_get_contents($xmlurl); |
| 780 | if (!preg_match('/error/', $xmlraw)) { |
781 | if (!preg_match('/error/', $xmlraw)) { |
| 781 | // record found |
782 | // record found |
| 782 | $xmlobj = (array) simplexml_load_string($xmlraw); |
783 | $xmlobj = (array) simplexml_load_string($xmlraw); |