How to parse github readme.md raw file content in php

I need to parse readme.md file content using php to display content of my readme.md file.

for example I have below link for my readme.md raw file on github.

Read More

https://raw.githubusercontent.com/makadiyaharesh/CLImageEditor/master/README.md

I already fetch the content of file but need to display on my website using PHP code.

Currently when i display this content that is not formatted.

Please help me to do that.

1) Read the full file content.

2)Display that content using php and display in proper formatted view as show on github.

Sorry for my english.

Please help…
Thanks in advance…

Related posts

Leave a Reply

1 comment

  1. .md files uses markdown syntax. you will need a markdown parser for this.
    check out – parsedown
    hope it will help.

    include('Parsedown.php');
    $contents = file_get_contents('README.md');
    $Parsedown = new Parsedown();
    echo $Parsedown->text($contents);