RES: [PHP] From 24/7/2013 to 2013-07-24

2013-07-26 Thread Alejandro Michelin Salomon
jomali: Use this: echo preg_replace('#(\d{2})/(\d{2})/(\d{4})#' , "\\3-\\2-\\1", '24/07/2013' ); RESULT => 2013-07-24 Alejandro M.S -Mensagem original- De: jomali [mailto:jomali3...@gmail.com] Enviada em: sexta-feira, 26 de julho de 2013 17:38 Para: Robert Cummings Cc: Karl-Arne Gjersøy

RES: [PHP] From 24/7/2013 to 2013-07-24

2013-07-26 Thread Alejandro Michelin Salomon
Use this: echo preg_replace('#(\d{2})/(\d{2})/(\d{4})#' , "\\3-\\2-\\1", '24/07/2013' ); RESULT => 2013-07-24 Alejandro M.S -Mensagem original- De: Jim Giner [mailto:jim.gi...@albanyhandball.com] Enviada em: sexta-feira, 26 de julho de 2013 11:12 Para: php-general@lists.php.net Assunto

RES: [PHP] Array help.

2012-10-24 Thread Samuel Lopes Grigolato
Could you try changing this: if($groupTest != FALSE) { to this: if($groupTest !== FALSE) { ? -Mensagem original- De: Paul Halliday [mailto:paul.halli...@gmail.com] Enviada em: quarta-feira, 24 de outubro de 2012 15:38 Para: PHP-General Assunto: [PHP] Array help. I am processing v4IP'

RES: [PHP] Re: User Timezone

2012-10-21 Thread Samuel Lopes Grigolato
Coincidentally, TODAY I had to adjust my clock one hour forward because of DST (poor sleep =[). No so easy-to-solve problem, after all... -Mensagem original- De: Matijn Woudt [mailto:tijn...@gmail.com] Enviada em: domingo, 21 de outubro de 2012 10:30 Para: Maciek Sokolewicz Cc: Karl DeSa

Re: RES: [PHP] Re: User Timezone

2012-10-20 Thread Karl DeSaulniers
Dont know how I would get longitude and latitude of my users. Also, not using HTML5 except for layout reasons. Liquid canvas. So I am using HTML 4 transitional for structure. Thanks for the response! I will at least look into your solution. Couldn't hurt. :) Best, Karl On Oct 20, 2012, at 7:35

RES: [PHP] Re: User Timezone

2012-10-20 Thread Samuel Lopes Grigolato
Have you tried Google Timezone API? (https://developers.google.com/maps/documentation/timezone/) I don't know if it's free to use, probably not. You may note that you need user's longitude/latitude to query this API. A solution is to query Google Places API (https://developers.google.com/places/)

Re: RES: [PHP] foreach

2012-10-16 Thread David McGlone
On Tuesday, October 16, 2012 11:02:18 AM Samuel Lopes Grigolato wrote: > There is some cases that more code (and more cycles) is a good thing. For > example, a multi-layer architecture (like presentation, business and data > access) is more cpu-intensive than a single page doing everything in an >

RES: [PHP] foreach

2012-10-16 Thread Samuel Lopes Grigolato
There is some cases that more code (and more cycles) is a good thing. For example, a multi-layer architecture (like presentation, business and data access) is more cpu-intensive than a single page doing everything in an entangled procedural style, but is far more easy to evolve! As Steven said, yo

Re: RES: [PHP] Re: limiting

2012-10-09 Thread Govinda
> [snip] > When posting, please try to write every bit of effort you had so far trying > to solve your problem. > > Besides that, please, don't feel sad or ignored or whatsoever if the answers > you've got wasn't satisfactory or doesn't came at all. As Matijn said, this > list isn't meant to b

Re: RES: [PHP] Re: limiting

2012-10-09 Thread Jim Giner
On 10/9/2012 4:54 PM, Samuel Lopes Grigolato wrote: I don't know if it has any value, but here's my 2 cents: People here expect tricky questions. Of course "to be tricky" is subjective and is based on your knowledge level. When posting, please try to write every bit of effort you had so far tr

RES: [PHP] Re: limiting

2012-10-09 Thread Samuel Lopes Grigolato
I don't know if it has any value, but here's my 2 cents: People here expect tricky questions. Of course "to be tricky" is subjective and is based on your knowledge level. When posting, please try to write every bit of effort you had so far trying to solve your problem. Besides that, please, don

RES: [PHP] cURL issues posting to an end point

2012-10-04 Thread Alejandro Michelin Salomon
Bastien: curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'User-Agent: My Program', 'Accept-Encoding: gzip, deflate', 'POST ' . $sPost . ' HTTP/1.1', 'Host: ' . $sHost, 'Content-type: application/soa

RES: [PHP] cURL issues posting to an end point

2012-10-04 Thread Alejandro Michelin Salomon
Bastien: -Mensagem original- De: Bastien Koert [mailto:phps...@gmail.com] Enviada em: quinta-feira, 4 de outubro de 2012 11:54 Para: PHP-General Assunto: [PHP] cURL issues posting to an end point Hi All, I have a page that receives third party data into my app, xml data via https post.

Re: RES: [PHP] Re: {ATTENTION} Re: [PHP] base64_decode

2012-10-02 Thread Ashley Sheridan
On Tue, 2012-10-02 at 15:04 -0300, Samuel Lopes Grigolato wrote: > Another way to decode and inspect such data is to use utilities like: > http://www.motobit.com/util/base64-decoder-encoder.asp > > By the way, never saw before this kind of sloppy irritating malicious > "obfuscation" =). > > Doe

RES: [PHP] Re: {ATTENTION} Re: [PHP] base64_decode

2012-10-02 Thread Samuel Lopes Grigolato
Another way to decode and inspect such data is to use utilities like: http://www.motobit.com/util/base64-decoder-encoder.asp By the way, never saw before this kind of sloppy irritating malicious "obfuscation" =). Does your server allow execution of the "eval" function? I consider this a security

Re: RES: [PHP] Re: problem with my login script

2012-10-02 Thread Thomas Conrad
My problem was solved no need to argue. I don't see why use a while loop with a count variable when it produces the same result as a foreach loop. As for using a break in the loop, I could add it but the loop is gonna stop anyway as soon as it hits the end of the array. I also didn't see the point

Re: RES: [PHP] Re: problem with my login script

2012-10-02 Thread ma...@behnke.biz
Just for the record, I'll sign that one. There is a reason for continue, break and return to exist. Just make sure, that your code is understandable and there is no problem using these exits. If your code is that complicated, that you don't understand a break in it, the problem is another. Samue

RES: [PHP] Re: problem with my login script

2012-10-02 Thread Samuel Lopes Grigolato
I follow this rule of thumb: small blocks of highly understandable code. If this demands ternary conditionals or breaks, so be it! -Mensagem original- De: Tim Streater [mailto:t...@clothears.org.uk] Enviada em: terça-feira, 2 de outubro de 2012 08:37 Para: PHP General List Assunto: [PHP]

RES: [PHP] Re: Joining a team, where no wiki or docs are available

2012-09-24 Thread Samuel Lopes Grigolato
What about using visual code coverage instead of callstacks? I think the big picture is easier to digest. Maybe a combination of both, as code coverage won't provide the "time" axis of the monster. Something like http://phpcoverage.sourceforge.net/ -Mensagem original- De: Mihamina Rakot

Re: RES: [PHP] Day after Friday

2012-09-24 Thread Tedd Sperling
On Sep 23, 2012, at 10:17 AM, Samuel Lopes Grigolato wrote: > Independent of programming language, good teaching skills will lead to > self-taught developers with a bunch of best practices under the hood. I hope > you are such a good teacher =). We need not PHP or Java developers, we need > g

RES: [PHP] Joining a team, where no wiki or docs are available

2012-09-24 Thread Samuel Lopes Grigolato
I would recommend reading this article: http://www.infoq.com/articles/tips-to-developers-starting-on-large-apps It's targeted to Java developers, but the concepts are valid to any language. Hope it helps. Cheers, Samuel. -Mensagem original- De: AmirBehzad Eslami [mailto:behzad.esl...@g

RES: [PHP] Day after Friday

2012-09-23 Thread Samuel Lopes Grigolato
Independent of programming language, good teaching skills will lead to self-taught developers with a bunch of best practices under the hood. I hope you are such a good teacher =). We need not PHP or Java developers, we need good and creative designers that can adapt to new tools. One language i

RES: RES: RES: [PHP] Re: Need help to understand a code

2012-09-22 Thread Samuel Lopes Grigolato
setembro de 2012 12:35 Para: Samuel Lopes Grigolato Cc: 'PHP List' Assunto: Re: RES: RES: [PHP] Re: Need help to understand a code On Sat, 2012-09-22 at 12:12 -0300, Samuel Lopes Grigolato wrote: I disagree with you Ashley, some arguments can be found here: http://sqlblog.com/blogs/aaro

Re: RES: RES: [PHP] Re: Need help to understand a code

2012-09-22 Thread Ashley Sheridan
ridan.co.uk] > Enviada em: sábado, 22 de setembro de 2012 11:52 > Para: Samuel Lopes Grigolato; 'PHP List' > Assunto: Re: RES: [PHP] Re: Need help to understand a code > > > > Samuel Lopes Grigolato wrote: > > >+1 to bad maintainability

RES: RES: [PHP] Re: Need help to understand a code

2012-09-22 Thread Samuel Lopes Grigolato
requested to the database layer. +1 to Maciek's suggestion, had totally forgotten this one. Cheers. -Mensagem original- De: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Enviada em: sábado, 22 de setembro de 2012 11:52 Para: Samuel Lopes Grigolato; 'PHP List' Assunto: Re

Re: RES: [PHP] Re: Need help to understand a code

2012-09-22 Thread Maciek Sokolewicz
On 22-09-2012 16:19, Samuel Lopes Grigolato wrote: +1 to bad maintainability of the code. As a suggestion, one better solution could be something like: [...] class Entity { public $id; public $name; } [...] $entity = new Entity(); foreach [...] $entity->$$key = $value; [...] And

Re: RES: [PHP] Re: Need help to understand a code

2012-09-22 Thread Ashley Sheridan
Samuel Lopes Grigolato wrote: >+1 to bad maintainability of the code. > >As a suggestion, one better solution could be something like: > >[...] > >class Entity { > public $id; > public $name; >} > >[...] > >$entity = new Entity(); >foreach [...] > $entity->$$key = $value; > >[...] > >And,

RES: [PHP] Re: Need help to understand a code

2012-09-22 Thread Samuel Lopes Grigolato
+1 to bad maintainability of the code. As a suggestion, one better solution could be something like: [...] class Entity { public $id; public $name; } [...] $entity = new Entity(); foreach [...] $entity->$$key = $value; [...] And, of course, never ever use "*" in SQL queries. Samue

RES: [PHP] Risks involved in MyISAM to Innodb

2012-09-21 Thread Samuel Lopes Grigolato
Sure, the address you're looking for is: http://lists.mysql.com/ Good hunting =) De: Girish Talluru [mailto:girish.dev1...@gmail.com] Enviada em: sexta-feira, 21 de setembro de 2012 10:15 Para: Samuel Lopes Grigolato Cc: php-general@lists.php.net Assunto: Re: [PH

RES: [PHP] Risks involved in MyISAM to Innodb

2012-09-21 Thread Samuel Lopes Grigolato
I would start trying my DBMS user list. Or maybe you're afraid of impacts on PHP code? Cheers. -Mensagem original- De: Girish Talluru [mailto:girish.dev1...@gmail.com] Enviada em: sexta-feira, 21 de setembro de 2012 10:04 Para: php-general@lists.php.net Assunto: [PHP] Risks involved in M

RES: [PHP] Highlight Search Results

2012-09-18 Thread Samuel Lopes Grigolato
If you're dealing with a high amount of search data, I highly advise you to use something like SOLR. Match highlighting and a lot of other awesome things is easy breeze with it. -Mensagem original- De: Floyd Resler [mailto:fres...@adex-intl.com] Enviada em: terça-feira, 18 de setembro de

Re: RES: [PHP] fets() escaping some characters

2012-09-11 Thread Marco Behnke
Or, if that string is the only thing you want to output and nothing else you will set the correct content type for your output by putting header('Content-Type: text/plain; charset=utf-8'); at the beginning of your script Am 11.09.12 19:54, schrieb Samuel Lopes Grigolato: > This issue has to do w

RES: [PHP] fets() escaping some characters

2012-09-11 Thread Samuel Lopes Grigolato
This issue has to do with HTML markup. You need to properly "escape" characters before sending them as text to the browser. Try to use this PHP function to escape your string: echo htmlspecialchars($yourstringhere); Regards, Samuel. -Mensagem original- De: sunil meena [mailto:sunil.extc2.

RES: [PHP] Dynamic Content thoughts

2012-08-24 Thread Samuel Lopes Grigolato
Do you mean the ">" quotation marks? Have you tried to create a simple Notepad++ macro? I do this for things like formatting SQL from SQL Editor to SQL String in code, and vice versa. Cheers. -Mensagem original- De: tamouse mailing lists [mailto:tamouse.li...@gmail.com] Enviada em: sex

Re: RES: [PHP] XML/PHP web service

2012-08-09 Thread Carlos Medina
Hi, the two options offers here are ok. But please make it secure! Regards Carlos Am 09.08.2012 14:38, schrieb Alejandro Michelin Salomon: > Philip : > > Try this: > > Client: > > $client = new SoapClient( null, array( 'encoding' => 'utf-8', 'soap_version' > => SOAP_1_2, 'trace' => 1, >

RES: [PHP] XML/PHP web service

2012-08-09 Thread Alejandro Michelin Salomon
Philip : Try this: Client: $client = new SoapClient( null, array( 'encoding' => 'utf-8', 'soap_version' => SOAP_1_2, 'trace' => 1, 'uri' => 'tns: Server', 'location' => 'php server URL here')); // Cut off , to not have two xml start tag in the soap message. $xm

RES: [PHP] CURL -d

2012-03-26 Thread Alejandro Michelin Salomon
Hi try this : $ch = curl_init(); curl_setopt ( $ch, CURLOPT_URL, "URL HERE" ); curl_setopt ( $ch, CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt ( $ch, CURLOPT_HEADER, 1 ); curl_setopt ( $ch, CURLOPT_TIMEOUT, 10); curl_setopt ( $ch, CURLOPT_SSL_VERIFYPEER, false ); curl_setopt ( $ch, CURLOPT_SSL_VERI

RES: [PHP] '

2012-03-05 Thread Alejandro Michelin Salomon
Leste Wrote: >-Mensagem original- >De: Lester Caine [mailto:les...@lsces.co.uk] >Enviada em: segunda-feira, 5 de março de 2012 08:18 >Para: php-general@lists.php.net >Assunto: Re: [PHP] 'Ashley Sheridan wrote: >> You can set it in php.ini itself, or possibly from .htaccess. failing that,

RES: [PHP] What's Your Favorite Design Pattern?

2012-02-07 Thread Alejandro Michelin Salomon
Mike: My favorite are singleton ( database connection configuration ), and factory. Factory i use when need one code exporting or doing different process. Basically y have a base class with general code and a specific class that extend the base class with code specific to the process to be made

RES: [PHP] Re: Getting Column Names from an AS400 Database

2012-01-26 Thread Alejandro Michelin Salomon
Cheryl: In the PHP Manual ; resource odbc_columns ( resource $connection_id [, string $qualifier [, string $schema [, string $table_name [, string $column_name ) Lists all columns in the requested range. Parameters connection_id The ODBC connection identifier, see odbc_connect() for d

RES: [PHP] Printing

2012-01-06 Thread Alejandro Michelin Salomon
do I create a pdf with php? Do I have to have my host install a package or something? - Original Message - From: "Alejandro Michelin Salomon" To: "'Jim Giner'" Sent: Thursday, January 05, 2012 2:01 PM Subject: RES: [PHP] Printing > Jim: > > You do

RES: [PHP] Installing PHP

2011-09-21 Thread Mateus Almeida
Thanks for the help, people. Problem solved. -Mensagem original- De: Alejandro Michelin Salomon (Hotmail) [mailto:amichel...@hotmail.com] Enviada em: quarta-feira, 21 de setembro de 2011 00:07 Para: 'Mateus Almeida' Cc: php-general@lists.php.net Assunto: RES: [PHP] Inst

RES: [PHP] Installing PHP

2011-09-20 Thread Alejandro Michelin Salomon (Hotmail)
Mateus: Para configurar o php no apache : 1) Adicionar estas linhas no httpd.conf Troca "D:\PHP\" pelos dados da tua instalação. #BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL PHPIniDir "D:\PHP\" LoadModule php5_module "D:\PHP\php5apache2_2.dll" AddHandler application/x-httpd-php .php #E

Re: RES: RES: [PHP] Installing PHP

2011-09-20 Thread Curtis Maurand
#AddType text/html .shtml > > #AddOutputFilter INCLUDES .shtml > > > > > > # > > # The mod_mime_magic module allows the server to use various hints from > the > > # contents of the file itself to determine its type. The MIMEMagicFile > > #

Re: RES: [PHP] Installing PHP

2011-09-20 Thread Curtis Maurand
try http://localhost/test.php Mateus Almeida wrote: > Yes, I've put the "test.php" in the htdocs. > The server works with an html file, but it doesn’t work with the php. > > -Mensagem original- > De: Bastien [mailto:phps...@gmail.com] > Enviada em: terça-feira, 20 de setembro de 2011

Re: RES: [PHP] Installing PHP

2011-09-20 Thread Lester Caine
Mateus Almeida wrote: Yes, I've put the "test.php" in the htdocs. The server works with an html file, but it doesn’t work with the php. Mateus There are only tow things which need adding to httpd.conf to get PHP working. LoadModule should point to your php installation LoadModule php5_module

RES: [PHP] Installing PHP

2011-09-20 Thread Mateus Almeida
Yes, I've put the "test.php" in the htdocs. The server works with an html file, but it doesn’t work with the php. -Mensagem original- De: Bastien [mailto:phps...@gmail.com] Enviada em: terça-feira, 20 de setembro de 2011 09:04 Para: Mateus Almeida Cc: Assunto: Re: [PHP] Installing PHP

Re: RES: [PHP] Installing PHP

2011-07-04 Thread Chris Stinemetz
Jim, What is your server root set up too? I would put the apache configuration back to the way it was and then place php script with phpinfo() function in it. Try to run it and see if that works. HTH, Chris On Jul 4, 2011 8:14 AM, "Alejandro Michelin Salomon (Hotmail)" < amichel...@hotmail.com>

RES: [PHP] Installing PHP

2011-07-04 Thread Alejandro Michelin Salomon (Hotmail)
Jim: In my Windows the install adds the lines : #BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL PHPIniDir "C:\PHP\" LoadModule php5_module "C:\PHP\php5apache2_2.dll" AddHandler application/x-httpd-php .php #END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL Where is the apache version that

RES: [PHP] Short tag: why is it bad practice?

2011-05-11 Thread Alejandro Michelin Salomon (Hotmail)
Andre : As Joshua says, the only php tags that always is enabled is , this is the default php tag, and never can be disabled. This is enabled if short_open_tag is on And this <% %> is enabled if asp_tags is on But the default is off for both. Use this , and forgive configuration options. Alej

RES: [PHP] Acentos en tpl

2011-03-18 Thread Alejandro Michelin Salomon
Lorena : Yo trabajo con idioma portugués y utilizo esto en mi código : http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";> http://www.w3.org/1999/xhtml"; xml:lang="pt-br" lang="pt-br"> ... Nunca e tenido problemas con caracteres especiales como é o ú. Y utilizo varios .tpl,

RES: [PHP] Bar Charts in PDFs

2011-02-11 Thread Alejandro Michelin Salomon
Tom: You can try: http://www.tcpdf.org/ to generate pdf. And http://jpgraph.net/ To generate chart. EX: to add a image to a pdf document: $pdf->Image( '/home/peter/test.png', 127.78, 15, // left and right 74.93, 6.42, // width and height 'P

Re: RES: [PHP] email address syntax checker

2011-01-21 Thread Richard Quadling
n they will require being inside quotation marks), and > the @ symbol is included in that! > > Thanks, > Ash > http://www.ashleysheridan.co.uk > > - Reply message - > From: "Alejandro Michelin Salomon" > Date: Fri, Jan 21, 2011 12:14 > Subject: RES:

Re: RES: [PHP] email address syntax checker

2011-01-21 Thread a...@ashleysheridan.co.uk
ed in that! Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Alejandro Michelin Salomon" Date: Fri, Jan 21, 2011 12:14 Subject: RES: [PHP] email address syntax checker To: "'Donovan Brooke'" Cc: Donovan: Try this function EmailC

RES: [PHP] email address syntax checker

2011-01-21 Thread Alejandro Michelin Salomon
Donovan: Try this function EmailCheck ( $sEmail ) { $regexp="/^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z ]{2,}$/i"; if ( !preg_match($regexp, $sEmail) ) return false; return true; } Alejandro M.S. -Mensagem original- De: Donovan Brooke [ma

ENC: RES: [PHP] I am a Windows programmer and getting started on PHP

2010-11-19 Thread Alejandro Michelin Salomon
De: Alejandro Michelin Salomon [mailto:amichel...@hotmail.com] Enviada em: sexta-feira, 19 de novembro de 2010 14:45 Para: 'a...@ashleysheridan.co.uk' Assunto: RES: RES: [PHP] I am a Windows programmer and getting started on PHP Daevid Vincent: For me is no problem if Lin

Re: RES: [PHP] I am a Windows programmer and getting started on PHP

2010-11-19 Thread a...@ashleysheridan.co.uk
lejandro Michelin Salomon" Date: Fri, Nov 19, 2010 16:13 Subject: RES: [PHP] I am a Windows programmer and getting started on PHP To: "'Daevid Vincent'" Cc: Daevid Vincent: I never use XAMP and those type of installations. Is very simple install Apache on windows

RES: [PHP] I am a Windows programmer and getting started on PHP

2010-11-19 Thread Alejandro Michelin Salomon
Daevid Vincent: I never use XAMP and those type of installations. Is very simple install Apache on windows ( takes 3 minutes ), and php too. Install php is simples, run the msi package, the installer configures httpd.conf Then you make the changes that you need to php.ini and is complete. (

Re: RES: [PHP] Class mysqli not found

2010-10-06 Thread sueandant
I'm running phpinfo from my browser under localhost. - Original Message - From: chris h To: sueandant Cc: PHP Sent: Wednesday, October 06, 2010 10:12 PM Subject: Re: RES: [PHP] Class mysqli not found Are you doing phpinfo() off the CLI or via apache mod? Is it the

Re: RES: [PHP] Class mysqli not found

2010-10-06 Thread chris h
mysqli.max_persistent Unlimited Unlimited > mysqli.reconnect Off Off > > - Original Message - From: "Simon J Welsh" > To: "Alejandro Michelin Salomon" > Cc: "'sueandant'" ; < > php-general@lists.php.net> > Sent: We

Re: RES: [PHP] Class mysqli not found

2010-10-06 Thread sueandant
mysqli.max_links Unlimited Unlimited mysqli.max_persistent Unlimited Unlimited mysqli.reconnect Off Off - Original Message - From: "Simon J Welsh" To: "Alejandro Michelin Salomon" Cc: "'sueandant'" ; Sent: Wednesday, October 06, 2010 9:43 PM Subjec

Re: RES: [PHP] Class mysqli not found

2010-10-06 Thread Simon J Welsh
http://php.net/manual/en/class.mysqli.php definitely says MySQLi is a class. It looks like PHP was complied without MySQLi support. Does running a phpinfo() show the MySQLi module? On 7/10/2010, at 9:33 AM, Alejandro Michelin Salomon wrote: > Sueandant : > > mysqli is set of functions not a cla

RES: [PHP] Class mysqli not found

2010-10-06 Thread Alejandro Michelin Salomon
x27;php-general@lists.php.net' Assunto: RES: [PHP] Class mysqli not found Sueandant : mysqli is set of functions not a class. The name to connect is mysqli_connect /** * * * @version $Id$ * @copyright 2010 */ $mysqli = mysqli_connect ("localhost", "root", "woodcote",

RES: [PHP] Class mysqli not found

2010-10-06 Thread Alejandro Michelin Salomon
Sueandant : mysqli is set of functions not a class. The name to connect is mysqli_connect /** * * * @version $Id$ * @copyright 2010 */ $mysqli = mysqli_connect ("localhost", "root", "woodcote", "testDB"); if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error());

RES: [PHP] Connecting to MySql with PHP

2010-10-05 Thread Alejandro Michelin Salomon
em: terça-feira, 5 de outubro de 2010 09:01 Para: 'sueandant' Cc: php-general@lists.php.net Assunto: RES: [PHP] Connecting to MySql with PHP Sueandant : Goto your my.ini file In my case located in C:\Arquivos de programas\MySQL\MySQL Server 5.1 Search is this configuration option

RES: [PHP] Connecting to MySql with PHP

2010-10-05 Thread Alejandro Michelin Salomon
Sueandant : Goto your my.ini file In my case located in C:\Arquivos de programas\MySQL\MySQL Server 5.1 Search is this configuration option is enabled => skip-networking And comment to enabled listen on a TCP/IP port. Default port 3306 Or Put => enable-named-pipe to enable named pipes Alejandr

RES: [PHP] New to PHP and struggling with the basics

2010-10-04 Thread Alejandro Michelin Salomon
Col Day : Go to : "C:\Arquivos de programas\Apache Software Foundation\Apache2.2\conf" or the folder in your machine. Search for this file => httpd.conf Search for DocumentRoot "D:/webroot" put your work folder in my case D:/webroot. Search for this line and apply the same changes make in Docu

RES: [PHP] converting a mysql date value

2010-09-29 Thread Alejandro Michelin Salomon
David : Try this : $a = explode('-', '2010-01-23'); $b = array( $a[1], $a[2], $a[0] ); echo implode( '/', $b); // 01/23/2010 Alejandro M.S. -Mensagem original- De: David Mehler [mailto:dave.meh...@gmail.com] Enviada em: quarta-feira, 29 de setembro de 2010 16:12 Para: php-general As

RES: [PHP] Invalid chars in XML

2010-09-21 Thread Alejandro Michelin Salomon
Hi I am working with xml, in portuguese, and i have many problems with special characters. I find this code to work with this problem... When create xml ExpandEntities : function ExpandEntities( $sText ) { $trans = array('&' => '&', "'" => ''',

RES: [PHP] PHP live chat

2009-12-15 Thread Jônatas Zechim
http://www.livezilla.net/ -Mensagem original- De: Angelo Zanetti [mailto:ang...@zlogic.co.za] Enviada em: terça-feira, 15 de dezembro de 2009 09:59 Para: 'Ghodmode'; php-general@lists.php.net Assunto: RE: [PHP] PHP live chat -Original Message- From: Ghodmode [mailto:ghodm...@gh

Re: RES: [PHP] CSS and variables

2009-11-21 Thread tedd
This might help: http://sperling.com/examples/pcss/ Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: RES: [PHP] CSS and variables

2009-11-20 Thread Phil Matt
Jônatas Zechim wrote: Try: echo '' . $row[1] . ''; Thanks, Jônatas. This was the solution. Cheers --- Phil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RES: [PHP] CSS and variables

2009-11-20 Thread Jônatas Zechim
Try: echo '' . $row[1] . ''; -Mensagem original- De: Phil Matt [mailto:ad...@philmatt.com] Enviada em: sexta-feira, 20 de novembro de 2009 14:12 Para: php-general@lists.php.net Assunto: [PHP] CSS and variables De-lurking here. I'm trying, with no success, to use some CSS styling on my

RES: [PHP] Extract links from strings

2009-09-21 Thread Jônatas Zechim
I don't think so, but I've found this (from PT-BR LIST): $string = 'Lorem ipsum dolor http://site.com sit amet lorem www.google.com '; preg_match_all('!(?:http://|www)[^ ]*!',$string,$links); print_r($links); Zechim -Mensagem original- De: Mattias Thorslund [mailto:matt...@thorslund.us

RES: [PHP] Login should not allow users to login if the application is logged in with the same login credentials

2009-08-27 Thread Jônatas Zechim
Use a "DB session handler" or save a time() on the user table every refresh, when loggin verify this "time()". Zechim -Mensagem original- De: Balasubramanyam A [mailto:knowledge.wea...@gmail.com] Enviada em: quinta-feira, 27 de agosto de 2009 08:24 Para: php-general@lists.php.net Assunto

Re: RES: [PHP] Case Conversion of US Person Names

2009-07-16 Thread phphelp -- kbk
On Jul 16, 2009, at 1:19 PM, Jônatas Zechim wrote: U can try this: function fNme($n){ $tN=count($n=explode(' ',strtolower($n))); $nR=''; for($i=0;$i<$tN;$i++){if($i==0){$nR.=strlen($n[$i])>3?ucwords($n [$i]):$n[$i] ;}else{$nR.=strlen($n[$i])>3?' '.ucwords($n[$i]):' '.

RES: [PHP] Case Conversion of US Person Names

2009-07-16 Thread Jônatas Zechim
U can try this: function fNme($n){ $tN=count($n=explode(' ',strtolower($n))); $nR=''; for($i=0;$i<$tN;$i++){if($i==0){$nR.=strlen($n[$i])>3?ucwords($n[$i]):$n[$i] ;}else{$nR.=strlen($n[$i])>3?' '.ucwords($n[$i]):' '.$n[$i];}} return $nR; } echo fNme('a

RES: [PHP] phpMyAdmin, localhost, mysql overhead

2009-06-12 Thread Jônatas Zechim
I really don’t know the differences betwen MyISAM and InnoDB yet but I’ll google for it right now. Thank u. Zechim De: Eddie Drapkin [mailto:oorza...@gmail.com] Enviada em: sexta-feira, 12 de junho de 2009 15:05 Para: Nitsan Bin-Nun Cc: Jônatas Zechim; php-general@lists.php.net Assunto

RES: [PHP] phpMyAdmin, localhost, mysql overhead

2009-06-12 Thread Jônatas Zechim
Thank u Nitsan. I’ll proceed with my app now. Zechim De: nit...@binnun.co.il [mailto:nit...@binnun.co.il] Em nome de Nitsan Bin-Nun Enviada em: sexta-feira, 12 de junho de 2009 15:01 Para: Jônatas Zechim Cc: php-general@lists.php.net Assunto: Re: [PHP] phpMyAdmin, localhost, mysql overhead

RES: [PHP] phpMyAdmin, localhost, mysql overhead

2009-06-12 Thread Jônatas Zechim
I have other tables running but only this give me ‘overhead’. I’d know why this table does this and if is bad for my MySQL Server? Is there anyway to avoid it? Zechim De: nit...@binnun.co.il [mailto:nit...@binnun.co.il] Em nome de Nitsan Bin-Nun Enviada em: sexta-feira, 12 de junho de

RES: RES: [PHP] CURL problems still

2009-05-12 Thread Jônatas Zechim
ett.com] Enviada em: terça-feira, 12 de maio de 2009 10:24 Para: Phpster; Miller, Terion Cc: Jônatas Zechim; PHP-General List Assunto: Re: RES: [PHP] CURL problems still > > Bastien, could you give me an example of what you mean? > would it be $Name = "" > > like

Re: RES: [PHP] CURL problems still

2009-05-12 Thread Nathan Rixham
Nathan Rixham wrote: Miller, Terion wrote: Well I tried it and still it stopped at the "C's" 1: your script is timing out, you need to set the time limit higher set_time_limit(0); 2: foreach($html->find('table') as $table) { $rows = explode('' , $table ); $headerCells = explode('', array_shi

Re: RES: [PHP] CURL problems still

2009-05-12 Thread Nathan Rixham
Miller, Terion wrote: Well I tried it and still it stopped at the "C's" 1: your script is timing out, you need to set the time limit higher set_time_limit(0); 2: foreach($html->find('table') as $table) { $rows = explode('' , $table ); $headerCells = explode('', array_shift($rows)); $struct =

Re: RES: [PHP] CURL problems still

2009-05-12 Thread Miller, Terion
> > Bastien, could you give me an example of what you mean? > would it be $Name = "" > > like that? > > Thanks for the ideas everyone! > >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> > > Try Imitliazing the variables at the top of the

Re: RES: [PHP] CURL problems still

2009-05-11 Thread Phpster
On May 11, 2009, at 17:53, "Miller, Terion" > wrote: Bastien, could you give me an example of what you mean? would it be $Name = "" like that? Thanks for the ideas everyone! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Tr

Re: RES: [PHP] CURL problems still

2009-05-11 Thread Miller, Terion
Bastien, could you give me an example of what you mean? would it be $Name = "" like that? Thanks for the ideas everyone! > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > Try Imitliazing the variables at the top of the loop

Re: RES: [PHP] CURL problems still

2009-05-11 Thread Phpster
On May 11, 2009, at 16:01, "Miller, Terion" > wrote: The error I get is from my INSERT statement It does insert the records up to C page though... The problem area: // Build your INSERT statement here $query = "INSERT into warrants (wid, name, age, warrant, bond, wnumbe

Re: RES: [PHP] CURL problems still

2009-05-11 Thread Miller, Terion
The error I get is from my INSERT statement It does insert the records up to C page though... The problem area: // Build your INSERT statement here $query = "INSERT into warrants (wid, name, age, warrant, bond, wnumber, crime) VALUES (";$query .= " '$wid', '$name', '$age

RES: [PHP] CURL problems still

2009-05-11 Thread Jônatas Zechim
Hey Guy, try to change the 'max_execution_time' ini_set('max_execution_time','1800'); -Mensagem original- De: Miller, Terion [mailto:tmil...@springfi.gannett.com] Enviada em: segunda-feira, 11 de maio de 2009 16:41 Para: PHP-General List Assunto: [PHP] CURL problems still I'm back.

RES: RES: RES: RES: [PHP] CURL error help

2009-05-08 Thread Jônatas Zechim
U r correct! It's ok know. -Mensagem original- De: Shawn McKenzie [mailto:nos...@mckenzies.net] Enviada em: sexta-feira, 8 de maio de 2009 13:34 Para: Miller, Terion Cc: Jônatas Zechim; PHP-General List Assunto: Re: RES: RES: RES: [PHP] CURL error help Miller, Terion wrote: >

Re: RES: RES: RES: [PHP] CURL error help

2009-05-08 Thread Shawn McKenzie
Miller, Terion wrote: > > > On 5/8/09 10:55 AM, "Jônatas Zechim" wrote: > > Ok, but u need to confirm the $args vars are being passed to that funtion, > because I thing they're blanks. > > Zechim > zechim.com > São Paulo/Brazil > > here is the code from the dom.php file, as it stands current

RES: RES: RES: RES: [PHP] CURL error help

2009-05-08 Thread Jônatas Zechim
zechim.com São Paulo/Brazil -Mensagem original- De: Miller, Terion [mailto:tmil...@springfi.gannett.com] Enviada em: sexta-feira, 8 de maio de 2009 13:19 Para: Jônatas Zechim; Miller, Terion; PHP-General List Assunto: Re: RES: RES: RES: [PHP] CURL error help On 5/8/09 10:55 AM

Re: RES: RES: RES: [PHP] CURL error help

2009-05-08 Thread Miller, Terion
On 5/8/09 10:55 AM, "Jônatas Zechim" wrote: Ok, but u need to confirm the $args vars are being passed to that funtion, because I thing they're blanks. Zechim zechim.com São Paulo/Brazil here is the code from the dom.php file, as it stands currently my error reads: Warning: file_get_conten

RES: RES: RES: [PHP] CURL error help

2009-05-08 Thread Jônatas Zechim
natas Zechim; Miller, Terion; PHP-General List Assunto: Re: RES: RES: [PHP] CURL error help On 5/8/09 8:49 AM, "Jônatas Zechim" wrote: Try to echo the $target_url var. What's on it? Try to echo the $args var. What's on it? How do you pass the $args? I echo'd the

Re: RES: RES: [PHP] CURL error help

2009-05-08 Thread Miller, Terion
On 5/8/09 8:49 AM, "Jônatas Zechim" wrote: Try to echo the $target_url var. What's on it? Try to echo the $args var. What's on it? How do you pass the $args? I echo'd the $target_url and I got all the correct urls -did I mention this error reports one time for every url in the array, I

Re: RES: [PHP] CURL error help

2009-05-08 Thread Shawn McKenzie
Miller, Terion wrote: > > > On 5/8/09 8:04 AM, "Jônatas Zechim" wrote: > > Try to change this: > > curl_setopt($ch,CURLOPT_URL,$targets); > > to: > > curl_setopt($ch,CURLOPT_URL, $target_url); > > Zechim > zechim.com > São Paulo/Brazil > > Thanks for the suggestion: > Tried it and get this

RES: RES: [PHP] CURL error help

2009-05-08 Thread Jônatas Zechim
eira, 8 de maio de 2009 10:27 Para: Jônatas Zechim; Miller, Terion; PHP-General List Assunto: Re: RES: [PHP] CURL error help On 5/8/09 8:04 AM, "Jônatas Zechim" wrote: Try to change this: curl_setopt($ch,CURLOPT_URL,$targets); to: curl_setopt($ch,CURL

Re: RES: [PHP] CURL error help

2009-05-08 Thread Miller, Terion
On 5/8/09 8:04 AM, "Jônatas Zechim" wrote: Try to change this: curl_setopt($ch,CURLOPT_URL,$targets); to: curl_setopt($ch,CURLOPT_URL, $target_url); Zechim zechim.com São Paulo/Brazil Thanks for the suggestion: Tried it and get this error now: Warning: file_get_contents($target_url) [fun

RES: [PHP] CURL error help

2009-05-08 Thread Jônatas Zechim
Try to change this: curl_setopt($ch,CURLOPT_URL,$targets); to: curl_setopt($ch,CURLOPT_URL, $target_url); Zechim zechim.com São Paulo/Brazil -Mensagem original- De: Miller, Terion [mailto:tmil...@springfi.gannett.com] Enviada em: sexta-feira, 8 de maio de 2009 09:50 Para: PHP-General

Re: RES: [PHP] inexplicable behaviour SOLVED

2009-04-28 Thread 9el
> >> $Count = $Count + 1; is *exactly(?)* same as $Count++; Â or ++$Count > >> But not exactly same. Â PostFix notation adds the value after assigning > . > >> PreFix notation adds the value right away. > >> But optimized programming argues about how machine is coded nowadays. > Thanks Mike for cl

  1   2   3   >