Re: [PHP] PHP and curl

2013-09-26 Thread Shawn McKenzie
:36 AM, Alf Stockton wrote: > Shawn, that was silly of me. I have now removed the echo but I still do > not get the expected result from the server. > var_dump of $result returns:- > > object(stdClass)#2 (1) { > ["GetSequenceNoResult"]=> > object(stdClass)#3 (6)

Re: [PHP] php fopen https error

2013-09-25 Thread Shawn McKenzie
alb wrote: > On 25.9.2013 17:12, Shawn McKenzie wrote: > > Just as I thought: > > > > 5.2.0 > > Fixed bug #39039 SSL: fatal protocol error when fetching HTTPS from > servers > > running Google web server). (Ilia) > > Thanks, but ... > I am not

Re: [PHP] PHP and curl

2013-09-25 Thread Shawn McKenzie
Keep on list. $result = $client->GetSequenceNo( "CIS" ); shouldn't be throwing that error. Maybe you are trying to do something with $result afterwards? Try var_dump($result); On Wed, Sep 25, 2013 at 10:12 AM, Alf Stockton wrote: > > On 25/09/13 16:52, Shawn McK

Re: [PHP] php fopen https error

2013-09-25 Thread Shawn McKenzie
Just as I thought: 5.2.0 Fixed bug #39039 SSL: fatal protocol error when fetching HTTPS from servers running Google web server). (Ilia) On Wed, Sep 25, 2013 at 10:03 AM, Shawn McKenzie wrote: > I believe this was a bug, is only a warning that may be suppressed and may > have been fi

Re: [PHP] php fopen https error

2013-09-25 Thread Shawn McKenzie
I believe this was a bug, is only a warning that may be suppressed and may have been fixed in 5.2.0. Are you aware that PHP is at 5.5.4 and that 5.1.6 is over 7 years old? -Shawn On Wed, Sep 25, 2013 at 9:09 AM, Markus Falb wrote: > With RHEL/CentOS 5 php I get an SSL Error > RHEL/Ce

Re: [PHP] PHP and curl

2013-09-25 Thread Shawn McKenzie
SOAP functions can be called as methods of the SoapClient object. Maybe: $client->GetSequenceNo( $parameters ); -Shawn On Wed, Sep 25, 2013 at 9:17 AM, Alf Stockton wrote: > In an attempt to interface with a webservice on a Windows 7 server I have > started writing the following:

[PHP] Re: Integer

2013-02-02 Thread Shawn McKenzie
On 02/01/2013 10:40 PM, Ron Piggott wrote: > In the following the “2.” means a moderator response and “25” is the account > # of the moderator. > > > $author = 2.00025 > > ?> > > How can I get the 25 by itself? > - I want to drop the “2.” and remove all the zero’s >

[PHP] Re: globbed includes?

2012-11-20 Thread Shawn McKenzie
On 11/18/2012 02:29 PM, tamouse mailing lists wrote: > There are certain times I'd like to include all files in a given > directory (such as configuration stuff that is split out by type, a la > apache conf.d). Anyone have something handy that implements that? > Just for fun: array_walk(glob('*.

[PHP] Re: What do you call the end-user?

2012-07-24 Thread Shawn McKenzie
y of the users of free software. Even with clear detailed user guides and the fact that it is free, they are indignant about a missing feature or having to look in the docs for anything. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubsc

Re: [PHP] url string being split

2012-04-27 Thread Shawn McKenzie
On 04/27/2012 10:56 AM, Chris Stinemetz wrote: > I still haven't been able to find a solution. Is there anyone out > there that knows how to keep the query string intact? > > Thank you, > > Chris urlencode($storerow['store_subject']) -- Thanks! -Shawn http:/

Re: [PHP] Variable Question

2012-04-19 Thread Shawn McKenzie
.php > > thnx, > Christoph Yes and you can use array_map('stripslashes', $row) prior. However I would just use the $row array as most people do instead of extracting. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Script failing on extension_dir

