Posts by Gustavo Dias • 460 points
24 posts
-
2
votes1
answer188
viewsA: Get back in PHP JSON
Try to use the function json_decode(); <?php $json = json_decode(file_get_contents('php://input'), true); $uuid = $json['uuid']; $payment_type = $json['payment_type']; $amount = $json['amount'];…
-
0
votes0
answers833
viewsQ: Outdated version when looking for vehicle by the plate in the SINESP web service
Looking for about consulting vehicles by board in Git, I found a client made by Victor Torres updated with the latest version of SINESP, tried to convert to PHP and got the following code: <?php…
phpasked Gustavo Dias 460 -
1
votes1
answer665
viewsQ: Problem when creating an image with transparent background
Hello, I’m trying to create a PHP image like the emails of offers sent automatically by Casasbahia. Example of the Casasbahia; I searched the Internet and found the following code that helped me a…
-
0
votes1
answer159
viewsQ: Press virtual keyboard buttons according to password
I made a virtual keyboard that generates the numbers and returns in json, for example: [0] => Array ( [a] => 1 [b] => 5 ) [1] => Array ( [a] => 6 [b] => 7 ) [2] => Array ( [a]…
-
2
votes2
answers239
viewsQ: Separate email and user only from a string
Hello, I have the following string: $string = uniqid(mt_rand(1, 999999))." [email protected]|example123456" The string above is totally random, the only thing that doesn’t change is…
phpasked Gustavo Dias 460 -
0
votes1
answer1927
viewsQ: How to post with Request Payload
I have the following code: $url = 'https://www.habbo.com.br'; $email = '[email protected]'; $pass = '123456'; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, 1);…
phpasked Gustavo Dias 460 -
3
votes2
answers124
viewsQ: Mysqli does not run Insert within a function
I have that function: function envia($mensgem) { $odb = mysqli_connect(HOST, USER, PASS, DATABASE); mysqli_query($odb, "INSERT INTO pedidos VALUES ('$mensagem')"); mysqli_close($odb); } I use this…
-
1
votes1
answer346
viewsQ: Error using PDO prepare() function
I’m on a new project, and I need to use the prepare() of the PDO, I do not know why, but only with him who is giving this error, every time it has some function, or some line with prepare(), PHP…
-
1
votes2
answers296
viewsQ: Hide half an icon on a Card
I have this code (Bootstrap 4): <link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/css/bootstrap.min.css" rel="stylesheet"/> <script…
-
4
votes1
answer489
viewsQ: Catch text between a tag
I have this string <td id="aui_3_2_0_1196">500</td>, would like to take the value 500 between the tag beginning and end (<td id="aui_3_2_0_1196"> and </td>).…
-
4
votes5
answers2081
viewsQ: Hide the last 4 numbers from a string
I have a string of value 187.10.61.291, I want a function that takes the last 4 numbers and turns into *. Example of expected result: 192.1**.*.* or 192.16*.**.* or 192.168.***.* or 192.168.**.**…
phpasked Gustavo Dias 460 -
-1
votes2
answers104
viewsQ: Mysql connection error
I’m using this code: <php? $sql = mysql_query("SELECT `id`, `detail`, `time` FROM `news` ORDER BY `time` DESC LIMIT 5"); $return = mysql_fetch_assoc($sql); while($row = $return) { ?> Data:…
-
1
votes3
answers6527
viewsA: How to release port 80 to Apache?
See if Skype is open, and other programs that use port 80. Most of the times it gives a port error 80 already in use, is the Skype that is open.
-
0
votes1
answer644
viewsQ: Get the Urls from the Google search result page
Hello, I would like some API or any way to get the Urls that Google returns when doing a search. For example, I did a Google search with Curl looking for Walmarts, I would like PHP to return me all…
-
3
votes3
answers316
viewsQ: Separate values from a string and execute a function with the same
Hello, I have a string that the value is zero ($contador = 0;), other that the value is three ($vezes = 3;) and another that is $numeros = "13|123456789\n14|123456780\n". I want PHP to do a function…
phpasked Gustavo Dias 460 -
0
votes1
answer143
viewsQ: How to compress a bzip2 file by PHP
Hello, I need to compress files by PHP, and save them in a folder, searched the web, but only found how to compress a string. For example: When the user accesses the URL x.php?arquivo=exemplo.jpg…
phpasked Gustavo Dias 460 -
0
votes1
answer47
viewsQ: str_replace only replaces the second array
Hello, I have a problem that I’ve tried to fix in many ways, but I can’t! I’ve searched the function str_replace() in the php.net and nothing! I have the following code: $cod = '192.168.1.1'; $char…
-
1
votes2
answers410
viewsQ: Array with a text file
Hello, I need a method that PHP will read a text file. An example of what the file will contain: none|link So when PHP finishes reading the file, it gives an array with the name and link, for…
phpasked Gustavo Dias 460 -
2
votes1
answer72
viewsQ: Change Bootstrap navbar theme
Hello, I searched a lot on the internet a method that I can change the theme of the Bootstrap navbar by clicking a button. Navbar when the user accessed the site: When the user clicked on the…
-
2
votes1
answer266
viewsA: Check whether typed text already exists in a text file on a website
Maybe this can help you: Imports System.Net Imports System.Management Public Class Form1 Dim Web As New WebClient Dim Endereco As String = "http://exemplo.com" Dim Server As String = Endereco &…
vb.netanswered Gustavo Dias 460 -
-6
votes1
answer573
viewsQ: 5x5 Matrix with Portugol - Learning to program
I’m a student and I’m starting to learn about programming, I have an exercise that I couldn’t solve myself and I was wondering if anyone here could help me, with the solution and/or with an…
-
-2
votes2
answers1198
viewsQ: Check for capitalized words
How to check if a string contains uppercase words in PHP? I have a log page, check this when the user logs.
phpasked Gustavo Dias 460 -
0
votes3
answers2529
viewsQ: Using the Google Maps API for certain Longitude and Latitude
I am creating a site, I want in it when a user put in an input to longitude and latitude, google maps returns to exact location, I’ve seen several tutorials talking about google maps api but I…
-
0
votes1
answer80
viewsQ: How to Resolve Settingsfile File Error
I’m creating a project and in it, I use a theme to look good. When I put the theme, all right, there was no mistake or anything, just today, that gave this problem, and I can not see the Form. The…
vb.netasked Gustavo Dias 460