-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathphp.php
More file actions
47 lines (44 loc) · 2.37 KB
/
php.php
File metadata and controls
47 lines (44 loc) · 2.37 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
46
47
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="Use DeviantArt's RSS/XML feeds as a CMS to dynamically embed deviation galleries on your website"/>
<meta name="author" content="James Alexander Lee"/>
<title>deviantART-API</title>
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body>
<h1>deviantART-API</h1>
<p><a href="https://github.com/jamesl1001/deviantART-API" target="_blank">https://github.com/jamesl1001/deviantART-API</a></p>
<h2>PHP | <a href="javascript">JavaScript</a></h2>
<p>Use DeviantArt's RSS/XML feeds as a CMS to dynamically embed deviation galleries on your website.</p>
<p>Feed: <a href="https://backend.deviantart.com/rss.xml?q=gallery:fu51on/27123391" target="_blank">https://backend.deviantart.com/rss.xml?q=gallery:fu51on/27123391</a></p>
<hr>
<div class="deviations">
<?php
require_once('getDeviations.php');
$deviations = getDeviations('https://backend.deviantart.com/rss.xml?q=gallery:fu51on/27123391');
foreach($deviations as $key => $deviation): ?>
<div class="deviation">
<div class="col col-p">
<a href="<?= $deviations[$key]->url; ?>"><h2><?= $deviations[$key]->title; ?></h2></a>
<img src="<?= $deviations[$key]->image; ?>" alt="<?= $deviations[$key]->title; ?>" class="deviation_image"/>
<p>Thumbnail src: <a href="<?= $deviations[$key]->thumbS; ?>">150px</a> | <a href="<?= $deviations[$key]->thumbL; ?>">300px</a>
</div>
<div class="col col-s">
<h2>Deviation Info</h2>
<p><small><?= $deviations[$key]->date; ?></small></p>
<p><strong><?= $deviations[$key]->desc; ?></strong></p>
<p>Rating: <?= $deviations[$key]->rating; ?></p>
<p>Category: <a href="http://browse.deviantart.com/<?= $deviations[$key]->categoryUrl; ?>"><?= $deviations[$key]->category; ?></a></p>
<p>By <a href="<?= $deviations[$key]->deviantUrl; ?>"><?= $deviations[$key]->deviantName; ?></a></p>
<img src="<?= $deviations[$key]->deviantAvatar; ?>"/>
<p><?= $deviations[$key]->copyright; ?></p>
</div>
</div>
<?php
endforeach;
?>
</div>
</body>
</html>