2012-04-10 Thread Shawn McKenzie
On 04/10/2012 12:25 PM, George R Smith wrote: > Matijin and Shawn, > > I added to /etc/php5/apache2/php.ini the line > extension_dir = "/usr/lib/php5/20090626+lfs" > > but when I run qm_ext_build I still get > You need to create the php extensions directory:

[PHP] Re: Script failing on extension_dir

2012-04-10 Thread Shawn McKenzie
ixing that now but the simple fix on your machine is this: EXTDIR="/usr/lib/php5/20090626+lfs" -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: List working?

2012-03-27 Thread Shawn McKenzie
On 03/27/2012 08:11 PM, Daniel Fenn wrote: > It working fine here, just people are busy I suppose. > y u no help me !! i have white page withg my php codes in my page ! help please !! asap please i put codes in my file and is white > > On Wed, Mar 28, 2012 at 10:45 AM, Sh

Re: [PHP] Re: List working?

2012-03-27 Thread Shawn McKenzie
On 03/27/2012 04:34 PM, Matijn Woudt wrote: > On Tue, Mar 27, 2012 at 11:32 PM, Shawn McKenzie wrote: >> On 03/27/2012 04:23 PM, Jay Blanchard wrote: >>> Seems unusual not to have any traffic on it all day long. >> >> i put in my codes but i only get blank page... &g

[PHP] Re: List working?

2012-03-27 Thread Shawn McKenzie
On 03/27/2012 04:23 PM, Jay Blanchard wrote: > Seems unusual not to have any traffic on it all day long. i put in my codes but i only get blank page... -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.

[PHP] Re: looking for an array sorting function.. just not sure which one..and how yet

2012-03-10 Thread Shawn McKenzie
On 03/10/2012 07:01 PM, Shawn McKenzie wrote: > foreach ($query->result() as $row) { >> $arr_cTree[$row->cID] = array($row->cPcID, $row->cL, $row->cName, >> $row->cSeg, $row->cSort); >> } Actually, you may construct your array as follows to m

[PHP] Re: looking for an array sorting function.. just not sure which one.. and how yet

2012-03-10 Thread Shawn McKenzie
gt; Thanks! > -Govinda The best option is to sort it in the query. But if for whatever reason you sort it in the query for use one way and then need it sorted differently later, then most likely execute another query with the new sorting. If having tried that, and that's not what wor

[PHP] Re: iphone & php

2012-03-05 Thread Shawn McKenzie
of my i[phone software updates, javascript in safari was turned off. I know I didn't do it and js had been working great. Something to check. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Insert new array after specific key in multidimensional array

2012-02-28 Thread Shawn McKenzie
$i = 0; foreach($array as $k => $v) { if($k === $key) { $p = $i + 1; break; } $i++; } $array = array_merge(array_slice($array, 0, $p), $insert, array_slice($array, $p, count($array) - $p)); } -- Thanks! -Shawn http://www.spidean.com -- PHP Gene

[PHP] Re: Typecasting question

