File: github.php

package info (click to toggle)
php-httpful 1.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 388 kB
  • sloc: php: 1,677; xml: 20; makefile: 11
file content (9 lines) | stat: -rw-r--r-- 300 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
<?php
// XML Example from GitHub
require('Httpful/autoload.php');
use \Httpful\Request;

$uri = 'https://github.com/api/v2/xml/user/show/nategood';
$request = Request::get($uri)->send();

echo "{$request->body->name} joined GitHub on " . date('M jS', strtotime($request->body->{'created-at'})) ."\n";