Questions tagged as 'php'

1
answer

Using Stratum protocol in PHP is it possible? Is there any equivalent to Go's 'net.Dial'?

I wanted to use the Electrum servers, listed here , it uses a protocol called " Stratum, "which is documented here , but I do not even know it's the most up to date one. I can "work" using the tls library and net (in case I do...
asked by 07.09.2017 / 00:36
1
answer

PDO without JSON support

I need to return a row in JSON, but the PDO does not seem to give full support to operations. Always the type 245 error message.    PDO :: prepare (): Unknown type 245 sent by the server. Please send a report to the developers I tested...
asked by 18.07.2017 / 05:19
3
answers

Doubt with table relationship

Good evening I have the following BD in MySQL CREATE TABLE IF NOT EXISTS 'cad_cliente' ( 'id_cliente' smallint(5) unsigned NOT NULL, 'nome_cliente' varchar(45) NOT NULL, 'nome_dr' varchar(45) NOT NULL, 'email_client...
asked by 12.06.2015 / 22:42
4
answers

How to limit PHP words

Hello, I would like to know how I limit the text I pull from the database. For example, I have a text called: Lorem ipsum dolor sit amet. And I wanted you to limit the text by pulling, it would look like: Lorem ipsum dol ... &l...
asked by 26.06.2015 / 18:41
2
answers

Explode () 'manual' in PHP

Just because of the challenge and the pleasure of programming I'm trying to recreate the explode() function in PHP. This is what I have so far: function explode_by_me($divideBy, $str) { $element = ""; $elements = array(); for...
asked by 26.06.2015 / 13:09
1
answer

Using Foreach in PHP

The foreach constructor provides an easy way to iterate over arrays . In several scripts we can observe the following usage: foreach ($array as $value) { $value = $value * 2; } However, in some cases the following use is possibl...
asked by 16.06.2017 / 16:41
1
answer

Select (combobox) Dynamic

I need to use a dynamic select on my page, in which when I select the state (UF), it shows me in the next select only the cities of this UF. In the same way the neighborhoods. All of this information is already in the database....
asked by 16.02.2017 / 20:27
2
answers

Store multiple select in a column only with PHP / javascript + MySQL

I'mhavingahardtimestoringselectmultiplesinthesametablefield.Inthiscase,whenfillingouttheformandmarkingmorethanoneselect,itstoresonlyoneandtheinputquantityfieldthatisinjavascriptdoesnotstore.HowcouldIdoittostoreeverything<?phperror_reporting...
asked by 18.01.2017 / 23:07
1
answer

Is it possible to run a different PHP in a particular folder?

I have a problem: The server uses PHP 5.3, which is very old but can not be changed. I have a script that requires PHP 5.4 +, is the Ratchet websocket. Is it possible to install a separate PHP to be used only in the folder where this script i...
asked by 24.01.2017 / 17:53
1
answer

Problems with PHP regular expressions?

I'm picking up a .txt file and removing the letters and lines in white. Tá giving problem with the special character \t or \s it does not recognize. The code below: <?php function pass1() { $treat = fopen ("C:\U...
asked by 13.02.2017 / 19:03