2012-02-05 Thread Shawn McKenzie
On 02/03/2012 10:11 AM, jas wrote: > array('private_key_type' => OPENSSL_KEYTYPE_RSA, > 'encrypt_key_cipher' => OPENSSL_CIPHER_3DES); Look like ints to me: var_dump(): array(2) { ["private_key_type"]=> int(0) ["encrypt_k

[PHP] Re: DOS CLI?

2011-12-02 Thread Shawn McKenzie
.. No. There's not one for the original Berkeley or AT&T UNIX, VMS, CPM, Commodore 64, Mac OS 9 or Amiga either as far as I know. The DOS that ran on TRS80, concurrent DOS and Zenith DOS are right as well. I'm sure that if you submit a feature request they would be all over it.

[PHP] Re: Sniping on the List

2011-11-15 Thread Shawn McKenzie
action to see that you are hereby banned from the Internet. You're messing with the wrong guy! -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Converting string to array index

2011-11-06 Thread Shawn McKenzie
; MySQL 5.1 PHP 5.3.3-6 Linux [Debian squeeze(sid)] > Not sure I totally understand, but from my assumption: foreach($test1 as $k => $v) { eval("\$results$v = $k;"); } print_r($results); -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Displaying variables in text - clarification needed

2011-10-26 Thread Shawn McKenzie
P is 5.2.3 and from what I can tell, hasn't been updated > since February of 2011. > > Thanks, > > --Rick > > In addition to escaping the var with mysql_real_escape_string() or similar, values for text columns need to be quoted as you did in your second example. con

[PHP] Re: PHP 5.2 and Apache 2.2 are really compatible?

2011-10-19 Thread Shawn McKenzie
#x27;C:\\php\\ext\\php_msql.dll' - The > specified module could not be found.\r\n in Unknown on line 0 > There should be a line in your php.ini file similar to this: extension='C:\\php\\ext\\php_msql.dll' Comment that out with a semi-colon and restart apache: ;extension=

[PHP] Re: files outside of documentRoot

2011-10-08 Thread Shawn McKenzie
ou would add the external dir to your include path. For images you can use a php file as the img src and that file sets the appropriate headers and uses readfile() to get and echo the image data: getimage.php?image=someimage.gif For download files you would do it in the same manner as for images:

[PHP] Re: Secure data management

2011-10-04 Thread Shawn McKenzie
ert the slash, that would be unwanted. Not all databases use the slash as an escape character and for the ones that do you should use the X_real_escape_string(), like mysql_real_escape_string() instead of addslashes() -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing Lis

Re: [PHP] book quest

2011-09-28 Thread Shawn McKenzie
, it would not only be easy to shop to > publishers, but it could also be one of the first truly collaborative > publications to exist on biological remnants. > Why are you waiting for the day Dan? Just do it! -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Question about losing port number

2011-09-26 Thread Shawn McKenzie
> Thx > I the page that you are on is connected via port 80 then $_SERVER['SERVER_PORT'] will be 80. If it is connected via 9090 then $_SERVER['SERVER_PORT'] will be 9090. If you want it to be different than how it is currently connected then you will have to hard code

[PHP] Re: How can I check for characters in a $_POST[] variable?

2011-09-22 Thread Shawn McKenzie
s off so I wanna ask how I can fix this. if(!ctype_alnum($_POST['username'])) { // is not alpha numeric } -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP 5.4.0beta1 released

2011-09-16 Thread Shawn McKenzie
On 09/15/2011 08:50 PM, d...@php.net wrote: Thanks X4! -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Bug?

2011-09-15 Thread Shawn McKenzie
type check compares them as strings. Use strcmp() to overcome this. 4. Do I need to explain this one? -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: htmlentities

2011-09-13 Thread Shawn McKenzie
just starting to get use to accented letters.) > > Thanks a lot for your help. > > Ron > > The Verse of the Day > “Encouragement from God’s Word” > http://www.TheVerseOfTheDay.info > If it is meant to be HTML then why run htmlentities(), especially before storing

[PHP] Re: Repetitive answers . . .

2011-09-09 Thread Shawn McKenzie
t. Better to receive too many responses than not enough. Besides, more often than not, it's multiple methods of doing things, not always identical. Not only will that never change, but it shouldn't. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http

[PHP] Re: Bug #51739 tricky string to float conversion

2011-08-31 Thread Shawn McKenzie
On 08/31/2011 01:48 PM, Shawn McKenzie wrote: > > The cast to float is truncating the invalid characters and since your > string contains a float that is INF (8315e839) before the truncation at > the "d", then it returns INF. Makes perfect sense. > Just FYI... Do

[PHP] Re: Bug #51739 tricky string to float conversion

2011-08-31 Thread Shawn McKenzie
ink about? > cheers > Daniel The cast to float is truncating the invalid characters and since your string contains a float that is INF (8315e839) before the truncation at the "d", then it returns INF. Makes perfect sense. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: ZCE

2011-08-23 Thread Shawn McKenzie
Congratulations! -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Unanticipated characters returned from multidimensional array

2011-08-06 Thread Shawn McKenzie
description['name']; > echo ""; > echo "$new_description"; > echo ""; > } > > } I haven't look through it long enough to find out about the characters, but try this: foreach($tableNews as $headline => $text

