Website scraping, PHP, Javascript
Budget: $30 – $250 USD
We are looking for a way to automatically load an XML file from the WIPO PatentScope website.
For example, go to https://patentscope.wipo.int/search/en/detail.jsf?docId=WO2020234740
click the "Documents" tab and one of the results will be an XML file. The file has an odd long URL, e.g. https://patentscope.wipo.int/search/docs2/iasr/WO2020234740/xml/YsBIAWAae968PPs5bnXfmohLSKG07fuejtk8DLhkiMEpH_VMYqmlS_1kWF0SL99FBvUHwI6q-dXXWbbNS8hBKLBWNwacqvyBLofY4AkHQKqzSCFpU7mX4oNqUfFXNpdS
We used to be able to copy the link directly from https://patentscope.wipo.int/search/en/detail.jsf?docId=WO2020234740. But now the page uses repeated Javascript calls to load each tab separately.
What we are looking for:
Basic PHP code that can load the content of the XML file into a variable based on the publication number.
$pubno="WO2020234740";
$url='https://patentscope.wipo.int/search/en/detail.jsf?docId='.$pubno;
// Your magic happens here
$html=file_get_contents($url, false, $context);
// $html should now be the content of the XML file
Delivery: Working PHP code
For example, go to https://patentscope.wipo.int/search/en/detail.jsf?docId=WO2020234740
click the "Documents" tab and one of the results will be an XML file. The file has an odd long URL, e.g. https://patentscope.wipo.int/search/docs2/iasr/WO2020234740/xml/YsBIAWAae968PPs5bnXfmohLSKG07fuejtk8DLhkiMEpH_VMYqmlS_1kWF0SL99FBvUHwI6q-dXXWbbNS8hBKLBWNwacqvyBLofY4AkHQKqzSCFpU7mX4oNqUfFXNpdS
We used to be able to copy the link directly from https://patentscope.wipo.int/search/en/detail.jsf?docId=WO2020234740. But now the page uses repeated Javascript calls to load each tab separately.
What we are looking for:
Basic PHP code that can load the content of the XML file into a variable based on the publication number.
$pubno="WO2020234740";
$url='https://patentscope.wipo.int/search/en/detail.jsf?docId='.$pubno;
// Your magic happens here
$html=file_get_contents($url, false, $context);
// $html should now be the content of the XML file
Delivery: Working PHP code