-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
45 lines (43 loc) · 1.48 KB
/
Copy pathindex.php
File metadata and controls
45 lines (43 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!DOCTYPE html>
<!-- woshindex V1.6: bu yazılım Dr. Zafer Akçalı tarafından oluşturulmuştur
programmed by Zafer Akçalı, MD -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ResearcerID'den atıfları getirir</title>
</head>
<body>
<?php
$rid = '';
$hindex = '';
if (isset($_POST['rid'])) {
$rid=trim($_POST['rid']);
if ($rid =='' )
exit ('ResearcherId gelmedi');
$preText="https://publons.com/wos-op/api/stats/individual/";
$postText="/";
$url=$preText.$rid.$postText;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response=curl_exec($ch);
curl_close($ch);
// print_r($response);
$citations = (json_decode($response, true));
$hindex.= 'ResearcherID='.$rid.'<br/>';
$hindex.= 'h-index='.$citations['hIndex'].'<br/>';
$hindex.= 'sum of times cited='.$citations['timesCited'].'<br/>';
$hindex.= 'publications in wos='.$citations['numPublicationsInWosCc'].'<br/>';
foreach( array_reverse ($citations['citationsPerYear'], true) as $year=>$citation) {
if($citation !== '0' )
$hindex.= $citation.' citation(s) in year '.$year.'<br/>';
}
}
?>
<form method="post" action="">
ResearcherId giriniz<br/>
<input type="text" name="rid" id="rid" >
<input type="submit" value="Atıf bilgilerini PHP ile getir">
</form>
<?php echo $hindex;?>
</body>