Re: [PHP] Complex (or not so) array data form submission?

2011-08-04 Thread Shawn McKenzie
index is important, it's better to provide it > explicitly. > > Andrew What Jamie posted is equivalent to this: name="addresses[0][id]" name="addresses[1][address1]" name="addresses[2][address2]" name="addresses[3][city]" name="addresses[4][state]" name="addresses[5][zip]" -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: $_POST value disappearing?

2011-08-02 Thread Shawn McKenzie
- > > --/index.php-- > > > > > The result I get is: > > Array > ( > [f_ap] => upload > [f_action] => doit > ) > --- > > Can someone enlighten me? > > Thanks, > Donovan > > The manual is great! $_

Re: [PHP] I can't execute pf commands

2011-07-28 Thread Shawn McKenzie
on of adding Apache user to sudoers. > It's quite high risk move in security-wise Good luck getting it to work another way. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: I can't execute pf commands

2011-07-28 Thread Shawn McKenzie
? > > pfctl probably requires root privileges, so you can either set the suid on it or I would set it up in sudoers to allow the apache user to execute it without a password. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: pathinfo function

2011-07-26 Thread Shawn McKenzie
ny other array you'll get a notice: Notice: Undefined index: extension -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: PHP frameworks

2011-07-21 Thread Shawn McKenzie
On 07/21/2011 07:44 PM, Micky Hulse wrote: > On Thu, Jul 21, 2011 at 5:33 PM, Micky Hulse wrote: >> Your app models? > > More specifically, your app model data. :) A la CakePHP. Will automagically build controllers and views for the admin of your tables/models if you wish. --

[PHP] Re: PHP frameworks

2011-07-21 Thread Shawn McKenzie
CakePHP and CI tutorials and seeing which one seems like a good fit for you. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: str_replace around a character??

2011-07-14 Thread Shawn McKenzie
On 07/13/2011 04:03 PM, Karl DeSaulniers wrote: > > Thanks Shawn, > I had actually found the same thing myself.. > > $subCc = array_map('trim',explode(",",$subCc)); > > But I could not find my post last night to make a new comment about it. > Thank y

[PHP] Re: Variable scope

2011-07-14 Thread Shawn McKenzie
ld. You pass in $e_cc but try and use $_email_cc, etc, etc, etc... Develop with: error_reporting(E_ALL); ini_set('display_errors', '1'); This will tell you about all of those undefined variables. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://

[PHP] Re: IF stream lining

