Posts by Leandro Costa • 2,172 points
38 posts
-
2
votes1
answer871
viewsQ: PHP authentication Oauth2
I’m doing a Restful web service, Oauth is the best way to authenticate and work with token? You can use Oauth2 to authenticate via user and password?
-
1
votes2
answers1757
viewsQ: Restful Web Service Authentication with PHP
Hello I am developing a Restful api, but I wonder if it is safe to authenticate users by passing the token in the url? And if there is any other safer method.
-
0
votes10
answers360
viewsA: Organization of CSS
I like to organize my css with pre-processors, I use the SASS http://sass-lang.com, I also use a methodology called SMACSS https://smacss.com/ where it teaches how to make a modular css…
-
0
votes2
answers114
viewsQ: Problem returning the size of a file with PHP and Curl
I am trying to return the size of a file with php and curl from an external host but when running Curl download_content_length comes as -1, could someone help me?…
-
4
votes1
answer931
viewsQ: Persistent connection to Mysql database
Hello would like to know if I keep an open database connection(persistent connection) is better than I always close after a query?
-
2
votes1
answer581
viewsQ: Block login via CURL PHP
I have a login form that sends data via post and would like to block the login via Curl. That’s possible?
-
4
votes2
answers2256
viewsQ: Login system back to previous page in php
I would like to make a system that the user when trying to access a url that needs to be logged in the script checks if it returns false it redirects to the login page and after logging in it…
phpasked Leandro Costa 2,172 -
3
votes2
answers1836
viewsQ: Download file with Curl and php
I have two servers server1 and the server2, the server2 only accept request from server1 if it is another ip it returns 404, my website is on server1 and the files for download on server2, I made…
-
5
votes1
answer749
viewsQ: Query in mysql with hierarchy
I have a table called 'departments' with the following structure: CREATE TABLE `departments` ( `id` tinyint(255) NOT NULL AUTO_INCREMENT, `company_id` tinyint(255) NOT NULL, `name` varchar(255) NOT…
-
1
votes2
answers1970
viewsQ: How to control Youtube video borders
How to soak a Youtube video without leaving this black embroidery on the sides. I’d like to leave it 100% wide but at a certain height someone could help me?…
-
1
votes2
answers277
viewsQ: Query using INNER JOIN with problem
I’m making an appointment using INNER JOIN, but when I do the JOIN on the table A with the B and there is no id in the table B, he returns me a array empty. I would like it if it did not find the id…
mysqlasked Leandro Costa 2,172 -
3
votes2
answers397
viewsQ: Increase an index to a certain number and then decrease until reset with jquery
How can I make a script in jquery to increase an index to a certain number and then decrease one by one until zero. I’m doing it the following way to increase but I would like that when it reached…
-
5
votes4
answers5851
viewsQ: How to order a Mysql search with date in d-m-Y format?
The date on my bank is saved as follows dia-mês-ano. I would like to know how I can sort by date using this date format.
mysqlasked Leandro Costa 2,172 -
8
votes2
answers3832
viewsQ: How to capture microphone audio using HTML5 Audio API?
How do I capture microphone audio using the HTML5 Audio API and play it at the same time?
-
1
votes2
answers1383
viewsA: How to modify a wordpress plugin’s menu title?
When you use add_menu_page it automatically creates an item with the same name, you can use add_submenu_page and create an item called Galleries, and delete this Gallery, the code looks like this:…
-
1
votes2
answers1529
viewsA: Image URL with the_post_thumbnail()
You can do it this way: <?php $imagem = wp_get_attachment_image_src( $attachment_id, $size, $icon ); ?> <img src="<?php echo $imagem[0]; ?>" /> Here is the documentation if you…
wordpressanswered Leandro Costa 2,172 -
2
votes1
answer8559
viewsQ: How to export a table to CSV using PHP?
I have a contact table, I would like to know how to export it to .csv using PHP?
-
14
votes4
answers10727
viewsQ: What is the Mysql CREATE VIEW command for?
I wonder what the command is for CREATE VIEW mysql?
mysqlasked Leandro Costa 2,172 -
2
votes4
answers24621
viewsQ: Program to manage Mysql database on Windows?
Can anyone tell me any program to manage database mysql on Windows? On Mac I use a call Sequel Pro, but it is only for Mac. Does anyone know anything like?…
-
2
votes2
answers330
viewsQ: Line break problem and subster in php
I made a rectangle that contains the title of the article, this title is limited using the replace php, but when a word is large it breaks the line by continuing the text below, but the number of…
phpasked Leandro Costa 2,172 -
3
votes3
answers290
viewsA: Unmark a category x of all wordpress posts
Be able to uncheck all posts containing an "x" category using the following query: DELETE FROM `wp_term_relationships` WHERE `term_taxonomy_id` = id_categoria
wordpressanswered Leandro Costa 2,172 -
2
votes3
answers290
viewsQ: Unmark a category x of all wordpress posts
Is there a method to deselect a category "x" of all wordpress posts, without needing to enter one post at a time and deselect the category?
wordpressasked Leandro Costa 2,172 -
12
votes2
answers33836
viewsQ: Vertical alignment of text with CSS
How can I align this text "Adopt the rhythm of nature: her secret is patience", vertically and horizontally within the white field? I used the following code: <ul> <li> <a> adote o…
-
2
votes5
answers491
viewsQ: Product search by name and brand
I have two tables, one call brands with product brands and another call products. Within that table products has shirts, pants and etc. I want that when making a search, for example "Hollister…
-
13
votes3
answers3756
viewsQ: Problem using subst in text with PHP
When using substr in a variable with text, it is returning a special character " "someone could help me? I’m using the following code: $excerpt = get_the_content(); $excerpt =…
-
1
votes3
answers1458
viewsA: Show post_types linked to a taxonomy
Only use the following code and change the $type variable to the name of your taxonomy. $type = 'nomedataxonomia'; $args=array( 'post_type' => $type, 'post_status' => 'publish',…
-
1
votes2
answers254
viewsA: News just for certain group on wordpress
It wouldn’t be better for you to change the key to cliente_group and its value would be the group belonging to the client, as you are already passing the client id in the url, it would get like…
-
4
votes4
answers4165
viewsQ: How to pass parameters through the URL in Wordpress?
I have an event page in Wordpress with the following URL structure http://exemplo.com.br/eventos. I would like to pass the following parameters, exemplo.com.br/eventos/ano/mês, to list the events of…
-
3
votes2
answers439
viewsA: Jquery - Problem with events Mouseenter() & Mouseleave()
Add the function stop before function fadeIn being like this: $(id).stop().fadeIn('slow')
-
24
votes8
answers64831
viewsQ: How to check if a checkbox is checked with PHP?
How to check if a checkbox is checked when a form is submitted?
phpasked Leandro Costa 2,172 -
3
votes3
answers204
viewsA: Plugins or tools to create blog posts?
I already used this plugin, maybe it will help you http://www.tinymce.com/
-
1
votes2
answers984
viewsA: Viewing Unique Custom Post Types Categories
I used the following code before the register_post_type and it worked! This one for those who have the same doubt. register_taxonomy( 'images', array('images'), /* This is the name of your custom…
wordpressanswered Leandro Costa 2,172 -
4
votes2
answers984
viewsQ: Viewing Unique Custom Post Types Categories
I created a Custom Post Type, but now I’m not able to create categories that are seen only for this CPT. When adding 'taxonomies' => array('category'), it displays all categories. How can I…
wordpressasked Leandro Costa 2,172 -
0
votes1
answer611
viewsQ: How do I get the last tweet?
I need to implement a function in my project to get the last tweet, but all unsuccessful attempts, someone could pass me a function to display the last tweet?
-
13
votes6
answers3343
viewsA: Methods to test websites in different browsers?
I found the site Browserstack which is a test tool cross-browser. It has different platforms, browsers and versions of browsers, helped me a lot. The service is paid and the version trial is limited…
-
15
votes6
answers3343
viewsQ: Methods to test websites in different browsers?
I would like to know methods to test sites in different browsers, without creating virtual machines.
-
7
votes2
answers4248
viewsQ: How to adjust the height of the div according to the text?
I created a div with a defined width, but when I insert a very large word the text keeps coming out of the div, how to continue to word at the bottom line?
-
4
votes2
answers585
viewsA: Algorithm for calculation and distribution of elements on the screen
Take a look at this plugin http://isotope.metafizzy.co/, may solve your problem. It has several layout options, but maybe the one Voc6e is interested in is the Masonry. In it the blocks of different…