Created
January 13, 2019 23:04
-
-
Save NerdOfLinux/302f0fe89bd7ae52fb41d9984d96cdb3 to your computer and use it in GitHub Desktop.
Embed gist in PHP no JS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Your gist JS file is the src from the embed code | |
$gist = file_get_contents( "your_gist_js_file_here" ); | |
echo stripcslashes( preg_replace( "/document.write\('(.*)'\)/", "$1", $gist ) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment