Posts by Pedro Augusto • 2,392 points
126 posts
-
0
votes1
answer32
viewsA: how to receive a connection failure if the update is not successful?
With the mysql_affected_rows you can see how many records were affected. If zero, update failed. $link = mysql_connect('localhost', 'mysql_user', 'mysql_password'); if (!$link) { die('Não foi…
phpanswered Pedro Augusto 2,392 -
1
votes1
answer88
viewsQ: Reading via Socket
I am reading strings sent via socket to a Java server. I get a line but when I read it it comes with break, looking like two lines. What I got should be: 78780103554880201238560006d0d8 But it comes:…
-
6
votes2
answers280
viewsA: Assemble date/time from month informed by user
It can be done like this. $data = date("Y-".$mes_informado."-d H:i:s")
phpanswered Pedro Augusto 2,392 -
1
votes1
answer198
viewsA: Filter linking words from phrase elements
Utilize in_array to see if the word you want to take exists. $string = "o rato roeu a roupa do rei de roma" ; $frase = explode(' ',$string); $retirar = array("a", "e", "i", "o", "u", "A", "E", "I",…
phpanswered Pedro Augusto 2,392 -
2
votes1
answer1372
viewsQ: Convert binary to hexadecimal
Is there any function equivalent to php bin2hex() for Java? I need to convert a binary to hexadecimal.
javaasked Pedro Augusto 2,392 -
4
votes4
answers23448
viewsA: Vehicle consultation by the Board on the site sinesp via PHP - without captcha
"People after the decompiled apk understood the new method they used to obfuscate the new available the https://sinespcidadao.sinesp.gov.br/sinesp-cidadao/ConsultaPlacaNovo the key is the same !…
phpanswered Pedro Augusto 2,392 -
5
votes3
answers6678
viewsQ: Equivalent to PHP LIKE
How to compare two PHP strings in the same way as LIKE in mysql. For example: "PARA" would equal "PARALLEL", "PARALLAX", "PARALLELEPIPED", "PARAMETER" ... because it has the same beginning. But…
phpasked Pedro Augusto 2,392 -
1
votes1
answer81
viewsQ: Binario to Hex
I am developing a server that accepts connections via socket. But the information received is in binary and during printing appear strange characters. I believe that the conversion or the way I read…
-
2
votes3
answers1170
viewsQ: Count Mysql records
I have a table where I store sales performed. The need to order sellers by quantity of sales has arisen. In case of a tie who made the most recent sale comes first. I can bring with sql below, the…
mysqlasked Pedro Augusto 2,392 -
0
votes3
answers4002
viewsA: Div one on top of the other
RESOLVED ! According to the comment of the devgaspa. I found it simpler and as solved, nor tested other methods. THANK YOU Using the flex-box property of css3 I was able to do what you needs, but…
cssanswered Pedro Augusto 2,392 -
7
votes3
answers4002
viewsQ: Div one on top of the other
I have a sequence of Divs being generated by a script. I would like them to be below each other and when I reached the maximum height of the father, they would enter the side . Currently putting…
cssasked Pedro Augusto 2,392 -
2
votes3
answers2111
viewsA: Convert date format DD/MM/YYYY to YYYY-MM-DD stored in a scan
If you are receiving the mysql date and want to convert to Brazilian format use the following command: $data = implode("/",array_reverse(explode("-",$data))); This will create the mysql date in…
mysqlanswered Pedro Augusto 2,392 -
0
votes3
answers7203
viewsA: Pass Javascript parameter to PHP
Use ajax: $.ajax({ type: "POST", data: {variavel: 'valor'} , url: "arquivo.php", success: function(resposta){ alert(resposta); } }); That way you give a Javascript PHP pro POST.…
-
3
votes2
answers3059
viewsQ: Consult CPF in the IRS
I would like to somehow consult the name of the person through the CPF on the website of the recipe. There are apps on android that just put the CPF and it brings the name and the cadastral…
-
6
votes1
answer1179
viewsQ: Send SMS via Php
I was using a gateway for texting (nowsms) however the evaluation period ended and I went to buy the license, U$995 to send 12 sms per minute, I did not find viable. Searching found a Php-Serial…
-
1
votes1
answer775
viewsQ: Fopen Permission denied
I’m trying to read a file TXT on the network, but the PHP always returns permission error. The folder is shared and I can see it over the network windows. Server use Windows with IIS7. In the xampp…
-
1
votes1
answer143
viewsA: Ajax saving dynamically
The parameter data shall contain the serial form. <script type="text/javascript"> jQuery(document).ready(function(){ jQuery('#cadUsuario').submit(function(){ var dados = jQuery( this…
-
2
votes1
answer375
viewsQ: Read dbase in PHP
In the company has a software in Clipper, which saves the information in dbase (bank data.dbf), now arose the need to integrate it with PHP but I can not use the functions dbase. I already enabled…
-
1
votes4
answers572
viewsQ: Upload Ajax - Php
I am trying to upload a PDF file via Ajax and Php. But I can’t. HTML <script> var client = new XMLHttpRequest(); function upload(){ var file = document.getElementById("uploadfile"); var…
-
4
votes2
answers2564
viewsQ: Search for file in directory
I have a directory on the network with thousands of TXT files generated by another software hired in the company. The file is named with the following logic: (cpf do cliente)(data da insercao)(hora…
-
1
votes3
answers121
viewsQ: Select union rest between tables
I have two tables, customers and sales. I would like to know which customers have no sale, and store in the sales table the customer ID. I tried it but to no avail: SELECT * FROM cliente RIGHT JOIN…
-
12
votes4
answers23448
viewsQ: Vehicle consultation by the Board on the site sinesp via PHP - without captcha
Someone managed to query Sinesp, via php ? I’m trying to get this code to work but without success. $placa = 'KCK2486'; $request = '<?xml version="1.0" encoding="utf-8" standalone="yes"…
phpasked Pedro Augusto 2,392 -
0
votes1
answer3187
viewsQ: Convert HTML to Wordpress
There is a simple and fast way to migrate a static website on HTML for Wordpress ? Only HTML as a theme for WP
-
2
votes2
answers791
viewsA: Return calculation to <textarea>
In AJAX <script> $(document).on('click','#enviar',function(){ $.ajax({ type: "POST", data: { valor : $('#area_1').html() }, url: "calcular.php", success: function(resposta){…
phpanswered Pedro Augusto 2,392 -
4
votes1
answer1614
viewsQ: Writing in Rectangle - HTML Canvas
I’m using the following code var canvas = document.createElement("canvas"); canvas.width = 55; canvas.height = 20; var ctx = canvas.getContext("2d"); ctx.fillStyle = "red"; ctx.fillRect(0, 0, 100,…
-
1
votes1
answer239
viewsQ: Clearinterval does not work
I have a script that does an Ajax Post from time to time. upgrade(); $.ajax({ type: "POST", url: "processar.php", success: function(resposta){ $("#resposta").html(resposta);…