Skip to content

Instantly share code, notes, and snippets.

@radiofrequency
Created August 30, 2016 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save radiofrequency/1134aa06c35abf475323154123fed606 to your computer and use it in GitHub Desktop.
Save radiofrequency/1134aa06c35abf475323154123fed606 to your computer and use it in GitHub Desktop.
<?php
$all_links = file_get_contents("/home/fizz/Downloads/export-links.json");
$post_id = rand(1, 1500);
$spin_text = ['Funny', 'Awesome', 'New', 'Cute']
$spin = $post_id % $spin_text.length;
$json_puke = json_decode($all_links, true);
echo ucwords(strtolower($json_puke[$post_id][0]['title'])) . $spin_text[$spin] .' Chat Stickers' ; //[$post_id]; //[0]['url'];
echo '</br>';
print_r($json_puke[$post_id][0]['url']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment