GithubHelp home page GithubHelp logo

trdizingetir's Introduction

trdizingetir

displays article information if trdizin article number is known

fetches utf-8 html form url

$preText="https://search.trdizin.gov.tr/yayin/detay/";
$url = $preText.$gelenTrdizin;
$opts = array('http' => array('header' => 'Accept-Charset: UTF-8, *;q=0'));
$context = stream_context_create($opts);
$html=file_get_contents($url, false, $context);

reads metadata from

$volumeMeta='meta name="DC.Source.Volume" content="';
$issueMeta='meta name="DC.Source.Issue" content="';
$issnMeta='<meta name="DC.Source.ISSN" content="';
$titleMeta='meta name="DC.Title" content="';
$journalMeta='meta name="citation_journal_title" content="';
$abstractMeta='meta name="citation_abstract" content="';
$trdizinMeta='"DC.Identifier" content="';
$yearMeta='meta name="citation_publication_date" content="';
$doiMeta='<meta name="citation_doi" content="';
$ilksayfaMeta='"pageStart": "';
$sonsayfaMeta='"pageEnd": "';
$belgeMeta='Belge Türü:</span>';
$makaleMeta='Makale Türü:</span>';

was reading authors from metas (unfortunately sort order is wrong)

$metas = $doc->getElementsByTagName('meta');
foreach ($metas as $meta) {
  if (strtolower($meta->getAttribute('name')) == 'citation_author') {

now reads authors from web page (sorted)

$divs= $doc->getElementsByTagName('div');
foreach ($divs as $div) {
  if (strtolower($div->getAttribute('class')) == 'new') {
    $isimsoyisim = trim($div->getElementsByTagName('a')->item(0)->nodeValue);

displays metadata

unfortunately, below code also corrupted Turkish characters on some servers, so i need to install mbstring extension

$opts = array('http' => array('header' => 'Accept-Charset: UTF-8, *;q=0'));
$context = stream_context_create($opts);
$html=file_get_contents($url, false, $context);

trdizingetir's People

Contributors

zakcali avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.