Questions tagged as 'php'

3
answers

How to register a log in PHP?

I have a code in php that is doing checks on the server and when it is online or offline it returns a different message: <?php $server='LOJA 01 - '; $conectado = @ fsockopen('10.200.0.100', 135, $numeroDoErro, $stringDoErro, 1); // Este ú...
asked by 11.09.2016 / 20:18
1
answer

What is the relationship between OOP and code security?

Is there any basis for thinking that an object-oriented programming style is safer than structural?     
asked by 11.08.2015 / 04:00
2
answers

How to check if a value is iterable by foreach in PHP?

In PHP, not only arrays are iterable, but also some specific objects. For example, objects that implement the interface Iterator or even IteratorAggregate . Another example is stdClass and ArrayObject , which ite...
asked by 11.01.2017 / 12:42
2
answers

Record audio and stream live

I need to record audio and stream live, I discovered that with HTML5 and JavaScript / jQuery it is possible and that it has plugins that can help me. I'm using one of them, the MediaStreamRecorder and I'm recording and streaming live to myself...
asked by 01.06.2014 / 06:16
2
answers

How can I get HTTPS in my web application?

In this link I learned how HTTPS works: StackOverFlow - How HTTPS works But I do not know which applications I should use, and how to get HTTPS, if it depends on some host , programming language etc. For more detail I say, my applicat...
asked by 16.01.2015 / 16:06
5
answers

Why is a non-value variable considered uninitialized?

I noticed that PHP returns that a variable was not started if it has no value assigned to it. In my opinion, it does not make sense because the variable has already started and waits for a value. Example: class Users { public $username;...
asked by 25.08.2015 / 02:00
3
answers

How to convert seconds to the "Time: Minute: Second" format?

How can I convert a value in seconds to a format of 'hours: minutes: seconds'. Example: 685 converted to 00:11:25 How do I get there?     
asked by 21.07.2015 / 23:54
2
answers

What does PSR mean?

Hello everyone, I recently found a term called PSR in the PHP area, but the topic was not very enlightening in defining the real meaning of the word PSR, I saw that it was related to the Object Oriented area, I did a google search and I did not f...
asked by 12.09.2014 / 15:14
2
answers

How to continue running a script, even after sending the data to the browser?

When I asked the question What is the solution for asynchronous processes in PHP? , basically what I had in mind was this question:    "Is there a way to complete a request from a client, but leave a process running in the same script that s...
asked by 30.09.2017 / 17:30
2
answers

How to pass Int to Base64 in PHP?

Base64 can store 6 bits for each character used. Assuming we are using int64 or uint64 we use 64 bits, which could be represented in ~ 11 characters. I've tried answer this question , but PHP fails to convert the values correctly. $int = 5...
asked by 31.12.2017 / 21:56