Pesquisar na Comunidade
Mostrando resultados para as tags ''PHP''.
Encontrado 1536 registros
-
Olá, esta dando erro no foreach dessa variavel $Mailer->Body = ' <div style="float:left;width: 100%;"> <h3 style="margin: 14px 0px 0px 0px;padding: 10px 0px 7px 13px;background: #D2D2D2;color: #404040;">Dados de Quem fez o pedido</h3> <table border="0" cellpadding="0" cellspacing="0" style="float:left; width:100%;border: 1px solid #cccccc;"> <tr> <td style="padding: 10px;">Nome:</td> <td>'.$nome.' '.$sobrenome.'<td> <tr> <tr> <td style="padding: 10px;">CPF:</td> <td>'.$cpf.'<td> <tr> <tr> <td style="padding: 10px;">CPF:</td> <td>'.$email.'<td> <tr> <tr> <td style="padding: 10px;">CPF:</td> <td>'.$numero.'<td> <tr> <tr> <td style="padding: 10px;">CPF:</td> <td>'.$complmento.'<td> <tr> <tr> <td style="padding: 10px;">CPF:</td> <td>'.$bairro.'<td> <tr> <tr> <td style="padding: 10px;">CPF:</td> <td>'.$cidade.'<td> <tr> <tr> <td style="padding: 10px;">CPF:</td> <td>'.$estado.'<td> <tr> <tr> <td style="padding: 10px;">CPF:</td> <td>'.$cep.'<td> <tr> </table> <table style="width: 100%;float: left;" border="0" cellpadding="0" cellspacing="0"> <thead style="background: #555;"> <tr> <th style="padding: 11px 9px;color: rgba(255, 255, 255, 0.87);font-weight: 300;"> Imagem </th> <th style="padding: 11px 9px;color: rgba(255, 255, 255, 0.87);font-weight: 300;"> Produto </th> <th style="padding: 11px 9px;color: rgba(255, 255, 255, 0.87);font-weight: 300;"> Valor(Unidade) </th> <th style="padding: 11px 9px;color: rgba(255, 255, 255, 0.87);font-weight: 300;"> SubTotal </th> <th style="padding: 11px 9px;color: rgba(255, 255, 255, 0.87);font-weight: 300;"> Quantidade </th> <th style="padding: 11px 9px;color: rgba(255, 255, 255, 0.87);font-weight: 300;"> Peso </th> <th style="padding: 11px 9px;color: rgba(255, 255, 255, 0.87);font-weight: 300;"> Tamanho </th> <th style="padding: 11px 9px;color: rgba(255, 255, 255, 0.87);font-weight: 300;"> Cor </th> </tr> </thead> <tbody>' 153 foreach ($produtos as $indice => $dados) { list($id, $opcoes) = explode(':', $indice); $qtd = $dados['qtd'];' <tr> <td style="padding: 8px!important;"> <img src="'echo PATCH.'/produto/'.$dados['imagem'];'" width="60"> </td> <td> <span style="text-align: left;padding: 0 0 0 19px;overflow: hidden;width: 105px;text-overflow: ellipsis;white-space: nowrap;float: left;" title="'echo $dados['titulo'];'"> 'echo $dados['titulo'];' </span> <td> <td style="width: 113px;">'.$dados['preco'].'</td> <td style="width: 113px;">'.$dados['subtotal'].'</td> <td style="width: 87px;">'.$dados['qtd'].;'</td> <td style="width: 79px;">'.$dados['peso'].' g</td> <td style="width: 78px;">'.$dados['tamanho'].'</td> <td style="width: 65px;">'.$dados['cor'].'</td> </tr> '.}.' </tbody> </table> </div>'; Parse error: syntax error, unexpected T_FOREACH in gostaria de sabe como corrigir o erro OBRIGADO PELA ATENÇÃO
-
untilO iMasters PHP Experience 2017 reúne cerca de 1.200 programadores brasileiros e estrangeiros em São Paulo, para palestras nacionais e internacionais, workshops, áreas de comunidade e diversas ações de networking, divididos em dois dias de muito conteúdo. Acompanhe as novas informações no portal e nas nossas redes sociais: Facebook, Twitter e Instagram. Site do evento: http://phpexperience2017.imasters.com.br/
-
Estou desenvolvendo um site e preciso de um sistema de apostas como os desse site http://sorteonline.com.br/lotofacil Já tentei de tudo que é jeito mais não consegui. É o seguinte: O usuário marca uma quantia de números e após clica em salvar e salva no banco de dados os números marcados. Se alguém puder me ajudar eu agradeço muito. Obrigado pela atenção.
- 12 respostas
-
- javascript
- ajax
-
(e mais 1 )
Tags:
-
Como criar um player de video em javascript, eu não uso wordpress pois estou estudando desenvolvimento web, eu vi que se eu colocar a tag embed com um link de um video https://video.googleusercontent.com/meuvideo.mp4, o irá começar o download do video, eu então vi que alguns sites usam os seus videos em javascript, criando uma pagina para somente o video e depois inseri-lo na postagem, exemplo: meusite.com/video/123.php, nessa pagina tem somente o video em um código javascript, esse método tem um nome ? eu preciso saber para adiantar essa parte de mídia em sites.
-
Eu tenho um sistema em php que pega o nome da musica que tá tocando em um determinado streaming shoutcast e queria saber como faço um outro sistema onde posso buscar uma image que represente essa musica.
-
bom dia, estou convertendo este socket de tcp para udp para receber dados de um rastreador, alterei para socket_dgram e também o socket recv para socket_recvfrom, mas não esta chegando nada alguem pode me ajudar? /** * Creates a server socket and listens for incoming client connections * @param string $address The address to listen on * @param int $port The port to listen on */ function server_loop($address, $port) { GLOBAL $fh; GLOBAL $__server_listening; printLog($fh, "server_looping..."); if(($sock = socket_create(AF_INET,SOCK_DGRAM,0))) { printLog($fh, "failed to create socket: ".socket_strerror($sock)); exit(); } if(($ret = socket_bind($sock, $address, $port)) < 0) { printLog($fh, "failed to bind socket: ".socket_strerror($ret)); exit(); } socket_set_nonblock($sock); printLog($fh, "waiting for clients to connect..."); while ($__server_listening) { $connection = @socket_recvfrom($sock); if ($connection === false) { usleep(100); } elseif ($connection > 0) { handle_client($sock, $connection); } else { printLog($fh, "error: ".socket_strerror($connection)); die; } } }
- 1 resposta
-
Usuários (ip) do mlql não acontece nada e usuários bloqueados olham o site completo. ou seja eu quero que tenha uma função reversa. Desde já agradeço pela ajuda! ;)
-
pessoal , preciso de uma ajuda , preciso saber como faço um script que faça o seguinte : html tera um form com action que manda para o php e o php mande para o banco de dados , isso com o input file ok , ate aqui eu ja tenho tudo funcionando porem e aqui que nao sei fazer , quando eu selecionar a foto no input , preciso que mostre um campo para editar o tamanho da imagem , aqui presiso que o usuario sempre poste uma foto quadrada , nao importa se é 200x200 , 400x400 mas tem que ser quadrada , eu vi esse script na net mas n manjo muito de javascript e estou começando agora , ele corta a imagem perfeitamente como quero porem , como faço para guardar a variavei imageData que e jafa script no campo input ou passar ela para a variavei $foto = $_FILE['']; no php ? <!DOCTYPE html> <html> <head> <title>cropit</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script> <script src="jquery.cropit.js"></script> <style> .cropit-preview { background-color: #f8f8f8; background-size: cover; border: 1px solid #ccc; border-radius: 3px; margin-top: 7px; width: 250px; height: 250px; } .cropit-preview-image-container { cursor: move; } .image-size-label { margin-top: 10px; } input, .export { display: block; } button { margin-top: 10px; } </style> </head> <body> <form class='form-horizontal' method='post' action='atualizaDados.php?acao=ativa&email=$recebeEmail' id='validaAcesso' enctype='multipart/form-data'> <div class="image-editor"> <input type="file" name='fotouser' class="cropit-image-input"> <div class="cropit-preview"></div> <div class="image-size-label"> Resize image </div> <input type="range" class="cropit-image-zoom-input"> <button class="rotate-ccw">Rotate counterclockwise</button> <button class="rotate-cw">Rotate clockwise</button> <button type='submit' class="export btn btn-default">Export</button> </div> </form> <script> $(function() { $('.image-editor').cropit({ imageState: { src: '', }, }); $('.rotate-cw').click(function() { $('.image-editor').cropit('rotateCW'); }); $('.rotate-ccw').click(function() { $('.image-editor').cropit('rotateCCW'); }); $('.export').click(function() { var imageData = $('.image-editor').cropit('export'); }); $imageCropper.find('.cropit-preview') }); </script> </body> </html>
- 3 respostas
-
- php
- javascript
- (e mais 8 )
-
Olá pessoal, já pesquisei sobre o assunto mas não encontrei nada. Gostaria de saber se alguém pode me ajudar a pegar a quantidade de curtidas de uma página do facebook com php ou me indicar um tutorial. Obrigado.
-
Olá, Tenho um banco de dados onde temos vários eventos e suas localizações em longitude e latitude, porém preciso converter em endereço. Consegui um código mas ele não funciona, vocês poderiam me ajudar? $lat = '-18.8786'; $lon = '-48.3000'; function Get_Address_From_Google_Maps($lat, $lon) { $url = "https://maps.googleapis.com/maps/api/geocode/json?latlng=$lat,$lon&key=<AQUI ESTÁ MINHA API KEY>"; // Make the HTTP request $data = @file_get_contents($url); // Parse the json response $jsondata = json_decode($data,true); // If the json data is invalid, return empty array if (!check_status($jsondata)) return array(); $address = array( 'country' => google_getCountry($jsondata), 'province' => google_getProvince($jsondata), 'city' => google_getCity($jsondata), 'street' => google_getStreet($jsondata), 'postal_code' => google_getPostalCode($jsondata), 'country_code' => google_getCountryCode($jsondata), 'formatted_address' => google_getAddress($jsondata), ); return $address; } /* * Check if the json data from Google Geo is valid */ function check_status($jsondata) { if ($jsondata["status"] == "OK") return true; return false; } /* * Given Google Geocode json, return the value in the specified element of the array */ function google_getCountry($jsondata) { return Find_Long_Name_Given_Type("country", $jsondata["results"][0]["address_components"]); } function google_getProvince($jsondata) { return Find_Long_Name_Given_Type("administrative_area_level_1", $jsondata["results"][0]["address_components"], true); } function google_getCity($jsondata) { return Find_Long_Name_Given_Type("locality", $jsondata["results"][0]["address_components"]); } function google_getStreet($jsondata) { return Find_Long_Name_Given_Type("street_number", $jsondata["results"][0]["address_components"]) . ' ' . Find_Long_Name_Given_Type("route", $jsondata["results"][0]["address_components"]); } function google_getPostalCode($jsondata) { return Find_Long_Name_Given_Type("postal_code", $jsondata["results"][0]["address_components"]); } function google_getCountryCode($jsondata) { return Find_Long_Name_Given_Type("country", $jsondata["results"][0]["address_components"], true); } function google_getAddress($jsondata) { return $jsondata["results"][0]["formatted_address"]; } /* * Searching in Google Geo json, return the long name given the type. * (If short_name is true, return short name) */ function Find_Long_Name_Given_Type($type, $array, $short_name = false) { foreach( $array as $value) { if (in_array($type, $value["types"])) { if ($short_name) return $value["short_name"]; return $value["long_name"]; } } } /* * Print an array */ function d($a) { echo "<pre>"; print_r($a); echo "</pre>"; }
-
Opa pessoal, blz? Estou precisando de uma class do php que pegue a cotação em tempo real do dólar (USD) para euro (EUR) ! Há algum script em php para isso ? Obrigado !