Milk


Edit dir = "power_swf"

Código:

<?php

//**************************************************Milk*************************************************\\

$getfile   = file_get_contents('http://xat.com/web_gear/chat/pow2.php?Milk=1234');
$pow2      = json_decode($getfile, true);
$powername = array_search($pow2['0']['1']['id'], $pow2['6']['1']);
$smilie    = array_merge(array(
    $powername
), array_keys($pow2['4']['1'], $pow2['0']['1']['id']));
$smilies   = array();
$pawns     = array();
foreach ($smilie as $v)
    array_push($smilies, $v);
$topsh = implode("), (", $smilies);

if (isset($_POST['update'])) {
    print '<table>';
    print '<caption>Smiles Swf</caption>';
    print '<thead>';
    print '<tr>';
    print '<th scope="col">Smiles</th>';
    print '</tr>';
    print '</thead>';
    print '<tbody>';
    
    foreach ($smilies as $smiles) {
        print '<tr>';
        print '<td data-label="Smiles">' . $smiles . '</td>';
        print '</tr>';
        $swffile = file_get_contents('https://www.xatech.com/images/sm2/' . $smiles . '.swf?v=130');
        file_put_contents("power_swf/" . $smiles, $swffile);
        print '<br>';
    }
    print '</tbody>';
    print '</table>';
    print '<br>';
    print '<table>';
    print '<caption>Pawns SWF</caption>';
    print '<thead>';
    print '<tr>';
    print '<th scope="col">Pawns</th>';
    print '</tr>';
    print '</thead>';
    print '<tbody>';
    foreach ($pow2[7][1] as $name => $value) {
        
        //print $name;
        if ($name != 'time' && $value[0] == $pow2['0']['1']['id']) {
            $pawns = array();
            array_push($pawns, $value[1]);
            $pawnlist = implode(", ", $pawns);
            print '<tr>';
            print '<td data-label="Pawns">' . $pawnlist . '</td>';
            
            print '</tr>';
            $swffile = file_get_contents('https://www.xatech.com/images/sm2/' . $pawnlist . '.swf?v=130');
            file_put_contents("power_swf/" . $pawnlist, $swffile);
        }
    }
    print '</tbody>';
    print '</table>';
    print '<br>';
}
//***************************************************************************************************\\
?>
  <html>
  <style rel="stylesheet" type="text/css">
  body {
  background-color: #eee;
  font-family: "Open Sans", sans-serif;
  line-height: 1.25;
}

table {
  border: 1px solid #ccc;
  border-collapse: collapse;
  margin: 0;
  padding: 0;
  width: 100%;
  table-layout: fixed;
}

table caption {
  font-size: 1.5em;
  margin: .5em 0 .75em;
}

table tr {
  background-color: #f8f8f8;
  border: 1px solid #ddd;
  padding: .35em;
}

table th,
table td {
  padding: .625em;
  text-align: center;
}

table th {
  font-size: .85em;
  letter-spacing: .1em;
  text-transform: uppercase;
}

@media screen and (max-width: 600px) {
  table {
    border: 0;
  }

  table caption {
    font-size: 1.3em;
  }
  
  table thead {
    border: none;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
  }
  
  table tr {
    border-bottom: 3px solid #ddd;
    display: block;
    margin-bottom: .625em;
  }
  
  table td {
    border-bottom: 1px solid #ddd;
    display: block;
    font-size: .8em;
    text-align: right;
  }
  
  table td::before {
    /*
    * aria-label has no advantage, it won't be read inside a table
    content: attr(aria-label);
    */
    content: attr(data-label);
    float: left;
    font-weight: bold;
    text-transform: uppercase;
  }
  
  table td:last-child {
    border-bottom: 0;
  }
}
</style>
  
  <title>Get Powers</title>
  <form method="POST">
  <input name="update" type="submit" value="Update Powers">
  </form>