Skip to content

Commit ce80232

Browse files
Merge pull request #27 from whotooktwarden/master
Create IRBA and update Fetch script
2 parents 15f2780 + 72fc276 commit ce80232

File tree

2 files changed

+78
-5
lines changed

2 files changed

+78
-5
lines changed

fetch.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@
3737
//multiply the result of $xrp by the result of $exchangeRate to find $cadxrprate
3838
//CA:\s[0-9.]{2,} first match
3939

40-
$content2 = file_get_contents("http://www.bankofcanada.ca/stats/assets/rates_rss/closing/en_USD_CLOSE.xml");
41-
$cadpattern = '/CA:\s[0-9.]{2,}/';
42-
$findcad = '/[0-9.]{2,}/';
40+
$content2 = file_get_contents("http://www.xe.com/currencyconverter/convert/?Amount=1&From=USD&To=CAD");
41+
//echo $content2;
42+
$cadpattern = '/[0-9](.\d*) CAD/';
43+
$findcad = '/[0-9](.\d*)/';
4344

4445
preg_match($cadpattern, $content2, $cadmatch);
4546
$thereturn = json_encode($cadmatch); //converts the array to a string
@@ -54,10 +55,10 @@
5455
$findme = '"'; //looks for the ending portion of the data-usd string from coinmarketcap.com
5556
$pos = strpos($cadstr, $findme); //Find the position of the above string in the matched case
5657
//echo "pos: $pos <br />"; //displays the position
57-
$cad = substr($cadstr, ($pos+1), 6); //Gets up to 10 digits of data from the data-usd field
58+
$cad = substr($cadstr, ($pos+1), 6); //Gets up to 7 digits of data from the data-usd field
5859
//echo "cadstr: $cadstr <br />"; // displays it to the user
5960
//echo "cad: $cad <br />"; // displays it to the user
60-
echo "The CAD to USD exchange rate is currently $cad USD per CAD.<br />"; //returns XRP with USD price
61+
echo "The USD/CAD exchange rate is currently $cad CAD per USD.<br />"; //returns XRP with USD price
6162

6263
$xrpincad = $xrp * $cad;
6364

irba.php

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<!DOCTYPE html>
2+
<html class="no-js">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6+
<title>XAGATE :: Money should be simple :: XAG, NXT, XRP</title>
7+
<meta name="description" content="">
8+
<meta name="viewport" content="width=device-width, initial-scale=1">
9+
10+
<link rel="stylesheet" href="css/bootstrap.min.css">
11+
<style>
12+
body {
13+
padding-top: 50px;
14+
padding-bottom: 20px;
15+
}
16+
</style>
17+
<link rel="stylesheet" href="css/bootstrap-theme.min.css">
18+
<link rel="stylesheet" href="css/main.css">
19+
20+
<script></script>
21+
22+
<script src="js/vendor/modernizr-2.6.2-respond-1.1.0.min.js"></script>
23+
</head>
24+
<body>
25+
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
26+
<div class="container">
27+
<div class="navbar-header">
28+
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
29+
<span class="sr-only">Toggle navigation</span>
30+
<span class="icon-bar"></span>
31+
<span class="icon-bar"></span>
32+
<span class="icon-bar"></span>
33+
</button>
34+
<a class="navbar-brand" href="index.php">XAGATE</a><a class="navbar-brand" href="withdrawals.php">Withdraw XAG</a><a class="navbar-brand" href="cryptodeposits.php">Deposit Cryptocurrency</a><a class="navbar-brand" href="withdrawcrypto.php">Withdraw Cryptocurrency</a><a class="navbar-brand" href="depositcad.php">Deposit CAD$</a><a class="navbar-brand" href="withdrawcad.php">Withdraw CAD$</a><a href="pms.php">Other Precious Metals</a>
35+
</div>
36+
<div class="navbar-collapse collapse">
37+
38+
</div><!--/.navbar-collapse -->
39+
</div>
40+
</div>
41+
42+
<p><u><a href="https://xagate.com/tos.php">Terms of Service, Fee Schedule, and Profit-Sharing Asset Terms of Service</a></u></p>
43+
44+
<p><u>Management</p></u>
45+
46+
<p>XAGATE is a sole proprietorship operated by Taylor Warden. Interested individuals may email any inquires to taylor.warden@sympatico.ca.</p>
47+
<p><a href="https://forum.ripple.com/memberlist.php?mode=viewprofile&u=15053">Official Ripple Forum Profile</a></p>
48+
<p><a href="https://xrptalk.org/user/7216-thewarden/">XRPtalk.org Profile</a></p>
49+
<p><a href="github.com/whotooktwarden">GitHub Profile</a></p>
50+
<p><a href="https://www.bountysource.com/people/33455-twarden">Bountysource Profile</a></p>
51+
52+
<p><u>Business License</u></p>
53+
54+
<p>Our business license, granted under Ontario, Canada, can be viewed <a href="/XagateRegistration.pdf">here</a>.</p>
55+
56+
<p><u><a href="https://xagate.com/blog/index.php/category/gateway-audit/">Gateway Audits</a></p></u>
57+
58+
<footer>
59+
<p>&copy; XAGATE 2014</p><p><a href="/tos.php">ToS</a></p>
60+
</footer>
61+
</div> <!-- /container --> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
62+
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.11.0.min.js"><\/script>')</script>
63+
64+
<script src="js/vendor/bootstrap.min.js"></script>
65+
66+
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
67+
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.1.min.js"><\/script>')</script>
68+
69+
<script src="js/main.js"></script>
70+
71+
</body>
72+
</html>

0 commit comments

Comments
 (0)