public function getFirstResult($search, $filename)
 {
     //print "http://www.chartlyrics.com/search.aspx?q=".replace_space($search);
     $getdata_source = getdata("http://www.chartlyrics.com/search.aspx?q=" . replace_space($search), $curl);
     $getdata = explode('<th style="width: auto">', $getdata_source);
     $getdata = explode('[END] Page', $getdata[1]);
     $getdata = explode('<a href="', $getdata[0]);
     $achou = false;
     if (count($getdata) > 1) {
         $pecah = $getdata[1];
         //foreach($getdata as $pecah){
         $data = explode('</a>', $pecah);
         $data = explode('<td>', $data[0]);
         $data = array_unique(explode('</th>', $data[0]));
         //$gay = $data[0];
         foreach ($data as $gay) {
             $gay = explode('">', $gay);
             if (!strpos($gay[0], "add.aspx")) {
                 if (isset($gay[1])) {
                     $string = $gay[0] . ":" . $gay[1] . ":" . str_replace(".php", "", str_replace("_", ".", $filename));
                     //echo "<center><a href='?lyrics=".encode_url($string, 'encode')."'>$gay[1]</a><br /></center>";
                     //print encode_url($string, 'encode');
                     $achou = true;
                     $this->get_result(encode_url($string, 'encode'));
                 }
             }
         }
         //}
     }
     if (!$achou) {
         echo "0";
     }
 }
 public function get_result($request)
 {
     $request = encode_url($request, "decode");
     $getname = explode(':', $request);
     $url = replace_space("http://www.chartlyrics.com" . $getname[0]);
     $getlyrics = getdata("{$url}", $curl);
     $getlyrics = explode('alt="" title="', $getlyrics);
     $getlyrics = explode('" />', $getlyrics[1]);
     $getlyrics = explode('<div id="adlyric">', $getlyrics[1]);
     echo "<center><br><font size=60><b>{$getname['1']}</b></font><br><br>{$getlyrics['0']}</center>";
 }
 public function get_result($request)
 {
     $request = encode_url($request, "decode");
     $getname = explode(':', $request);
     $url = replace_space("http://www.lyrics007.com" . $getname[0]);
     $getlyrics = getdata("{$url}", $curl);
     $getlyrics = explode('display:block;float:left;padding-top:5px;', $getlyrics);
     $getlyrics = explode('/print.php?id=TWpnNE1qVTE', $getlyrics[1]);
     $getlyrics = explode('</fb:like>', $getlyrics[0]);
     $getlyrics = explode('<script type="text/javascript">', $getlyrics[1]);
     echo "<center><br><font size=60><b>{$getname['1']}</b></font><br><br>{$getlyrics['0']}</center>";
 }
示例#4
0
        </td>';
    echo '<td><input type="submit"></td>';
    echo '</tr>';
    echo '</table>';
    echo '</form>' . $eol;
}
function replace_space($str)
{
    return str_replace(" ", "+", $str);
}
// BUILD THE PAGE
show_header();
//show the form
show_form();
$guild_name = replace_space($_GET[guild_name]);
$guild_server = replace_space($_GET[guild_server]);
if ($guild_name != "" && $guild_server != "") {
    $lang = $_GET[lang];
    $region = $_GET[region];
    echo '<h2>' . $guild_name . ' on ' . $guild_server . ' - Region: ' . $region . ', Lang: ' . $lang . '</h2>';
    if ($region == "us") {
        $armory_server = 'http://www.wowarmory.com/';
    } elseif ($region == "eu") {
        $armory_server = 'http://eu.wowarmory.com/';
    }
    $armory_url = $armory_server . 'guild-info.xml?r=' . $guild_server . '&gn=' . $guild_name;
    class guild_data
    {
        public function get_xml($lang, $url)
        {
            $ch = curl_init();
示例#5
0
            echo $nmeta['Author'][0];
            ?>
</div>
                        <?php 
        }
        ?>
                            <div class="tags-list">
                                <ul>
                                    <?php 
        if (!empty($tags)) {
            ?>
                                    <?php 
            foreach ($tags as $tag) {
                ?>
                                    <li><a href="/tag/<?php 
                echo replace_space($tag->name, "-");
                ?>
/"><?php 
                echo $tag->name;
                ?>
</a> <span class="divider">|</span></li>
                                    <?php 
            }
            ?>
                                    <?php 
        }
        ?>
                                </ul>
                            </div>
                        </div>
                    </div>