The Players resource will return limited information about the players, this is primarily used to get the internal player ID. Information returned to you will include player name, player position, date of birth, and most importantly, the player ID.
Players with any characters other than those from the alphabet are not included. For example, J.J. Hickson is simply JJ Hickson, and Michael Kidd-Gilchrist is Michael KiddGilchrist.
Integer. The current team ID for the player.
Integer. The player ID for the player.
String. The first name of the NBA player.
String. The last name of the NBA player.
String. The position of the NBA player. Guard, Forward, or Center. Players that play two of these positions will appear in both categories.
<?php $url = 'http://api.probasketballapi.com/player'; $api_key = '__YOUR__API__KEY__'; $query_string = 'api_key='.$api_key.'&first_name=Kevin&last_name=Durant'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, $query_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $result = curl_exec($ch); curl_close($ch); echo $result; ?>