2011-07-14 Thread Shawn McKenzie
Day.info > Depends on what you mean by streamlined. If it were longer, this might be useful: if(!in_array($val, array('with','from','to','against','mom','dad')) { -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: str_replace around a character??

2011-07-13 Thread Shawn McKenzie
be much appreciated. > TIA > Best Regards, > > Karl DeSaulniers > Design Drumm > http://designdrumm.com > > $cc = implode(', ', array_filter(array_map('trim', explode(',', $cc; -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Installing PHP

2011-07-04 Thread Shawn McKenzie
who still love the USofA, Happy Independence Day! > You may need to add c:\php\ to the Windows path so that the Apache mod can find other files it may need. If you have mysql or other extensions enabled in php.ini, then they may be looking for another dll that is located in the php dir. And of course, Happy Independence Day! -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Php filter validate url

2011-06-27 Thread Shawn McKenzie
On 06/27/2011 10:01 AM, Plamen Ivanov wrote: > On Sun, Jun 26, 2011 at 5:44 PM, Shawn McKenzie wrote: >> >> On 06/26/2011 12:31 PM, Adam Tong wrote: >>> Hi, >>> >>> I wanted tu use php filters for validation to avoid regular expresions. >>> Is

Re: [PHP] Re: Php filter validate url

2011-06-26 Thread Shawn McKenzie
On 06/26/2011 04:50 PM, Fatih P. wrote: > Guys, when you reply a mail, You should write your reply on the top of it, > not at the bottom of it. > makes it easier to follow. > Ready flame-throwers! -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.

[PHP] Re: Php filter validate url

2011-06-26 Thread Shawn McKenzie
//') === 0) { //starts with http:// } esle { // does not start with http:// } -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Php filter validate url

2011-06-26 Thread Shawn McKenzie
= 'http://wwwtestcom'; > $url = filter_var($url,FILTER_VALIDATE_URL); > echo $url; > - > > Or I am doing something wrong > > Thank you No, because http:// is not a URL, it's a scheme or protocol. -- Thanks! -Shawn http://www.spidean.com -- PHP General Maili

[PHP] Re: newbie date time question

2011-06-22 Thread Shawn McKenzie
On 06/22/2011 06:54 PM, David Nicholls wrote: >> I'm late to the party, but strtotime works great, though you need to >> give it what it expects: >> >> $ts = strtotime(str_replace('/', '-', $date)); >> > > Thanks, Shawn, that's a b

[PHP] Re: newbie date time question

2011-06-22 Thread Shawn McKenzie
s > successfully with better behaved date and time strings). > > Advice appreciated. > > DN I'm late to the party, but strtotime works great, though you need to give it what it expects: $ts = strtotime(str_replace('/', '-', $date)); -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: this newsgroup and OE

2011-06-22 Thread Shawn McKenzie
"working" newsgroup > accounts. > > Thanks in advance. > > No secret. This has been happening to me every day for years using Thunderbird. It's a news server issue that has never been corrected. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: mysqlnd and LOAD DATA INFILE

2011-06-20 Thread Shawn McKenzie
gt; Kind regards > Marten This is a PHP list, but most likely run: mysql_fix_privilege_tables and then restart mysql. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: mysqlnd and LOAD DATA INFILE

2011-06-20 Thread Shawn McKenzie
On 06/20/2011 07:51 AM, Marten Lehmann wrote: > isn't working any longer What does that mean? It generates an error? It executes without error but the data isn't loaded? Try a test on the command line and see what you get. -- Thanks! -Shawn http://www.spidean.com -- PHP Ge

Re: [PHP] Submit Using An Image Form Processing

2011-06-19 Thread Shawn McKenzie
On 06/19/2011 07:26 AM, tedd wrote: > At 6:34 PM -0500 6/18/11, Shawn McKenzie wrote: >> >> Get method is for retrieval only. It is not for anything that has a >> consequence (insert, update, delete, send email, etc.). Use only post >> for those. >> >&g

Re: [PHP] Submit Using An Image Form Processing

2011-06-18 Thread Shawn McKenzie
d)) { > > //delete code here > } > > Check all that before you run it I'm writing from my smart phone and it's > all untested. Hopefully it gives you a start though. > > Jason Pruim Get method is for retrieval only. It is not for anything that has a co

[PHP] Re: Extracting data from exec() call

2011-06-14 Thread Shawn McKenzie
posted two different expected outputs and I misread the first. You want a string of only the coma separated numbers? If so: if ($array = preg_grep('/^ wmax = /', $output)) { $wmax = array_shift($array); } If you want to get rid of the wmax = or add the { } or whatever use str_repla

[PHP] Re: Extracting data from exec() call

2011-06-14 Thread Shawn McKenzie
On 06/14/2011 01:03 PM, Shawn McKenzie wrote: > $wmax = explode(', ', $output[count($output)-1]); Should be -2 :( $wmax = explode(', ', $output[count($output)-2]); -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To u

[PHP] Re: Extracting data from exec() call

2011-06-14 Thread Shawn McKenzie
he data section starts. And I need to convert the > strings into arrays for each data set. > > Suggestions? Assuming that it is always the second to the last item, then: $wmax = explode(', ', $output[count($output)-1]); array_shift($wmax); print_r($wmax); --or to search for wmax = if($array = preg_grep('/^ wmax = $/', $output)) { $wmax = explode(', ', $array[0]); } array_shift($wmax); print_r($wmax); May need some more error checking. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] date.timezone set and still getting strict warnings.

2011-06-14 Thread Shawn McKenzie
web with the > exact same results. > > Now, the problem is... > >I surrounded the date.timezone setting with single quotes. > > So, removing the quotes got me what I needed. > Glad you got it fixed. Many distros do it differently. Windows normally has one php.ini, Ubuntu and derivatives have 2. Other will vary. Here's mine: /etc/php5/apache2/php.ini /etc/php5/cli/php.ini -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Fuzzy Array Search

2011-06-07 Thread Shawn McKenzie
On 06/07/2011 04:35 PM, Alex Nikitin wrote: > Shawn, == is not good for string comparison, its a bad habit that one > should get out of, use ===, its much safer . Yes, except that I was comparing a string to an array of integers :) > > Also try the same algorithm on 10 arrays of

