Posts by robssanches • 349 points
16 posts
-
1
votes1
answer104
viewsQ: How to use static property of a class in another class in PHP?
I am venturing into the world of POO in PHP and I came up with the following question. Of the four ways I used in the code below, to assign the value of $prop1 of MinhaClasse to the variable $val…
-
1
votes1
answer153
viewsA: Keep div hidden after a refresh
You can use cookies too, so you can control when the user can see the div again. Example: <!DOCTYPE html> <html lang="pt-BR"> <head> <meta charset="UTF-8"> <meta…
-
0
votes1
answer455
viewsA: Replace characters from a URL via . Htaccess
I found the solution. Follow .htaccess updated: <IfModule mod_rewrite.c> Options +FollowSymlinks RewriteEngine On RewriteBase / RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)index\.php($|\ |\?)…
-
0
votes1
answer455
viewsQ: Replace characters from a URL via . Htaccess
I have the following model of Urls: http://dominio.com.br/cgi-bin/wiki.pl?Palavra http://dominio.com.br/cgi-bin/wiki.pl?Outra_Palavra and need to redirect to this new model:…
-
3
votes1
answer701
viewsA: Generate random characters securely
Searching a little more I ended up finding the solution. Follows code: function generateRandomNumber(){ "use strict"; // se o browser tiver suporte à getRandomValues() if (Uint32Array &&…
-
5
votes1
answer701
viewsQ: Generate random characters securely
Hello, I’m new to javascript and am using the following function to shuffle characters from a string in a password generator that I’m trying to develop: function shuffle(string) { "use strict"; var…
-
0
votes2
answers2243
viewsA: Google Maps does not load correctly
I found out that my problem was related to PHP language implementation scripts (php-gettext). Below the code of how I solved: <?php putenv('LANGUAGE=' . $locale); putenv('LANG=' . $locale);…
-
1
votes2
answers2243
viewsQ: Google Maps does not load correctly
My site is having problems displaying on a map (Google Maps) when accessed by the main url: http://www.localizaip.com/ but displays the same map correctly when accessed by this other URL:…
-
3
votes2
answers1909
viewsQ: Bar at the end of url with . htaccess
I need to add a bar (/) to the end of the url using . htaccess. My current . htaccess is like this: <IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST}…
-
1
votes2
answers455
viewsQ: Dynamically Loaded Content Handling
I need to manipulate an attribute of an html tag that was dynamically loaded via ajax. I have tried several ways using jQuery but none of them worked. The code being loaded via ajax is as follows:…
-
1
votes1
answer35
viewsA: Modifying image size inside the wordpress content
Hello! Already tried using the function set_post_thumbnail_size() wordpress ? add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 150, 150, true ); // width, height, crop…
-
2
votes1
answer281
viewsA: Export XLS content in Wordpress admin
Follows complete code of how I managed to solve the problem: I created a file called "export.php" <?php ob_start(); global $wpdb; // Tabela do banco de dados $minha_tabela = $wpdb->prefix .…
-
1
votes1
answer871
viewsQ: Take time to access a page and write to the BD
I need to take the time that the user was on a given page, and the user leave the page, this time is recorded in the database. Would anyone have any idea how to do? [Edited] The time I managed to…
-
1
votes3
answers1271
viewsA: Get google search results with Jquery
Using only jQuery I do not know if there is how... but I believe that can be done in PHP. <?php // Endereço do site $url = 'http://www.site.com.br'; // Pegando dados do Site e colocando em uma…
-
1
votes1
answer281
viewsQ: Export XLS content in Wordpress admin
I need to export specific content to XLS within the administrative area, and am using the following code: $arquivo = 'planilha.xls'; $html = ''; $html .= '<table>'; $html .= '<tr>';…
-
1
votes1
answer3433
viewsQ: Run function with Javascript/ Jquery timer
I need help creating a function in javascript/jquery to do the following: When user accesses my site, starts time counter. If the person tries to close the browser window/tab before a certain time,…