Posts by chambelix • 2,451 points
75 posts
-
1
votes1
answer163
viewsA: How to safely use passwords within an Android app?
The best way to answer the question is: Do not store your password in the code as it will be easily read. Of course a solution to your question also depends a lot on the service your application is…
-
1
votes2
answers763
viewsA: How to receive JSON values and right after inserting them into the PHP database
While trying to understand your code snippet, I note that the error you have, is due to the form HTML use the method POST and then wants to obtain these variables in $_GET what cannot be will need…
-
1
votes2
answers253
viewsA: Replace in large string or split loop
I found this question very interesting because in this area of programming the details are very important especially for those who deal with large amounts of information. In that sense I would like…
-
4
votes2
answers1218
viewsA: Integration with Wordpress authentication
I refer to my experience in a solution I worked on. In my specific case the authentication system was independent of Wordpress and the management system. In Wordpress a plugin built for this purpose…
-
1
votes1
answer375
viewsA: List several ul inside a li using AJAX
If I understand correctly, you want to dynamically place a <ul> within a <li> returned by AJAX and if I understood correctly want to do it with JQUERY. I put here an example that answers…
-
3
votes1
answer198
viewsQ: Case or lower case use in UUID
I know that the Standard defines for the UUID that should be indicated with the presence of numbers and lower case letters. RFC-4122 says that: Each field is treated as an integer and has its value…
-
6
votes1
answer751
viewsA: Prevention Session Hijacking
First of all I want to say that in safety the problem is never final. That said and without talking about other topics related to the sessions and responding to the specific case of Session…
-
2
votes1
answer84
viewsA: Password - Binary Modular Crypt Format
For not getting any answer to my question I ask what my decision is hoping that it will be useful for someone. My starting point was to reduce the size of the database that is broken down by several…
-
2
votes2
answers479
viewsA: Login to a web site by the program
I find myself developing a project where the essence is almost the same... A desktop software that accesses a php and mysql system that holds user identities. When reading your question and…
-
2
votes2
answers14672
viewsA: Refresh the contents of a page without reloading it
Everything is fine until the moment of SUBMIT that when used in a form is managed in a very specific way or is an element from which is expected a "default" action and so happens the "Reload" or as…
-
3
votes1
answer84
viewsQ: Password - Binary Modular Crypt Format
I am currently reducing the size of a database and several are the techniques used. However, I have a question about the decision to make at a point and I would like someone to help me. In the model…
-
5
votes6
answers1117
viewsA: Algorithm against Brute-force
I have read all the answers and I agree with all of them. However I would like to introduce the theme of server responsiveness or server pool. But before and looking at the question I want to add…
-
3
votes1
answer2690
viewsA: How do I save the IP of the person who visited my site to a text file?
using the code placed in question ... I just remembered this way... <?php $arquivo = "ips.txt"; $string = $_SERVER['REMOTE_ADDR'] . "\n"; // ao usar FILE_APPEND para adicionar ao ficheiro estamos…
-
1
votes1
answer93
viewsA: Error Javascript function
on the line: function pesquisa(array[], num){ modify to: function pesquisa(array, num) { and everything will work as expected
javascriptanswered chambelix 2,451 -
2
votes2
answers170
viewsA: Problems in PHP call
I’m sorry I would try to help but since I don’t agree with the form of what is exposed I prefer to recommend the following: first: Pass content to javascript variables... example: in html...…
-
2
votes2
answers1115
viewsA: Count visible and active inputs in my form
First of all I do not understand the need to define class="form" for each field but assuming it is a special requirement for the intended, I would like to refer to a form that I consider more…
-
2
votes1
answer899
viewsA: What are the advantages of PDO::FETCH_OBJ?
ASSOC, BOTH and OBJ result in the same internal code call, so the difference can only be found in what is returned. The simplest answer will be to indicate that "There is no difference in…
-
11
votes7
answers20768
viewsA: How to protect source code?
Having read the various answers, I want to say that I agree with the majority, but having debated myself not so long ago with the same problem I would like to raise a few points that I think are…
-
1
votes4
answers6839
viewsA: Block pages using login and Session
I took the liberty of creating this class start that goes against the nominee. this way in the future will be included all the logic necessary for your project adding a method to class. Is a…
-
0
votes4
answers2802
viewsA: How to import classes from your subclasses in PHP?
The best mechanism will be through an autoload mechanism of the type: function autoload($class) { if (file_exists(LIBS_PATH . $class . ".php")) { require LIBS_PATH . $class . ".php"; } else { exit…
-
0
votes4
answers4185
viewsA: How to separate values from a php variable?
Both answers are right but it all depends on the way it is intended to get the desired. So, if the intention is to separate character from character then the 'Earendul' response is the best option.…
-
1
votes3
answers1513
viewsA: Is there an application security flaw when using AJAX?
Agreeing with the 'Rgio' answer.... My answer is to introduce the "session" in the answer. It is not recommended nor to carry out from the security point of view pass sensitive information from php…
-
3
votes2
answers825
viewsA: Block PHP page to only display data if it is an AJAX request
I agree with the reply of Marcelo Diniz however I want to say that the answer can be a little more complete. To make the solution more robust beyond the verification of the HTTP_X_REQUESTED_WITH the…
-
2
votes1
answer227
viewsA: When I run the client, the server shuts down, why?
The problem is after analyzing and testing the code and in direct response to the problem placed, in the class "Attendant" the code snippet: System.out.println("Terminating Connection"); close-up();…
-
2
votes3
answers5429
viewsA: Compile jar for exe and no longer need to have a JRE
Once dependent on the JVM forever dependent on it. So as to the question of not needing the JRE the simplistic answer is... impossible, because the code is based on functionality and JAVA code that…