Page Menu
Home
GitPull.it
Search
Configure Global Search
Log In
Files
F15174134
git.json.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Unknown
Size
452 B
Referenced Files
None
Subscribers
None
git.json.php
View Options
<?php
header
(
'Content-Type: application/json'
)
;
$cmd
=
"git log -1"
;
exec
(
$cmd
.
" 2>&1"
,
$output
,
$return_val
)
;
$obj
=
new
stdClass
(
)
;
$obj
->
output
=
$output
;
foreach
(
$output
as
$value
)
{
preg_match
(
"/Date:(.*)/i"
,
$value
,
$match
)
;
if
(
!
empty
(
$match
[
1
]
)
)
{
$obj
->
date
=
strtotime
(
$match
[
1
]
)
;
$obj
->
dateString
=
trim
(
$match
[
1
]
)
;
$obj
->
dateMySQL
=
date
(
"Y-m-d H:i:s"
,
$obj
->
date
)
;
}
}
echo
json_encode
(
$obj
)
;
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Thu, Nov 19, 02:13 (1 d, 8 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2262724
Default Alt Text
git.json.php (452 B)
Attached To
Mode
R58 TurboFlop
Attached
Detach File
Event Timeline