Ir para conteúdo
Fórum Script Brasil

grafit_

Membros
  • Total de itens

    14
  • Registro em

  • Última visita

Tudo que grafit_ postou

  1. grafit_

    Áreas específicas CURL

    po cara pesquisei sobre preg_match mas não entendi muito bem não.. teria como me dar uma força? e o preg_match captura por exemplo as linhas do outro site?
  2. Bom eu queria saber como eu faço para marcar areas específicas do outro site usando CURL meu script é esse: <?php $ch = curl_init(); // informar URL e outras funções ao CURL curl_setopt($ch, CURLOPT_URL, "http://www.google.com.br"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // acessar URL $output = curl_exec($ch); // Pegar o código de resposta $response_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); // Not found? if ($response_code == '404') { echo 'Página não existente'; } else { echo $output; } ?> Como faço pra retirar informações de X lugar? Grato
  3. grafit_

    Busca de informações

    muito obrigado pela dica!!
  4. olá. gostaria de saber como faço pra buscar informações em outro site. mais ou menos assim.. Eu pesquiso um nome , exemplo "Ronaldo". Então o sistema iria buscar o nome Ronaldo. Quando achar o nome Ronaldo vai ter as informaçoes no site , exemplo Primeiro nome, Ultimo Nome, etc etc eu sei que em HTML é possível usar IFRAME, mas com o IFRAME ele "reproduz" a imagem do outro site, e eu só queria as informações, a escrita em sí. Grato
  5. grafit_

    Redirecionar

    mas em relação a CSS o site vai ficar 100% igual o site "redirecionado" mas eu quero APENAS as escritas.. ty
  6. procurei , mas não achei nada alem do meu script..
  7. Bem , eu fiz um tópico semelhante... mas estou "refazendo" para ser mais expecífico. eu uso esse script <? $EnderecoDoArquivo = FILE_GET_CONTENTS("http://zezenium.com/serverstats"); if(!$EnderecoDoArquivo){ echo 'Não Foi Possivel Carrgar No Momento'; }else{ echo $EnderecoDoArquivo; /* $Titulo = EXPLODE("<body>","$EnderecoDoArquivo"); $TituloAbre = EXPLODE("</body>","$Titulo[1]"); ECHO"$TituloAbre[0]"; */ } ?> e ele exibe outro site no meu site.. mas eu queria que exibisse apenas algumas linhas.. qual comando devo adicionar para exibir apenas tal linha? Obrigado
  8. grafit_

    Redirecionar

    não entendi muito bem o que você disse :\
  9. grafit_

    Redirecionar

    Muito obrigado! mas tem um porém eu fiz tudo certinho e tal e o site ficou assim e eu gostaria de fazer assim alguém ajuda?:X o script que eu usei peguei do red~ nesse link http://forum.imasters.uol.com.br/index.php...e-get-contents/ <? if(!function_exists("file_get_contents")){ function file_get_contents($file){ if(file_exists($file)){ return implode("", file($file)); }else{ return false; } } } $test = file_get_contents("http://www.zezeniaonline.com/worlds/index.html"); echo $test; ?> vlw!!
  10. grafit_

    Redirecionar

    Olá. Gostaria de saber como faço para por exemplo. Mundo 20 Players Online. /\isso no site oficial como faço para no meu site mostrar isso , atualizando sozinho. obrigado desde já
  11. grafit_

    Signatures

    eu entendi parcialmente.. beleza , ela gera imagens com texto e tal.. mas como faço isso? levem em conta que sou meio noob ainda :x primeiramente tentei editar e não consegui... seguinte eu tenho o script de um que usa banco de dados.. porém eu não tenho acesso ao banco de dados do jogo <?PHP class signature { # v-- CONFIGURATION BELOW --v # var $config = array ( 'database' => array ( "localhost" , "root" , "password" , "database" ), 'vocations' => array ( "Warrior" , "Ranger" , "Mage" ), 'towns' => array ( 1 => 'Tipitaka', 2 => 'Platon' ), 'groups' => array ( 2 => "Tutor" , 3 => "Senior Tutor" , 4 => "Gamemaster" , 5 => "Community Manager" , 6 => "God" ), 'backgrounds' => array ( 'signatures/blue' , 'signatures/red' , 'signatures/green' ), 'color' => "#FFFFFF", 'statuscolor' => array ( "#358f0d" /* online */ , "#c40808" /* offline */ ), 'font' => "signatures/arial.ttf", 'size' => array ( 2 /* without font */ , 8 /* with font */ ) ); # ^-- CONFIGURATION ABOVE --^ # // Database functions. function connectDatabase ( $database ) { @mysql_connect ( $database[0] , $database[1] , $database[2] ); @mysql_select_db ( $database[3] ); } function query ( $query ) { return @mysql_query ( $query ); } function fetchArray ( $query ) { return @mysql_fetch_array ( $query ); } function secure ( $query ) { return @mysql_real_escape_string ( $query ); } function numRows ( $query ) { return @mysql_num_rows ( $query ); } function convertHex ( $hex ) { $hex = ereg_replace ( "#" , "" , $hex ); $color = array(); if ( strlen ( $hex ) == 6 ): $color['r'] = hexdec ( substr ( $hex , 0 , 2 ) ); $color['g'] = hexdec ( substr ( $hex , 2 , 2 ) ); $color['b'] = hexdec ( substr ( $hex , 4 , 2 ) ); endif; return $color; } // Signature functions. function character ( $character ) { // Define presets. $query = "SELECT `id` , `account_id` , `group_id` , `name` , `sex` , `promotion` , `vocation` , `town_id` , `rank_id` , `online` , `level` , `lastlogin` FROM `players` WHERE `name` = '{$character}'"; $fetchRow = $this -> fetchArray ( $this -> query ( $query ) ); $numRows = $this -> numRows ( $this -> query ( $query ) ); $rank = $this -> fetchArray ( $this -> query ( "SELECT `guild_id` , `name` FROM `guild_ranks` WHERE `id` = '{$fetchRow[rank_id]}'" ) ); $guild = $this -> fetchArray ( $this -> query ( "SELECT `name` FROM `guilds` WHERE `id` = '{$rank[guild_id]}'" ) ); $premium = $this -> fetchArray ( $this -> query ( "SELECT `premdays` FROM `accounts` WHERE `id` = '{$fetchRow[account_id]}'" ) ); // Define certain arrays into one variable. $arrays['status'] = ( $fetchRow['online'] == 1 ? ' ONLINE' : 'OFFLINE' ); $arrays['gender'] = ( $fetchRow['sex'] == 1 ? 'Male' : 'Female' ); $arrays['vocation'] = ( $fetchRow['group_id'] < 2 ) ? "Profession: " . ( $fetchRow['promotion'] != 0 ? $this -> config['vocations'][$fetchRow['vocation'] + ( 4 * $fetchRow['promotion'] )] : $this -> config['vocations'][$fetchRow['vocation']] ) . "\q" : NULL; $arrays['guild'] = ( ( $fetchRow['rank_id'] > 0 and $fetchRow['group_id'] < 2 ) ? "Guild: " . ( $fetchRow['sex'] == 1 ? 'He' : 'She' ) . " is " . $rank['name'] . " of the " . $guild['name'] . "\q" : NULL ); $arrays['position'] = ( $fetchRow['group_id'] > 1 ? "Position: " . $this -> config['groups'][$fetchRow['group_id']] . "\q" : NULL ); $arrays['lastlogin']= ( $fetchRow['lastlogin'] != 0 ? date ( "M d Y, H:i:s" , $fetchRow['lastlogin'] ) : 'Never logged in' ); $arrays['premium'] = ( ( $fetchRow['group_id'] < 2 ) ? $premium['premdays'] > 0 ? '(Premium Account)' : '(Free Account)' : NULL ); $arrays['level'] = ( $fetchRow['group_id'] < 2 ? "Level: " . $fetchRow['level'] . "\q" : NULL ); // Showable fields (\q equals new line, had to create my own shortcut as I clear all whitespaces further down in the script). $return = " Name: {$fetchRow[name]} {$arrays[premium]} \q Sex: {$arrays[gender]} \q {$arrays[level]} {$arrays[vocation]} Residence: {$this -> config[towns][$fetchRow[town_id]]} \q {$arrays[guild]} {$arrays[position]} Last Login: {$arrays[lastlogin]} "; // Make certain fields bold. $bolds = "Name: \nSex: \n" . ( $fetchRow['group_id'] < 2 ? "Level: \n" : NULL ) . ( ( $fetchRow['group_id'] < 2 ) ? "Profession: \n" : NULL ) . "Residence: \n" . ( ( $fetchRow['rank_id'] > 0 and $fetchRow['group_id'] < 2 ) ? "Guild: \n" : NULL ) . ( $fetchRow['group_id'] > 1 ? "Position: \n" : NULL ) . "Last Login:"; // Return output. if ( $numRows == 1 and !in_array ( $fetchRow['name'] , $this -> config['hidechars'] ) ) return $return . "|||" . $bolds . "|||" . $arrays['status']; else return "A character with that name does not exist."; } // Create a function to generate the signature. function generate ( $character , $background ) { // Connect to the database. $this -> connectDatabase ( $this -> config['database'] ); $split = explode ( "|||" , $this -> character ( $this -> secure ( $character ) ) ); if ( strtolower ( substr ( $split[2] , -5 , 1 ) ) == 'n' ) $statuscolor = $this -> convertHex ( $this -> config['statuscolor'][0] ); else $statuscolor = $this -> convertHex ( $this -> config['statuscolor'][1] ); header ( "Content-type: image/png" ); // Check if the background exists, if not - create one. if ( file_exists ( "{$this -> config[backgrounds][$background]}.png" ) != 1 ): $image = imagecreatetruecolor ( 500 , 120 ); imagefilledrectangle ( $image , 0 , 0 , 500 , 120 , imagecolorallocate ( $image , 255 , 255 , 255 ) ); $color = imagecolorallocate ( $image , 0 , 0 , 0 ); imagesetthickness ( $image , 1 ); imagerectangle ( $image , 0 , 0 , 499 , 119 , $color ); $split[0] = "The requested image does not exist."; $split[1] = NULL; else: $image = imagecreatefrompng ( $this -> config['backgrounds'][$background] . ".png" ); $color = $this -> convertHex ( $this -> config['color'] ); endif; $content = explode ( "\q" , str_replace ( array ( "\n" , "\r" , "\t" , "\o" , "\xOB" ) , '' , $split[0] ) ); $bolds = explode ( "\n" , str_replace ( array ( "\r" , "\t" , "\o" , "\xOB" ) , '' , $split[1] ) ); // Print text. if ( $this -> config['font'] != "" ): for ( $i = 0; $i <= count ( $content ); $i++ ): $o = ( $i == 0 ) ? 2.4 : $i + 2.4; imagettftext ( $image , $this -> config['size'][1] , 0 , 7, 12 * $o , imagecolorallocate ( $image , $color['r'] , $color['g'] , $color['b'] ) , "./{$this -> config[font]}" , " " . $content[$i] ); endfor; for ( $i = 0; $i <= count ( $bolds ); $i++ ): $o = ( $i == 0 ) ? 2.4 : $i + 2.4; imagettftext ( $image , $this -> config['size'][1] , 0 , 8, 12 * $o , imagecolorallocate ( $image , $color['r'] , $color['g'] , $color['b'] ) , "./{$this -> config[font]}" , " " . $bolds[$i] ); endfor; if ( $split[0] != "The requested image does not exist." ): imagettftext ( $image , $this -> config['size'][1] , 0 , 250 , 10+round ( ( imagesy ( $image ) / 2 ) - ( imagefontheight ( $this -> config['size'][1] ) / 2 ) ) , imagecolorallocate ( $image , 0 , 0 , 0 ) , "./{$this -> config[font]}" , $split[2] ); imagettftext ( $image , $this -> config['size'][1] , 0 , 249 , 10+round ( ( imagesy ( $image ) / 2 ) - ( imagefontheight ( $this -> config['size'][1] ) / 2 ) )-1 , imagecolorallocate ( $image , $statuscolor['r'] , $statuscolor['g'] , $statuscolor['b'] ) , "./{$this -> config[font]}" , $split[2] ); endif; else: for ( $i = 0; $i <= count ( $content ); $i++ ): $o = ( $i == 0 ) ? 1.5 : $i + 1.5; imagestring ( $image, $this -> config['size'][0] , -4, 12 * $o, " " . $content[$i], imagecolorallocate ( $image , $color['r'] , $color['g'] , $color['b'] ) ); endfor; for ( $i = 0; $i <= count ( $bolds ); $i++ ): $o = ( $i == 0 ) ? 1.5 : $i + 1.5; imagestring ( $image, $this -> config['size'][0] , -3, 12 * $o, " " . $bolds[$i], imagecolorallocate ( $image , $color['r'] , $color['g'] , $color['b'] ) ); endfor; if ( $split[0] != "The requested image does not exist." ): imagestring ( $image, $this -> config['size'][0] , 250, round ( ( imagesy ( $image ) / 2 ) - ( imagefontheight ( $this -> config['size'][1] ) / 2 ) )-1, $split[2], imagecolorallocate ( $image , 0 , 0 , 0 ) ); imagestring ( $image, $this -> config['size'][0] , 249, round ( ( imagesy ( $image ) / 2 ) - ( imagefontheight ( $this -> config['size'][1] ) / 2 ) )-2, $split[2], imagecolorallocate ( $image , $statuscolor['r'] , $statuscolor['g'] , $statuscolor['b'] ) ); endif; endif; imagepng ( $image ); imagedestroy ( $image ); } } $signature = new signature(); if ( !empty ( $_GET ) ): $signature -> generate ( $_GET['character'] , $_GET['image'] ); endif; ?> alguém poderia me ajudar a editar o script para XML(se eu não me engano) Obrigado!
  12. grafit_

    Signatures

    pelo amor de deus alguém me dá uma luz!!
  13. grafit_

    Signatures

    poxa.. eu gostaria de saber se alguém conheçe o nome do script , ou tem o link pra download..
  14. grafit_

    Signatures

    Fala galera. sou novo por aqui , e preciso urgente da ajuda de vocês. queria fazer um sistema parecido com esse: http://www.zezenium.com/card/SamKiud alguém pode me passar o script? eu não faço ideia de como fazer esse sistema. ele é basicamente assim: o cara vai e coloca o nome do personagem dele , depois escolhe tal imagem de fundo , aperta submit e gera o script com level , etc.. obrigado desde já abraço!
×
×
  • Criar Novo...