Re: [PHP] Re: Fuzzy Array Search

2011-06-07 Thread Shawn McKenzie
On 06/07/2011 04:28 PM, Floyd Resler wrote: > > Shawn, > I'm terrible with regular expressions. Could you give me an example? > > Thanks! > Floyd > > Depends. Could be as simple as this to return an array of all occurrences of $needle in any

Re: [PHP] Re: Fuzzy Array Search

2011-06-07 Thread Shawn McKenzie
some point... >> >> (sorry i keep on hitting reply instead of reply to all) >> >> -- >> The trouble with programmers is that you can never tell what a programmer is >> doing until it’s too late. ~Seymour Cray >> >> >> >> On Tue, Jun 7, 201

[PHP] Re: Fuzzy Array Search

2011-06-07 Thread Shawn McKenzie
On 06/07/2011 12:45 PM, Floyd Resler wrote: > What would be the easiest way to do a fuzzy array search? Can I do this > without having to step through the array? > > Thanks! > Floyd > I use preg_grep() -- Thanks! -Shawn http://www.spidean.com -- PHP General

[PHP] Re: A Review Request

2011-05-19 Thread Shawn McKenzie
grows and you have PHP, HTML, CSS, JS and maybe INI files and SQL, then Geshi would handle all of these. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Storing indefinite arrays in database

2011-05-11 Thread Shawn McKenzie
On 05/11/2011 03:15 PM, Benedikt Voigt wrote: > Thanks Shawn, > > yes, your second idea works for me. The first one not, as I need to > search and join on it. > To continue your second idea with your example: > > Arguments: > idresults_idvariablevalue > 1

[PHP] Re: Storing indefinite arrays in database

2011-05-11 Thread Shawn McKenzie
join results.id on arguments.results_id in your query. If you actually need to store the argument name then just add another column called variable and change the argument column's name to value. id results_id variable value -- Thanks! -Shawn http://www.spidean.co

[PHP] Re: files outside of the web tree

2011-04-27 Thread Shawn McKenzie
s/' . basename($_GET['name']); $type = mime_content_type($file); header('Content-type: $type'); readfile($file); -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: JavaScript Injection ???

2011-04-18 Thread Shawn McKenzie
orks. So, what happened? Was there a php > update that prohibited that sort of behavior or did hosts start setting > something to OFF, or what? > > If you know, please explain. > > Thanks, > > tedd Most likely like magic_quotes_gpc. Suhosin-Patch may protect

