Advertisement
Whistik

Untitled

Jul 11th, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.36 KB | None | 0 0
  1. function getContent($url, $data){
  2.     $data = $data[0];
  3.     $params = "";
  4.     foreach ($data as $key => $value) {
  5.         $glue = empty($params) ? '?' : '&';
  6.         $params .=  $glue . $key . '=' . $value;
  7.     }
  8.     print_r( file_get_contents($url . $params) );
  9. }
  10.  
  11. getContent("http://api.varionity.cz/coins.php", array(["typ" => "one", "nick" => "Whistik", "token" => "27NdNVD9H8"]));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement