MIT License | |||||
Copyright (c) 2021 Simon Bowie <ad7588@coventry.ac.uk> | |||||
Permission is hereby granted, free of charge, to any person obtaining a copy | |||||
of this software and associated documentation files (the "Software"), to deal | |||||
in the Software without restriction, including without limitation the rights | |||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |||||
copies of the Software, and to permit persons to whom the Software is furnished | |||||
to do so, subject to the following conditions: | |||||
The above copyright notice and this permission notice (including the next | |||||
paragraph) shall be included in all copies or substantial portions of the | |||||
Software. | |||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | |||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS | |||||
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | |||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF | |||||
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
<?php | <?php | ||||
# @name: ops_api.php | |||||
# @version: 0.1 | |||||
# @creation_date: 2021-09-24 | |||||
# @license: The MIT License <https://opensource.org/licenses/MIT> | |||||
# @author: Simon Bowie <ad7588@coventry.ac.uk> | |||||
# @purpose: Performs functions against the European Patent Office's Open Patent Services (OPS) API | |||||
# @acknowledgements: | |||||
# OPS documented at https://www.epo.org/searching-for-patents/data/web-services/ops.html | |||||
# OPS RESTful API specification at http://documents.epo.org/projects/babylon/eponet.nsf/0/F3ECDCC915C9BCD8C1258060003AA712/$File/ops_v3.2_documentation_-_version_1.3.16_en.pdf | |||||
# OPS API functions list at https://developers.epo.org/ops-v3-2/apis | |||||
function get_access_token() { | function get_access_token() { | ||||
// OPS API credentials (details at http://documents.epo.org/projects/babylon/eponet.nsf/0/F3ECDCC915C9BCD8C1258060003AA712/$File/ops_v3.2_documentation_-_version_1.3.16_en.pdf) | // OPS API credentials (details at http://documents.epo.org/projects/babylon/eponet.nsf/0/F3ECDCC915C9BCD8C1258060003AA712/$File/ops_v3.2_documentation_-_version_1.3.16_en.pdf) |
<?php | <?php | ||||
# @name: index.php | |||||
# @version: 0.1 | |||||
# @creation_date: 2021-09-24 | |||||
# @license: The MIT License <https://opensource.org/licenses/MIT> | |||||
# @author: Simon Bowie <ad7588@coventry.ac.uk> | |||||
# @purpose: Home page for the application | |||||
include '../random.php'; | include '../random.php'; | ||||
include '../ops_api.php'; | include '../ops_api.php'; | ||||
?> | ?> | ||||
Document reference no.: | |||||
<?php | |||||
echo $random_record['doc_ref']; | |||||
?> | |||||
<br><br> | |||||
<?php | |||||
if (get_publication_details($random_record['doc_ref'])): | |||||
?> | |||||
<br><br> | |||||
<?php | |||||
endif; | |||||
?> | |||||
Application ID: | Application ID: | ||||
<?php | <?php | ||||
echo $random_record['abstract']; | echo $random_record['abstract']; | ||||
?> | ?> | ||||
<br><br> | |||||
<?php | |||||
if (get_publication_details($random_record['doc_ref'])): | |||||
?> | |||||
<br><br> | |||||
<?php | |||||
endif; | |||||
?> |