[PHP] Re: How to write a PHP coding to list out all files and directories aslinks to them?

2011-04-16 Thread Shawn McKenzie
> I prefer glob(). Give it a shot and ask for help on code that you have tried. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Ranges for case statement and a WTF moment.

2011-04-06 Thread Shawn McKenzie
9'; break; > case 50...59 : echo 'Between 50 and 59'; break; > default : echo 'Unknown : ', $s; > } > ?> > > Completely unexpectedly, the above code runs but produces the wrong output. FYI. My first inclination would have been: s

Re: [PHP] problem with if and exact match

2011-03-15 Thread Shawn McKenzie
particular needle occurs within haystack, use the faster and less memory intensive function strpos() instead. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $_POST variable

2011-03-12 Thread Shawn McKenzie
same "group" of radio buttons. So here is the long and short; if the name is the same and you specify an index then names with the same index will be grouped together: name[1] and name[1] are the same but different group from name[2]. If you don't specify an index, but the name is

Re: [PHP] Re: $_POST variable

2011-03-11 Thread Shawn McKenzie
On 03/11/2011 02:33 PM, Jim Lucas wrote: > On 3/11/2011 12:03 PM, Shawn McKenzie wrote: >> On 03/11/2011 01:28 PM, Danny wrote: >>> Hi guys, >>> >>> I have a form that has a long list of radio-bottons inside of it. The >>> radio-buttons are dynamically

[PHP] Re: $_POST variable

2011-03-11 Thread Shawn McKenzie
t; Thank You > > Danny The most common and flexible way to do this sort of thing is to use arrays instead: Then: foreach($_POST['radio'] as $key => $value) { echo "radio for $key is $value"; } -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Regex for extracting quoted strings

2011-03-07 Thread Shawn McKenzie
On 03/05/2011 04:38 PM, Mark Kelly wrote: > Hi. > > Thanks for all the replies. > > On Saturday 05 Mar 2011 at 22:11 Simon J Welsh wrote: > >> On 6/03/2011, at 11:08 AM, Shawn McKenzie wrote: >>> $regex = '/"([^"]+)"/'; > > Shawn,

[PHP] Re: Regex for extracting quoted strings

2011-03-05 Thread Shawn McKenzie
#x27;Dave said "This is it". "Nope, that is the wrong colour" she > replied.'; > > I want $phrases to contain 'This is it' and 'Nope, that is the wrong colour'. > > Can anyone help? > > Cheers, > > Mark $regex = '/"

[PHP] Re: String Encodings - loose guidelines

2011-01-26 Thread Shawn McKenzie
lentities() If you don't want HTML then strip it when displaying: striptags() > > 6.) string encoding for redirects > Same as #4. BTW, these are very nice for working with data: filter_var() filter_var_array() filter_input() filter_input_array() -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Installing PEAR

2011-01-25 Thread Shawn McKenzie
3.3-6 Linux [Debian (sid)] >> >> > > If you are using php from the repositories, there must be a pear package > as well in the repos. Check for them. > Yes, I'm on Ubuntu and just used 'apt-get install php-pear'. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: array to var - with different name

2011-01-21 Thread Shawn McKenzie
On 01/20/2011 05:26 PM, Tommy Pham wrote: > On Thu, Jan 20, 2011 at 2:49 PM, Shawn McKenzie wrote: >> On 01/20/2011 04:28 PM, Donovan Brooke wrote: >>> Hello again! >>> >>> I'm trying to find a good way to convert array key/value's to >>>

[PHP] Re: array to var - with different name

2011-01-20 Thread Shawn McKenzie
t;t_" . substr($key,2) . "=$value&"; > parse_str($t_string); > } > } > - > > I figure I can adapt the above by doing something like: > > $a_formvars = array_merge($_POST,$_GET); > > However, I thought I'd check with you all to se

[PHP] Re: News Server Time Outs

