Skip to content

Instantly share code, notes, and snippets.

@kelunik
Last active June 24, 2017 11:01
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 kelunik/c981c655618c2536f4178ed8de9eabb1 to your computer and use it in GitHub Desktop.
Save kelunik/c981c655618c2536f4178ed8de9eabb1 to your computer and use it in GitHub Desktop.
<?php
$opts = [
"http" => [
"header" => "User-Agent: kelunik"
]
];
$context = stream_context_create($opts);
$repos = json_decode(file_get_contents("https://api.github.com/users/amphp/repos", false, $context));
foreach ($repos as $repo) {
echo $repo->name . PHP_EOL;
}
aerys
aerys-reverse
aerys-session
✔ amp
✔ amphp.github.io (no tag)
artax
✔ beanstalk
✔ byte-stream
✔ cache
✔ design (no tag)
✔ dns
✔ file
✔ getting-started (no tag)
✔ hello-world (deleted)
✔ loop (deprecated, delete?)
mysql
✔ parallel
✔ parser
✔ phpunit-util
✔ postgres
✔ process
✔ react-adapter
✔ redis
✔ socket
stomp
✔ template (no tag)
✔ thread (deprecated)
✔ uri
✔ website-shared (no tag)
websocket
✔ windows-registry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment