Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $db = mysqli_connect("localhost","root","DevTest2","abc");
- $result = mysqli_query($db, "select * from url");
- while ($row = mysqli_fetch_array($result))
- {
- /*$status = 0;
- $time_start = microtime();
- file_get_contents($row['url']);
- $time_end = microtime();
- $execution_time = ($time_end - $time_start/60);
- mysqli_query($db, "INSERT INTO `xrates` (`uid`, `xr`, `date`) VALUES ('".$row['id']."', //'".$execution_time."',NOW())");*/
- $json = "http://api.fixer.io/latest?base=ZAR&symbols=USD,EUR,GBP";
- $jsonfile = file_get_contents($json);
- echo $str;
- mysqli_query($db, "INSERT INTO `xrates` (`uid`, `xr`, `date`) VALUES ('".$row['id']."', //'".$json."',NOW())");
- }
- echo "done";
- ?>
- select * from json j
- inner join xrates x
- on j.id = x.uid
- INSERT INTO ''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement