This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Follow this link for further updates to Github Desktop for Ubuntu https://github.com/shiftkey/desktop/releases/latest | |
| # UPDATE (2022-11-07): Thanks to Sxvxgee's message, the updated code is as follows | |
| sudo wget https://github.com/shiftkey/desktop/releases/download/release-3.1.1-linux1/GitHubDesktop-linux-3.1.1-linux1.deb | |
| ### Uncomment below line if you have not installed gdebi-core before | |
| # sudo apt-get install gdebi-core | |
| sudo gdebi GitHubDesktop-linux-3.1.1-linux1.deb | |
| # UPDATE (2021-10-18): Thanks to Amin Yahyaabadi's message, the updated code is as follows |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // PHP simples com file get contents | |
| $html = file_get_contents('https://br.tradingview.com/symbols/BMFBOVESPA-IBOV/'); //Convierte la información de la URL en cadena | |
| echo $html; | |
| // PHP simples com get contents 2 | |
| $html = file_get_contents('https://br.investing.com/webmaster-tools/rss', true); | |
| preg_match_all("|<[^>]+>(.*)</[^>]+>|U", $html, $out, PREG_PATTERN_ORDER); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $method = $_SERVER['REQUEST_METHOD']; | |
| switch ($method) { | |
| case 'GET': | |
| //Here Handle GET Request | |
| echo 'You are using '.$method.' Method'; | |
| break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Utilizar para el sistema de Broker Personal a fin de tener una seccion de noticias de las monedas y mercados. | |
| $articulos = simplexml_load_string(file_get_contents('https://news-web.php.net/group.php?group=php.doc.pt-br&format=rss')); | |
| $num_noticia=1; | |
| $max_noticias=10; | |
| echo "<h2>{$articulos->channel->title}</h2>"; | |
| foreach($articulos->channel->item as $noticia){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| public static function get_language( $available = [], $default = 'pt_br' ) | |
| { | |
| if ( isset( $_SERVER[ 'HTTP_ACCEPT_LANGUAGE' ] ) ) { | |
| $langs = explode( ',', $_SERVER['HTTP_ACCEPT_LANGUAGE'] ); | |
| if ( empty( $available ) ) { | |
| $langs[0] = substr($langs[0], 0, 2); | |
| $langss = mb_strtoupper($langs[0]); | |
| return $langss; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //Metodo Simples | |
| function getRealIP() { | |
| if (isset($_SERVER['HTTP_CLIENT_IP'])){ | |
| return $_SERVER['HTTP_CLIENT_IP']; | |
| echo $_SERVER['HTTP_CLIENT_IP']; | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // PODEMOS PASSAR OS STATUS DE CABEÇALHO HTTP POR CODIGO COMO ABAIXO | |
| header("HTTP/1.0 200 OK"); | |
| // Neste caso podemos passar sempre HTTP/1.0 usar um (1) espaço, colocar o status em seu número, e depois mais um (1) espaço, e por fim seu texto que no caso acima é "OK" (sem aspas), mas todo este conteúdo deve estar entre aspas. | |
| //OU PODEMOS VERIFICAR O STATUS REAL QUE ESTA SE PASSANDO USANDO O QUE TEMOS NESTE IF ABAIXO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //╔══════════════════════════════════════════════════════════════════════════════════════════════════════════╗ | |
| //║ @AUTOR: DAVID SNEGE | |
| //║ | |
| //║ No alterar los códigos y tampoco los valores de cada operacion, tu solo tiene permisso de cambiar los | |
| //║ valores si por acaso el Planeta tierra cambiar sus dimensiones y los meridianos, de lo contra no cambie | |
| //║ ningum valor. | |
| //║ | |
| //║ Mirar los comentarios de cada linea para saber de que vá la cosa del calculo. | |
| //║ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // abrir un archivo para su lectura -- y subir este archivo | |
| $file = 'test.txt'; | |
| $fp = fopen($file, 'r'); | |
| // configurações de conexão ao FTP | |
| $ftp_server = "180.69.43.48"; | |
| $ftp_user_name = "usuarioFtp"; | |
| $ftp_user_pass = "senhaFtp"; | |
| $ftp_dirInt = "/web"; |
NewerOlder