Posts by Marcelo • 354 points
26 posts
-
-1
votes2
answers54
viewsQ: Run a PHP with GET parameters
I would like to run a PHP file with GET parameters. If an action is identified, a php file is accessed to capture this action. php test. Inside I want to run a PHP url with GET parameters In…
-
0
votes1
answer59
viewsQ: Capture Numbers in File and Save Answer (Linux)
I have a file with the following data: XXZ 000000000000012 MARCIO XXZ 000000000000022 NILSON XXZ 000000000000032 WALTER XXZZZ 000000000000042 CARLOS XXXZZZ 000000000000000 MARIA I would like to skip…
-
0
votes1
answer98
viewsQ: Long-running PHP script not completing until the end
I have the following code: <?php set_time_limit(0); ignore_user_abort(1); ini_set('memory_limit', -1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); /* CONECTION */ $conn =…
-
5
votes1
answer100
viewsQ: Amount of index influence on performance?
I have a relatively large database. And the consultation in it varies a lot and I have some doubts regarding performance: 1- Create multiple indexes, taking into account the Where (E.condicao = '1')…
-
2
votes1
answer31
viewsQ: Insert attempt before error (PHP)
I have a student enrollment system in a college system. Part of the code showing the error or not: while (($matricula = fgets($handle, 1024)) !== false) { $cont++; erro("Lendo matricula $cont de…
-
1
votes1
answer141
viewsQ: Access WS with file_get_content using proxy list
I have the following function: function pegarWS($numero){ $PEGAR_WS = 'http://ws.com.br'; $URL = $PEGAR_WS.$numero; $arrayReturn = json_decode( @file_get_contents($URL), true ); I wanted to access…
-
1
votes2
answers82
viewsQ: Capture the last PHP characters of an XML file
I have a sitemap file from my site. ... <loc>https://www.site.com.br/aluno/jose/11111111111111/</loc> <loc>https://www.site.com.br/aluno/jose/22222222222222/</loc>…
-
0
votes1
answer42
viewsQ: Get to display last URL characters
I need to take the last 14 characters of a relation of urls inside a . txt $url = file_get_contents('https://www.site.com.br/relacao.txt'); In relation.txt I have:…
-
1
votes1
answer49
viewsA: Creating automatic htaccess urls limiting minimum number of characters
Check out the response of var_dump ($nome) var_dump ($arrayReturn['nome']) And the logic is the same if( $nome <> $arrayReturn['nome']){ echo "Erro!"; exit(); } If I understand correctly, the…
-
0
votes1
answer483
viewsQ: Simple form protection to prevent spam
I have the following form: <!-- Comments Form --> <div class="card my-4"> <h5 class="card-header">Deixar um comentário</h5> <div class="card-body"> <!-- Comentar…
-
0
votes1
answer416
viewsA: Fill in SELECT via form (PHP)
I managed to solve my problem. I created an index.html file: <form action="script.php" method="post"> Coordenador <input type=text name=coordenador><br> Estado (UF): <input…
-
0
votes1
answer416
viewsQ: Fill in SELECT via form (PHP)
I have the following code: <?php include("conexao.php"); $sql = mysql_query("SELECT COUNT(*) FROM escola e WHERE coordenador IN (SELECT ec.coordenador FROM escola_coordenador ec WHERE…
-
2
votes0
answers368
viewsQ: Renaming multiple Linux files
I have several files: xaa.txt xab.txt xac.txt xad.txt até xcn.txt I need to rename all files to: nome1.txt nome2.txt nome3.txt etc... In order, that is, xaa.txt must be the name1.txt xab.txt must be…
-
0
votes1
answer69
viewsA: htaccess redirection
I got a solution to my problem. I added the following: RewriteRule ^(assets|css|images|js|fonts) - [L] Before the redirect: RewriteRule ([^/]*)\/([^/]*)…
-
1
votes1
answer69
viewsQ: htaccess redirection
I have the following redirect: RewriteRule ([^/]*)\/([^/]*) http://ip/~user/codigo.php?nome=$1&numero=$2 To generate the url: http://www.site.com.br/stackoverflow/123456 But there are other…
-
1
votes2
answers270
viewsQ: print PHP result on multiple TXT files
I have a PHP file that does a database search and generates all Urls, stored in the database in a single file. www.url1.com www.url2.com Etc... (per line) Would like to print out this result, from…
-
2
votes2
answers116
viewsQ: Invalid argument foreach() return empty message
<table border="1"> <?php foreach($arrayReturn['qsa'] as $value){ ?> <tr> <td>NOME:</td> <td><?=$value['qual'];?></td>…
-
2
votes1
answer83
viewsQ: Sitemap Mysql PHP divided into result quantities
<?php header("Content-type: text/xml"); echo'<?xml version=\'1.0\' encoding=\'UTF-8\'?>'; echo' <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"…
-
0
votes1
answer307
viewsQ: Capture e-mail from pages
I have an e-mail system with the address: http://www.site.com.br/123/123/123.php?p=1&codelist=1 that goes up to: http://www.site.com.br/123/123/123.php?p=460&codelist=1 (p=1 is the page)…
-
0
votes2
answers274
viewsQ: file_get_contets redirect user to url Random
<?php $Arquivos = glob('artis/*.txt'); $ArquivoEscolhido = $Arquivos[rand(0, count($Arquivos) - 1)]; $Linhas = file($ArquivoEscolhido); $LinhaEscolhida = $Linhas[rand(0, count($Linhas) - 1)];…
-
0
votes1
answer143
viewsQ: get content Random url inside txt file
I have several txt files inside a folder /pasta/1.txt /pasta/2.txt Etc.... Inside these files contains several urls Exemplo: /pasta/1.txt conteúdo: www.site.com/nome/jose.html…
-
0
votes1
answer267
viewsQ: Automatic form search using data from a string
I have a string $numero and it returns several numbers. I also have a home page (index.php) with a form as follows: <html> <body> <div width="100%" height="100%" align="center">…
-
0
votes3
answers122
viewsQ: file_get_content in part specifies the content of the sitemap
Guys, can someone help me: I have the following code: <?php $url = file_get_contents('https://www.site.com.br/sitemap.xml'); echo $url; ?> I need the following: The sitemap contains several…
-
0
votes1
answer25
viewsQ: Doubt blank PHP webservice request
Hello, I’m having a problem with one part of the code: function obterBD($nome){ // Conecatar banco de dados if(!$conn = connectBD()){ return false; } // Incluir/Atualizar retorno no banco de dados…
-
0
votes0
answers527
viewsQ: How to create a Chrome extension that adds code to the page
Extension Safe or not: I need to add in a specific page (preferably) or in all cases if a certain code is simpler. This here works: var meucode = 'alert("oi");'; var script =…
-
0
votes1
answer395
viewsQ: URL redirection Google extension
I have a silly problem, but I can’t solve it. Come on: I want to adapt this code var pattern=/\bBloqueado/; var viewtext = "http://www.google.com"; var newurl; if…