2011-01-20 Thread Shawn McKenzie
to aggressively. > > Al.. Yesterday I couldn't connect at all, all day. Today it seems to be working OK. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Stripslashes redundancy question.

2010-10-25 Thread Shawn McKenzie
et > docs incomplete? Or am I just horribly misguided? > > Paul > magic_quotes_gpc yes (Get, Post, Cookie). magic_quotes_runtime controls these: http://www.php.net/manual/en/info.configuration.php#ini.magic-quotes-runtime -- Thanks! -Shawn http://www.spidean.com -- PHP Gener

Re: [PHP] floored by floor()

2010-10-14 Thread Shawn McKenzie
o serialize(327.03 * 100); -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Question about news.php.net

2010-09-13 Thread Shawn McKenzie
ad a message and then click another one and it times out. It does this for hours at a time. Also, many times when sending a reply it times out. Just learned to live with it because I don't want mailing list mails either. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: How to handle a submitted form with no changes -- best practices sought

2010-09-12 Thread Shawn McKenzie
On 09/12/2010 02:38 AM, Tamara Temple wrote: > > On Sep 11, 2010, at 10:46 PM, Shawn McKenzie wrote: >> It could however be a problem if there is a BOT or something that >> continually submits to your page. In that case (and in general) I would >> recommend using a for

[PHP] Re: php cli question

2010-09-11 Thread Shawn McKenzie
ave > done 'unset()' at some critical places were large arrays were used, > and I think it helped. AFAIK, unlike Java, there is no 'garbage > collector' thread that does all the magic? > > Thanks, > Ravi If I have time when you reply I'll answer the questions, but I must ask: Is this purely academic? Why is this a concern? Have you encountered issues? If so, what? -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: How to handle a submitted form with no changes -- best practices sought

2010-09-11 Thread Shawn McKenzie
ges, then there really is no problem. It could however be a problem if there is a BOT or something that continually submits to your page. In that case (and in general) I would recommend using a form token that helps guard against this. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Encoding Ampersands

2010-07-29 Thread Shawn McKenzie
splay properly on the page but the >>> validator is OK with them? >>> >>> >>> Is the answer as simple as: >>> >>> urlencode($myvar) >>> >>> Thanks, >>> --Rick >>> >>> >>> -- >>> PHP General Mailing List (http://www.php.net/) >>> To unsubscribe, visit: http://www.php.net/unsub.php >>> >> > -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP database interface layer

2010-07-22 Thread Shawn McKenzie
s, that if you follow, makes it sooo easy, but if you already have your schema built it can use that just as easily. Just run the cake script, enter db details, it will enumerate tables and columns and ask which are related by which keys and even let you enter validation rules etc. It then build

[PHP] Re: Weird behavior of exec()

2010-07-15 Thread Shawn McKenzie
On 07/15/2010 04:40 PM, Leonardo wrote: > > Bad habit. I know. Did it fix it? -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Weird behavior of exec()

2010-07-15 Thread Shawn McKenzie
On 07/15/2010 10:51 AM, Leonardo wrote: > Hi everybody. I need to use exec() to run a background php script, but > it's not working properly. Take a look at this sample: > > a.php > >echo ' File A (1) '; > >exec('php b.php > output.txt &'); > >echo ' File A (2) '; > >?> >

[PHP] Re: validating form input

2010-07-09 Thread Shawn McKenzie
ed on your PHP installation, except you would stripslashes first: if(get_magic_quotes_gpc()) { $_POST['name'] = stripslashes($_POST['name']); } $name = mysqli_real_escape_string($DatabaseLink, trim($_POST['name'])); > > $name = stripslashes(mysqli_real_esca

[PHP] Re: Multiple Access Question

2010-07-07 Thread Shawn McKenzie
tore them in the session. Then on the processing page look them up again and see if they match the session values. If not, then load the edit form again with a message that says the record has recently been updated by someone else. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

  1   2   3   4   5   6   7   8   9   10   >