0

My question is simple!
I could see how a github file on text in mode?
I just need to compare the contained of github file.

Would you know how to do with php?

Julien
  • 1,946
  • 3
  • 33
  • 51
  • While your question is indeed simple, I fail to understand it. Do you mean you want to get the raw contents of a file in github from a php script ? – SirDarius Feb 14 '13 at 00:44
  • @SirDarius yes! I am looking for a way to recover a file contained github, not by any means import (get file content, curl ....) I just want to know how to view a file in text (from github) – Julien Feb 14 '13 at 00:47

1 Answers1

1

Github has pretty straightforward urls when it comes to raw files. See this example:

https://raw.github.com/libgit2/libgit2/development/CMakeLists.txt

So as long as you know the path to a file in a github project, you can use the special raw.github.com hostname, and read the contents from PHP.

SirDarius
  • 41,440
  • 8
  • 86
  • 100