Posts by Ale • 2,461 points
113 posts
-
0
votes1
answer22
viewsQ: MYSQL - Select with Data Column Formatted with Convert
I have the table(tbl) with the following field id, date date is a varchar field, which has dates in the following format: "dd/mm/yyyy" I want to make a SELECT, date shown in ANSI format…
-
0
votes0
answers17
viewsQ: React PHP - 1006(Underlying Connection closed)
Periodically - and this time is not absolute, between 3~5 minutes, the connection I make via websocket (with the Ratchet library), returns me the following error(I capture in connection closure):…
-
0
votes2
answers78
viewsQ: Send information about the link clicked to the server before redirecting
How to fire an AJAX event when the user clicks on a link? Whereas, the link will redirect him to another page. I tried to carry out the process, however, sometimes the event is not triggered(I…
-
0
votes1
answer15
viewsA: How to get the Slug from the current page / for script queuing
The way to do that is to use the hook admin_enqueue_scripts to queue the files you need. This hook will be passed by a $hook_suffix related to the current page that is loaded. function…
-
-1
votes1
answer15
viewsQ: How to get the Slug from the current page / for script queuing
I am developing a plugin, and I would like to check which page of the plugin is being visited, because I have the goal to queue the scripts according to the page, because I currently realized that…
-
11
votes4
answers2055
viewsQ: SSL: no Alternative Certificate Subject name Matches target host name 'xxx'
Trying to run Curl in PHP gives me this error.. SSL: no Alternative Certificate Subject name Matches target host name 'xxx' I would like to better understand this, and even debug the problem.…
-
0
votes2
answers866
viewsA: PHP - Phpmailer: stream_socket_enable_crypto(): SSL Operation
Solved! Basically, I needed to update the Phpmailer class, and for that I followed this tutorial here: https://alexwebdevelop.com/phpmailer-tutorial/…
-
0
votes2
answers866
viewsQ: PHP - Phpmailer: stream_socket_enable_crypto(): SSL Operation
I am trying to send an email, I am using the Phpmailer library, and then the following error appears: stream_socket_enable_crypto(): SSL Operation failed with code 1. Openssl Error messages:…
-
2
votes0
answers28
viewsQ: About Wordpress - Post articles via API or
Hello, I have 5 sites in Wordpress.com, and would like to develop a way to send articles without having to login to each one... What ways do you have to do this? Is it via API? That’s it right…
-
1
votes1
answer388
viewsQ: Async Attribute and Defer Javascript - Async Pause Rendering?
I was reading again about async and Defer. I realized that Async, despite loading the script asynchronously, after loading, the HTML is paused to execute the script. Defer would work as an Async,…
-
4
votes1
answer360
viewsQ: Server DDOS attack
Hello, I have a server that is suffering DOS attack, I used the command: watch -n1 'attackers' in SSH to see the attacks. Basically it has an IP that makes some 380 connections, and makes the server…
-
1
votes5
answers1540
viewsA: Regex with Javascript - Taking only part of the string
In this case, for solution need to use the match function. This function will return an array with regular expression occurrences. In this application: string =…
-
1
votes5
answers1540
viewsQ: Regex with Javascript - Taking only part of the string
Let’s say I have the following string: str = "http://www.google.com/joao.pedro?a=b"; Then I want to take just the Joao. using Javascript. I believe you can do with Regex somehow, someone can help me…
-
0
votes1
answer98
viewsQ: setTimeout with each loop does not work
count = 1; $("a.btns").each(function() { if ($(this).parent("span").attr("id") == "btn_default") { return; } count++; these = $(this); setTimeout(function() { $(these).click(); }, 10000 * count);…
-
3
votes1
answer206
viewsQ: Extend PHP session using . htaccess
How to extend a session in PHP using . htaccess? I used this code below: php_value session.cookie_lifetime 28800 php_value session.cache_expire 28800 php_value session.gc_maxlifetime 28800 However I…
-
0
votes2
answers14723
viewsQ: Set Iframe to 100% height
How can I make an iframe occupy 100% of its screen size? Especially the question of height.. I tried to style='height:100%' but it doesn’t take. I need to put it and try as much as possible to do…
-
2
votes0
answers264
viewsQ: How to create Firefox extension
How to create an extension in Firefox? I want to develop an extension for personal use, as is developed an extension in Firefox, with javascript, folder structure and files in the directory of…
-
0
votes1
answer445
viewsQ: Create email account with PHP through CPANEL
I would like to know if it is possible to create an e-mail account using CPANEL, but not manually, but programmatically? I need to automate the creation, because manually it would not be possible to…
-
0
votes1
answer314
viewsQ: Facebook share and check if shared
I put a share button, it opens a new window to share what I set, and if shared I do an action, if not shared, I do another action. However, gives an error in this new window, Facebook itself: Unable…
-
-5
votes1
answer583
viewsQ: Cancel loop/script in progress on server
Good morning, how to cancel an Infinite Loop in the Script that is already running on the server? It was a routine I created to trigger emails, but by carelessness it is in infinite loop and the…
-
0
votes1
answer54
viewsQ: Navigator.useragent accuses Mozilla in IE
Navigator.useragent accuses Mozilla even being in IE 11, had thought it would be Internet Explorer or something like, which explains this fact? What to do to identify if the browser is IE or Moz..…
-
3
votes1
answer24415
viewsQ: Check if element exists with jQuery selector
Why is that, if (typeof($("div#elementoquenãoexiste")) !== "undefined") { console.log("existe"); } returns "existe" in the logs? Should not return undefined, taking into account that the element the…
-
0
votes0
answers41
viewsQ: class main in PHP file $_POST
I arrived in a situation that gave a result a little confused here.. I have a. php file in which I have a class called main, if I urge this class main -> $main = new main the $_POST array that…
-
2
votes3
answers1463
viewsA: Place images in a div with jquery
I suggest you create an array, where the indices will be the years, and the values your respective images, something like: arr['2015'] = "imgs/img_de_2015, imgs/img2_de_2015"; arr['2016'] =…
-
2
votes1
answer728
viewsQ: Curl looks 100% identical to my request using common browser
I need to perform some standard functions that I always perform manually, and I would like to automate it. I tested with iframe, but without success, can not read the document nodes. So I thought…
-
1
votes3
answers3683
viewsQ: Run Javascript in the URL(plugins.)
How do I run snippets of Javascript in the address bar, I tried in Firefox something like: javascript: alert("lol"), but it seems to be an old and not working technique(at least not in Firefox). The…
-
1
votes1
answer553
viewsQ: .HTACCESS doubts(special mod_expires)
I would like to better understand how this module works, in particular I leave as an example what is in the Root folder of one of the sites I handle: <IfModule mod_expires.c> ExpiresActive On…
-
3
votes1
answer120
viewsQ: counter_cpu_share_used with red alert - Powerpanel
Resource counter_cpu_share_used red alert on environment 170 dominio.com current value: 89 soft limit: 85 hard limit: 95 Sometimes in the resource log of this red warning, what worries me, the…
powerpanelasked Ale 2,461 -
2
votes1
answer62
viewsQ: store SQL query in Session for further processing
I would like to store an SQL query in a Session, that is, all fields and their respective values. I’d say it’s about 12 fields, and about 150 records on average. The idea is not to have to consult…
-
2
votes1
answer56
viewsQ: System in PHP Reply in Parts
I saw that it is possible to make a system in PHP that responds in parts, I did not apply, but basically would use this function: ob_implicit_flush() So any output would be sent directly to the…
-
0
votes2
answers2561
viewsQ: Where is the Aliexpress API
Well, I can’t find where the Aliexpress API can be, to give me some features and leave some things I do manually, automatic. Not that I think it’s the company’s obligation to provide an API, but I…
-
0
votes1
answer168
viewsQ: Why include Html5.js file
I see that some sites include a file called Html5.js, for what purpose they include this? Something like that: <!--[if lt IE 9]><script…
-
4
votes2
answers197
viewsQ: How to detect attempted intrusion?
In order to protect against SQL injection, I need to elaborate a function in which I eliminate the possibility of someone trying to act in bad faith. The question is, mysqli brings with you some…
-
12
votes3
answers1195
viewsQ: PHP + Delphi(Pascal), issue real-time warnings
I would like to design a small, simple system encoded in the Pascal language (IDE Delphi), to receive notifications (such as a warning that an event has occurred), upon receiving the warning play…
-
0
votes1
answer620
viewsQ: HTML manipulation with PHP/JS
How to get content from a page with Javascript? With the content obtained through Javascript (or PHP), how to manipulate it in both languages, in order to read the values, as we do in Javascript…
-
6
votes2
answers1493
viewsQ: Share the same Session on Different Domains on the same Server
You can share the same session between different domains on the same server? If possible, what to do to achieve such a feat?
-
2
votes1
answer114
viewsQ: script does not load and dependencies fail
Sometimes I notice that a script does not load, and the rest of the scripts that somehow use it, end up failing. What to do to recognize when not loaded and try another alternative(like loading from…
-
7
votes2
answers9043
viewsQ: What’s the meaning of error 406?
Not Acceptable An appropriate representation of the requested Resource /aa/bb/cc.php could not be found on this server. Additionally, a 404 Not Found error was encountered while trying to use an…
-
13
votes1
answer1431
viewsQ: Difference between pseudo-class (colon :) and pseudo-element (double colon :: ) in CSS
I would like to know the differences between these two concepts of CSS in order to understand and point out what one is, and what may be the other. For example: :hover, ::before. What I’ve…
-
2
votes2
answers1317
viewsQ: Why content-type false AJAX - JQUERY
I am sending files via AJAX with Jquery, using the FormData(), and then a question arose, why does it work: $.ajax({ url:"action/receipt.php", method:"POST", processData: false, contentType: false,…
-
7
votes4
answers989
viewsQ: Read input value type file doubt
A question, why does it work: $("input[type='file']")[0].files[0] and that’s not? $("input[type='file']").files[0] // TypeError: $(...).files is undefined…
-
4
votes1
answer694
viewsQ: Double-hand encryption with fixed LENGTH
Does anyone know any way to encrypt any data, two-Handle, so I can decrypt it? I loved the MD5 and the way it fixes the length of the hash, the problem is that there is no way to decrypt…
-
2
votes1
answer673
viewsQ: Range of dates VARCHAR/DATE
I have a date field (type VARCHAR) in my table, and recently I needed to search the database with date range. And for that I used the operator Between, getting something like: BETWEEN 15/08/2015 AND…
-
14
votes1
answer2472
viewsQ: What is spl_autoloader_register in PHP?
What is the role of the spl_autoloader_register, and in which possible scenarios this function could be included?
-
3
votes2
answers239
viewsQ: How to place a property name on a Javascript object?
js = { p1: { qq: "qq_val", }, p2: [{ qq: "qq_val", }] }; json = JSON.stringify(js); console.log(json); // {"p1":{"qq":"qq_val"},"p2":[{"qq":"qq_val"}]} Well, I just wanted to name the property, so…
-
1
votes1
answer280
viewsQ: Mysql - check occurrence in all fields
How to check the occurrence of a string in any field? Nothing specific like WHERE campo1 = "abcd", since I want to check the occurrence in any field. which is something different also from the…
-
5
votes2
answers604
viewsQ: Ternary Operator, is_array, unexpected
Look at that. Follows the instruction $var = 123; echo "valor de var: " . is_array($var) ? implode("-",$var) : $var; There goes the following mistake: implode(): Invalid arguments passed. I hoped…
-
3
votes1
answer104
viewsQ: Unexpected Behavior, XOR Logical Operator - PHP
why it is possible to see this behaviour of the logical operator xor? $bool = false xor true; var_dump($bool); // bool(false) $bool = true xor false; var_dump($bool); // bool(true) from what I read,…
-
5
votes1
answer134
viewsQ: Power Panel, WHM and Cpanel, what are their differences?
Well, I would like to know the difference between these three terms, which I believe designate the level of access to server resources, for me, WHM is related to server account management, Cpanel…
-
5
votes3
answers1117
viewsQ: Read Remote Server log.txt on Real-Time Local Server
Those days passed the idea (I must have read somewhere and refreshed) of having a program on the local server that is synchronized with the remote server, where in this program I can see in real…