Help:Extensions: Difference between revisions
Jump to navigation
Jump to search
(Created page with "This wiki contains several extensions. Currently enabled extensions will be listed on this page, as well as their use. == Source Code Highlighting == Syntax Highlighting via ...") |
mNo edit summary |
||
Line 6: | Line 6: | ||
use <source> tags to include autodetected source formatting. Try <source lang=language> | use <source> tags to include autodetected source formatting. Try <source lang=language> | ||
<source> | <source lang=php> | ||
<?php | <?php | ||
// create curl resource | // create curl resource |
Latest revision as of 23:02, 11 December 2014
This wiki contains several extensions. Currently enabled extensions will be listed on this page, as well as their use.
Source Code Highlighting[edit source]
Syntax Highlighting via GoogleCodePrettify: http://www.mediawiki.org/wiki/Extension:GoogleCodePrettify
use <source> tags to include autodetected source formatting. Try <source lang=language>
<?php
// create curl resource
$ch = curl_init();
// set url
curl_setopt($ch, CURLOPT_URL, "example.com");
//return the transfer as a string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// $output contains the output string
$output = curl_exec($ch);
// close curl resource to free up system resources
curl_close($ch);
?>