Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $url = "http://www.reddit.com/user/MattRichardson/about.json";
- $str = file_get_contents($url);
- $val = json_decode($str);
- echo $val->data->link_karma;
- $myFile = "reddit-" . date("Ymd"). ".txt";
- $fh = fopen($myFile, 'w') or die("can't open file");
- fwrite($fh, $val->data->link_karma);
- fclose($fh);
- ?>
Add Comment
Please, Sign In to add comment