Github API request using curl (PHP)

426
January 08, 2017, at 10:32 PM

I'm trying to get Github API json response from the following url but seems like I'm making petitions to the wrong url.

$url = 'https://api.github.com/repos/user/project_name/commits?access_token=absbfdf23425565335';
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, $url);
$result = curl_exec($ch);
curl_close($ch);
$obj = json_decode($result);

I never used curl before, so it is the right way to make a petition and get the returned json? I tested searching for the url with my own info (username, acces_token and project_name) and the respond its a valid json.

Rent Charter Buses Company
READ ALSO
Showing What Files Cause Error in PHP error_log

Showing What Files Cause Error in PHP error_log

My error_log file gives me this lines of error message, but it doesn't tell me what file cause this :

274
dynamic checkbox list using php, html, css [on hold]

dynamic checkbox list using php, html, css [on hold]

I need to make a list of check-boxes, like you would find in your Email inbox: Dynamic size and the info displayed is brought from the databasethis is an example of what i need I am using html, PHP, and CSS

343
Display data from multiple tables in PHP

Display data from multiple tables in PHP

I have two tables - USERSS and ZPATECNII have the following code, but after this, nothing is displaying

356
$result->fetch_all(MYSQLI_ASSOC) returns nothing

$result->fetch_all(MYSQLI_ASSOC) returns nothing

I'm trying to create a JSON callbackI got two files, json

257