Skip to content

Instantly share code, notes, and snippets.

@NerdOfLinux
Created January 13, 2019 23:04
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 NerdOfLinux/302f0fe89bd7ae52fb41d9984d96cdb3 to your computer and use it in GitHub Desktop.
Save NerdOfLinux/302f0fe89bd7ae52fb41d9984d96cdb3 to your computer and use it in GitHub Desktop.
Embed gist in PHP no JS
// 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