Example #1
0
function getdata($url, $option)
{
    if ($option = TRUE && curl_status($curl) == "OK!") {
        $ch = curl_init($url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        $data = curl_exec($ch);
        curl_close($ch);
        return $data;
    } else {
        return file_get_contents($url);
    }
}
Example #2
0
	<b>Engine = </b>
	<select name=plugins>
		<?php 
    foreach (list_plugins() as $option) {
        $rename = rename_plugins($option);
        // rename to replace plugins name with another character
        echo "<option value=\"" . $rename . "\">" . $rename . "</option>";
    }
    ?>
	</select>
	</center>
	<?php 
}
// If admin/user enable curl, so this section will show
if (isset($curl) && $curl == "TRUE" && !isset($_REQUEST['lyrics']) && !isset($_POST['lagu'])) {
    echo "<br><center><b> Curl Status : </b><font color='red'>" . curl_status($curl) . "</font></center>";
}
// If user select his lyrics from list in search, this section will start
if (isset($_REQUEST['lyrics']) && !empty($_REQUEST['lyrics'])) {
    $getplugins = encode_url($_REQUEST['lyrics'], "decode");
    $getplugins = explode(":", $getplugins);
    if (!strpos("{$getplugins['2']}", ".")) {
        echo "<center>Error!</center>";
        die;
    }
    // Verified data so user can't include file from another source
    $plugins = str_replace('.', '_', $getplugins[2]) . ".php";
    // Rename data that been send by POST request
    include $plugins;
    // Include plugins
    $class = new lyrics();