forked from falconsw/btcturk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
61 lines (51 loc) · 2.18 KB
/
index.php
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
/*
BTCTürk Order/Withdraw/Deposit RSS Feed v1.0
Credits: CryptoYakari @CryptoYakari
Reqierments :
PHP Host
Demo Page: https://robostopia.com/btcturk/
This script generates an RSS Feed for your latest BTCTürk Order/Withdraw/Deposit
You can use this RSS feed with IFTTT.com and easily integrate
RSS -> Telegram or RSS->Email
Once your order completed you will get notification.
*/
include("src/Client.php");
$key = 'YOUR_API_KEY';
$secret = 'YOUR_API_SECRET';
$b = new Client ($key, $secret);
$transactions = json_decode(json_encode($b->getUserTransactions()), True);
$recordcount = Count($transactions);
//var_dump ($transactions);
header('Content-type: application/xml');
echo
'<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Robostopia Spam Check Feed</title>
<description>BTCTurk Transactions RSS Feed</description>
<link>https://robostopia.com/btcturk/</link>
<copyright>Kaan Dogan</copyright>
<atom:link href="https://robostopia.com/btcturk/" rel="self" type="application/rss+xml" />
';
For ($i = 0; $i < $recordcount; $i++) { // CHECK ALL ENTRIES
$amount = $transactions[$i]["amount"];
$currency = $transactions[$i]["currency"];
$transaction_date = strtotime($transactions[$i]["date"]);
$id = $transactions[$i]["id"];
If ($amount > 0){$buysell = ' alış';}Else {$buysell = ' satış';}
If ($transactions[$i]["operation"] === "deposit"){$operation = ' yatırma işlemi gerçekleşti.';$desc = 'İşleminiz ';}
If ($transactions[$i]["operation"] === "withdraw"){$operation = ' çekme işlemi gerçekleşti.';$desc = 'İşleminiz ';}
If ($transactions[$i]["operation"] === "trade"){$operation = $buysell . ' emriniz gerçekleşti.';$desc = 'İşleminiz ' . $transactions[$i]["price"] . ' birim fiyatından ';}
Echo '<item>
<title>BTCTürk '. abs($amount) . ' ' . $currency . $operation .'</title>
<description>'.$desc.date('d.m.Y H:i:s',$transaction_date).' tarihinde gerçekleşmiştir.</description>
<link>https://robostopia.com/btcturk/'.$amount.'</link>
<pubDate>'.date(DATE_RSS,$transaction_date).'</pubDate>
<guid isPermaLink="false">'.$amount.'</guid>
</item>
';
} Echo
'
</channel>
</rss>';
?>