[PHP] Re: Cookie Variables Maxing Out Using IE6

2006-08-16 Thread Adam Zey
;, time()-3600, '/', ".mydomain.com", 1); } } } echo ""; print_r($_COOKIE); echo ""; ?> Why do you need more than one single cookie? If you want to store multiple pieces of information, serialize the data or something similar. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Cookie Variables Maxing Out Using IE6

2006-08-17 Thread Adam Zey
cookies! Sorry, I couldn't resist ;) Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Can a PHP 5 Object Be Persisted Past Script End?

2006-08-17 Thread Adam Zey
objects. Info is in the manual. Regards, Adam. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Looking for caveats to the following code

2006-08-17 Thread Adam Zey
)" is itself the result you assigned, so you can still compare on that. The reason I put it in more brackets was just for readability. I don't think you actually need the extra set, but I'm not sure. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] select colum in array.

2006-08-18 Thread Adam Zey
hen you have multiple requests per second, those few milliseconds can REALLY add up. I'd rather spend the processor time on the webserver gzipping the data as it goes out. Of course, I have no benchmarks telling me that PHP would be slower than a database server for messing with data, I'm just making an assumption. Regards, Adam. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Php and Cygwin SVN

2006-08-31 Thread Adam Zey
hanks, Mariano.- There is a windows port of Subversion, and the GNU utilities you're referring to have mostly been ported to Windows without the use of cygwin (see gnuwin32). Do you really need to rely on cygwin? Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To u

Re: [PHP] Re: Php and Cygwin SVN

2006-08-31 Thread Adam Zey
Look into the syntax of the Windows command "start" (open a console and type "start /?"). It's purpose is to start other processes, and it provides some flexibility as to how they're launched. One of the options is to hide the console windows. Regards, Adam

[PHP] Re: remove SimpleXML nodes

2006-08-31 Thread Adam Zey
Javier Ruiz wrote: Hi all, So I want to do... $xmlDatabase = new SimpleXMLElement($myXML); foreach ($xmlDatabase as $oneTable) { if ($oneTable['name'] == 'two') { /// HERE I WANT TO DELETE THE $oneTable NODE unset($oneTable); // <-- and this doesn't work... } } any ide

Re: [PHP] Re: remove SimpleXML nodes

2006-09-01 Thread Adam Zey
be done. One thing you might try is, to do the unset, export to DOM using dom_import_simplexml(), use DOM to unset the thing, and then use simplexml_import_dom(). Who knows how slow that'd be, though. Regards, Adam. Javier Ruiz wrote: Thanks a lot to all :) Using DOM I can do what I need

[PHP] Protecting Streaming Audio

2006-11-03 Thread Adam Gittins
, there must be a way.. Thanks for any ideas.. Sincerely, Adam

[PHP] Protecting Streaming Audio

2006-11-03 Thread Adam Gittins
, there must be a way.. Thanks for any ideas.. Sincerely, Adam

Re: [PHP] Protecting Streaming Audio

2006-11-04 Thread Adam Gittins
ing a file - what function would be used?? Sorry about the silly questions.. Sincerely, Adam On 11/4/06, Ed Lazor <[EMAIL PROTECTED]> wrote: You put the data in a directory outside of the webspace and use PHP to grab the file and send it to someone. That way you're able to contr

Re: [PHP] Protecting Streaming Audio

2006-11-06 Thread Adam Gittins
Thanks for that informative post. It really is a can of worms. How far to go with it is a good question.. Honesty, the glass in half full (No harm in thinking like that is there).. Sincerely, Adam On 11/7/06, Richard Lynch <[EMAIL PROTECTED]> wrote: On Mon, November 6, 2006 10:24 am, Ed

Re: [PHP] working with ini files

2006-02-28 Thread Adam Ashley
t/package/Config all the hard work has been done for you. Adam Ashley signature.asc Description: This is a digitally signed message part

[PHP] echo'ing a variable and cat'ing text

2006-03-02 Thread Adam Williams
I have a file called userlist. I'm trying to read the file, and then echo their name and add @mdah.state.ms.us with it. In the file userlist, it looks like: userabc userdef userxyz and I have the following code: But when I run it, I get: @mdah.state.ms.ususerabc @mdah.state.ms.ususerdef

Re: [PHP] echo'ing a variable and cat'ing text

2006-03-02 Thread Adam Williams
Hi, I just tried that, didn't make a difference, still not getting my expected output. [EMAIL PROTECTED] wrote: [snip] echo "$thedata"."@mdah.state.ms.us"; [/snip] Try echo "$thedata".'@mdah.state.ms.us'; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www

Re: [PHP] echo'ing a variable and cat'ing text

2006-03-02 Thread Adam Williams
John Nichel wrote: Well, you're not telling fgets how much to read for one, and I'd do this a different way to begin with... if ( $file = file ( $filename ) ) { foreach ( $file as $line ) { if ( $file != "" ) { echo ( $line . "@mdah.state.ms.us" ); } } } else

Re: [PHP] echo'ing a variable and cat'ing text

2006-03-02 Thread Adam Williams
got it! i had to have my block of code look like this: if ( $file = file ( $filename ) ) { foreach ( $file as $line ) { if ( $line != "" ) { $line = trim($line); echo ( $line . "@mdah.state.ms.us" ); echo "\n"; } } } else { echo ( "

[PHP] How to disable PHP's POST caching?

2006-05-23 Thread Adam Zey
stead of after the client finishes sending? Regards, Adam Zey. PS: As far as I can tell, PHP caches the entire POST in memory as it is being sent, but just doesn't make it available to php://input until after the client is done. Since PHP already has it in memory, why isn't it acces

Re: [PHP] How to disable PHP's POST caching?

2006-05-23 Thread Adam Zey
Jochem Maas wrote: Adam Zey wrote: PHP seems to cache POST data, and waits for the entire POST to finish sending before it makes it available to php://input. I'd like to be able to read the post data from php://input while the client is still uploading it. How can I cause PHP to mak

Re: [PHP] How to disable PHP's POST caching?

2006-05-23 Thread Adam Zey
Richard Lynch wrote: On Tue, May 23, 2006 4:39 pm, Adam Zey wrote: The only other approach I can figure out is to send periodic POST requests with the latest data, the downside of which is a huge increase in latency between data production and consumption. Sounds like you maybe want

Re: [PHP] How to disable PHP's POST caching?

2006-05-23 Thread Adam Zey
f breaking lots http protocols 'rules' while your at it. Regards, Adam Zey. As I mentioned in my more recent mail, this unfortunately isn't an option since I need to run on port 80 without disturbing the existing webserver, which requirse that the script be running through

Re: [PHP] How to disable PHP's POST caching?

2006-05-23 Thread Adam Zey
g the data rather than splitting it up like that. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to disable PHP's POST caching?

2006-05-23 Thread Adam Zey
any buffering going on. My backup approach, as I described in another mail, involves client-side buffering and multiple POST requests. But that induces quite a bit of latency, which is quite undesirable. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] Re: Going through 2 arrays at once

2006-05-23 Thread Adam Zey
versity 225 South 6th Street, 9th Floor Minneapolis, MN 55402 www.capella.edu <http://www.capella.edu/> It sounds like you want to use a while loop and then iterate manually through both arrays, iterating both arrays once per loop iteration. Sorry if I've misunderstood the prob

Re: [PHP] How to disable PHP's POST caching?

2006-05-23 Thread Adam Zey
being sent on to the final destination. The idea is to get TCP tunneling working, once you do that you can rely on other programs to use that TCP tunnel for more complex things, like SOCKS. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Formatting of a.m. and p.m.

2006-05-23 Thread Adam Zey
lace your example: echo str_replace(array("am", "pm), array("a.m.", "p.m."), date("a")); And to do the replacement on a full data/time: echo str_replace(array("am", "pm), array("a.m.", "p.m."), date("g:i a")); which would output something like "12:52 p.m." Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to disable PHP's POST caching?

2006-05-23 Thread Adam Zey
Mindaugas L wrote: I'm still new in php:) what about using cookies? nobody mentioned anything? store info in client cookie, and read it from server the same time? :)) On 5/24/06, *Adam Zey* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: *snip*

[PHP] Re: how include works?

2006-05-23 Thread Adam Zey
do, say, require_once() twice, it ignores the second one. This is useful if your script might include the same file in different places (perhaps your main script includes two other scripts which both themselves include "functions.php") Regards, Adam Zey. -- PHP General Mailing Lis

Re: [PHP] How to disable PHP's POST caching?

2006-05-23 Thread Adam Zey
jekillen wrote: On May 23, 2006, at 3:37 PM, Adam Zey wrote: Essentially, I'm looking to write something in the same vein as GNU httptunnel, but in PHP, and running on port 80 serverside. The server->client part is easy, since a never-ending GET request can stream the data and be

Re: [PHP] How to disable PHP's POST caching?

2006-05-24 Thread Adam Zey
Stut wrote: Adam Zey wrote: Tunelling arbitrary TCP packets. Similar idea to SSH port forwarding, except tunneling over HTTP instead of SSH. A good example might be encapsulating an IRC (or telnet, or pop3, or ssh, etc) connection inside of an HTTP connection such that incomming IRC traffic

[PHP] Re: Embedding PHP 5 in a C application

2006-05-24 Thread Adam Zey
gards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to disable PHP's POST caching?

2006-05-24 Thread Adam Zey
Curt Zirzow wrote: On Tue, May 23, 2006 at 06:37:27PM -0400, Adam Zey wrote: The data going from client->server needs to be sent over an HTTP connection, which seems to limit me to PUT and POST requests, since they're the only ones that allow significant quantities of data to be sen

[PHP] Re: str_replace(), and correctly positioned HTML tags

2006-05-25 Thread Adam Zey
\n"), array("", "", "\n"), $text); So, to sum up my advice: 1) Don't create extra variables that you will never use 2) Consider using break tags instead of paragraph tags, they're easier to deal with in your situation. 3) Use arrays for replacement when appropriate 4) Don't store data if you're only ever going to echo it out right away and never use it again. I think that's it, unless I missed something. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] preg_replace learning resources? Regex tuts? Tips? (and yes, I have been rtfm)

2006-05-25 Thread Adam Zey
a "[a-z]", then the indicator will show it matching the next character, then if I add "*", the text selection will expand to show it matching the rest of the letters, and so on. Anyhow, I find the feedback as I write a regex to be addictively useful. Regards, Adam Zey. --

Re: [PHP] problems with regex

2006-05-29 Thread Adam Zey
ot;", $str); Or if you did want to replace them with a space: $str = str_replace(array("!". "?"), " ", $str); This is especially important if you're doing the string replace in a loop, but even if you aren't, it is very bad style to use regular expres

[PHP] Re: pop-up window in php???

2006-05-29 Thread Adam Zey
any help would be appreciated. thanks, Siavash This has nothing to do with PHP, this is a javascript matter. You PHP script merely prints out the javascript code. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] pop-up window in php???

2006-05-29 Thread Adam Zey
php PHP is a server-side language. It cannot directly influence anything on the client-side. That is why you need to have your PHP script output a client-side scripting language such as JavaScript. You are still only executing PHP code on the server. Regards, Adam Zey. -- PHP General Mailing

[PHP] Re: Better method than stristr

2006-05-29 Thread Adam Zey
ke you're on very dangerous ground, letting users throw arbitrary SQL at your script. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Using 'header' as redirect

2006-05-30 Thread Adam Zey
MB of HTML into some poor user's browser. If you're getting this data from a database, set a limit to how many records can be shown, and give the user a form to control the parameters of what data is returned. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Executing functions or scripts in parallel

2006-05-30 Thread Adam Zey
>> > to execute my function servstatus(); in parallel with every hosts to >> > increase the speed ? >> > Thanks in advance. >> > >> > []'s >> > Felipe Martins >> > >> > >> Can you show us the function?

Re: [PHP] ob_flush() problems

2006-05-31 Thread Adam Zey
ww.php.net/manual/en/function.flush.php for more information on obstacles to getting data to the client as it is generated. As an unrelated note, there is no point in using "print" for some things and "echo" for others. For your uses, you might as well just use "echo&

Re: [PHP] Reading an XML outputting PHP file as XML

2006-06-02 Thread Adam Zey
ackticks operator. Note that simplexml_load_string() doesn't care about what type of file you reported it as (with Content-Type or something). It only cares that the string you pass it is XML. So if your script is the ONLY one that will ever get this XML, you don't need to bother with the content ty

Re: [PHP] If value is odd or not

2006-06-02 Thread Adam Zey
s needed is a recipe for disaster. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Retrieving Content

2006-06-02 Thread Adam Zey
from. It might be faster, but it would probably end up being less flexible. Alternatively, if you need a super robust solution, you might want to look into actual HTML parsing libraries, like tidy (which has a PHP module). Regards, Adam Zey. -- PHP General Mailing List (http://www.php.ne

[PHP] Re: Retrieving Content

2006-06-02 Thread Adam Zey
do it in PHP code so the performance benefits are slightly less. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Retrieving Content

2006-06-02 Thread Adam Zey
t_contents("http://www.tryout.com/1/2/";); Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Retrieving Content

2006-06-05 Thread Adam Zey
chris smith wrote: On 6/3/06, Adam Zey <[EMAIL PROTECTED]> wrote: Rodrigo de Oliveira Costa wrote: > I just discovered the problem I have to retrieve the output of the > site and not the url since its dynamic. Ca I do it like retrieve the > output of this url: > > www.tryou

[PHP] Re: SPL Iterator and Associative Array

2006-06-05 Thread Adam Zey
to develop on 5.0.5, put the code on 5.1.2, get a bunch of errors, and then have to develop again on 5.1.2 to fix the bugs. Not to mention that any testing done with 5.0.5 is invalid since you can't be sure that things will behave the same with the different production version. You may even waste time working around bugs in 5.0.5 that don't exist in 5.1.2. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: i have a problem inserting blob data larger than 1 mb

2006-06-05 Thread Adam Zey
longblob yet? They both have more capacity. I suggest you refer to the MySQL manual. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] When is "z" != "z" ?

2006-06-05 Thread Adam Zey
tedd wrote: -TG: Thanks for your explanation and time. Normally, I don't alpha++ anything -- not to criticize others, but to me it doesn't make much sense to add a number to a character. But considering the php language is so string aware, as compared to other languages, I just tried it on

Re: [PHP] If value is odd or not

2006-06-05 Thread Adam Zey
echo "$variable is ".($variable % 2 ?'even':'odd')."\n"; I'm not sure if you can nuke the whitespace in the modulus area or not. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Cannot read variables

2006-06-06 Thread Adam Zey
for an old badly written script, and in that case one has to question why they are running an old badly written script :) Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] When is "z" != "z" ?

2006-06-06 Thread Adam Zey
7;t mean to sound harsh, but why are you still complaining about it? You've been shown to do exactly what you want, why is it still a problem? Heck, if you still really want to do < and > with strings, you can easily write your own functions to compare two strings using your own

[PHP] Re: file( ) function

2006-06-08 Thread Adam Zey
M. You might want to reexamine the need for your code. It appears that all your code does is searches through a file for a certain line. Do you need to do this manually? array_search() will replace your entire for loop with a single function call, and it'll almost certainly be faster

[PHP] Re: running php method in the background

2006-06-08 Thread Adam Zey
lot easier to work with. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] server sending notifications to clients

2006-06-08 Thread Adam Zey
But since you don't want php files to execute forever you will have to stick to AJAX. You can do it without polling. I've seen web applications that open a neverending GET request in order to get updates to the browser instantaneously. Regards, Adam. -- PHP General Mai

Re: [PHP] server sending notifications to clients

2006-06-08 Thread Adam Zey
kartikay malhotra wrote: Dear Adam, "You can do it without polling. I've seen web applications that open a neverending GET request in order to get updates to the browser instantaneously. Regards, Adam." Kindly elaborate on "neverending GET request". Shall I call the

[PHP] Re: How to tell if a socket is connected

2006-06-12 Thread Adam Zey
times out or not. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: trapping fatal errors...?

2006-06-12 Thread Adam Zey
safer to handle errors before they happen by checking that you're in a good state before you try to do something. For example, nonexistent files can be handled by file_exists(). Undefined functions can be checked with function_exists(). Regards, Adam Zey. -- PHP General Mailing List

[PHP] Re: serving video files with php

2006-06-15 Thread Adam Zey
drain compared to just letting Apache handle the download itself. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: How to run one php app from another?

2006-06-15 Thread Adam Zey
require_once(). Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Replacing text with criteria

2006-06-15 Thread Adam Zey
ositions. BTW, in functions like substr, specifying "-1" for length means keep going until the second to last character. Regards, Adam. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: running conditions while looping through arrays....

2006-06-19 Thread Adam Zey
{ # Mail is spam! Do something. } } Or something like that. I'm not exactly sure what your criteria are. What I'm doing above is looping through the mail messages one at a time, and checking all aspects of that email in each loop iteration. If you're doing complex analysis on each message, then that is probably the fastest way. If you're simply searching for things, you could always do array searches. So, search through $email with array_search or perhaps array_intersect. Then you don't need to loop at all. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: comparing a string

2006-06-20 Thread Adam Zey
ion the fact that it leads to harder to read code. Which of these has a more readily apparent meaning? if ( strcmp($foo,$bar) == 0 ) if ( $foo === $bar ) Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Paging Help

2006-06-20 Thread Adam Zey
of you guys. As a comment, it would have been better to do "SELECT COUNT(*) FROM foo" and reading the result rather than doing "SELECT * FROM foo" and then mysql_num_rows(). Don't ask MySQL to collect data if you're not going to use it! That actually applies to why

[PHP] Re: shutting down a web app for maintenance

2006-06-20 Thread Adam Zey
m everyday issues. If you wanted to get fancy, you could code your system to prevent new logins, expire normal logins much faster (Say, after 15 minutes instead of hours or days), and then wait for all users to be logged out before continuing. Regards, Adam Zey. -- PHP General Mailing List (

[PHP] Re: shutting down a web app for maintenance

2006-06-20 Thread Adam Zey
aintenance? Because otherwise, if you've denied all access to ANY of your webapp's php scripts, it shouldn't matter if the user has session data. If you physically move the web app's PHP scripts (Or set up a redirect, etc), they can't do anything with it. Regards

Re: [PHP] For Loop

2006-06-20 Thread Adam Zey
er to read by doing $arr["p{$i}name"] even though the {} aren't required. It'd be a lot easier to read than concatenations :) Regards, Adam. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] helping people...

2006-06-21 Thread Adam Zey
t: http://www.php.net/unsub.php If somebody is sending you spam from one address over and over, USE A FILTER TO BLOCK THEM. Don't be an asshole and threaten to DDoS/attack their server. At that point you've just gone from being a victim to the bad guy, and you don't get a

[PHP] Re: comparing a string

2006-06-21 Thread Adam Zey
Rafael wrote: (inline) Adam Zey wrote: Rafael wrote: A single "=" it's an assignment, not a comparison; and though it sometimes work, you shouldn't compare strings with "==", but using string functions, such as strcmp()... or similar_text(), etc. This is

[PHP] Re: [MailServer Notification]Content Filtering Notification

2006-06-21 Thread Adam Zey
: [PHP] helping people... OK, this is just amusing. Somebody over at "AIT Batam" is obviously an idiot. Regards, Adam. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Equivelant to mysql_fetch_row for normal array

2006-06-22 Thread Adam Zey
an array. You really should read the manual, the pages for all these functions describe EXACTLY what they do. Remember that mysql_fetch_array returns an associative array. You can refer to the SQL fields by their names. So if your select query was "SELECT foo, bar FROM mytabl

[PHP] Re: rss feeds from db

2006-06-22 Thread Adam Zey
ant it there, do a search-replace for "¦" and either replace it with an alternative character (perhaps a ¦ directly), or an empty string to remove it entirely. Regards, Adam. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Changing PHP.ini

2008-07-15 Thread Adam Gerson
display_errors = Off. What else can I do? Thanks, Adam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PDO prepared statements and LIKE escaping

2008-08-04 Thread Adam Richardson
sed with any of the solutions I've undertaken. Recently, I've been avoiding LIKE conditions and using INSTR, LOCATE, CHARINDEX, etc. to avoid the potential for unescaped wildcards. Adam On Mon, Aug 4, 2008 at 12:33 PM, Larry Garfield <[EMAIL PROTECTED]>wrote: > > On Mo

Re: [PHP] PDO prepared statements and LIKE escaping

2008-08-04 Thread Adam Richardson
Like I said, I'm not 'especially pleased' with any idea up until now. I'm certainly open to any other ideas. Adam On Mon, Aug 4, 2008 at 6:57 PM, Larry Garfield <[EMAIL PROTECTED]>wrote: > > Hm. So your solution is "don't use LIKE"? I c

Re: [PHP] Graph type

2008-08-08 Thread Adam Richardson
When I first saw it, I thought of a stem and leaf graph: http://cnx.org/content/m10157/latest/#table3 http://www.nervenet.org/papers_images/cb2.jpg However, your stem remains constant (10), so I'm not really sure what you're graphing. Adam On Fri, Aug 8, 2008 at 1:11 PM, tedd <[EM

[PHP] removing text from a string

2008-11-04 Thread Adam Williams
I have a file that looks like: 1. Some Text here 2. Another Line of Text 3. Yet another line of text 340. All the way to number 340 And I want to remove the Number, period, and blank space at the begining of each line. How can I accomplish this? Opening the file to modify it is easy, I'm jus

Re: [PHP] removing text from a string

2008-11-04 Thread Adam Williams
Thanks Boyd, your code did exactly what I wanted! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] session management

2004-01-29 Thread Adam Bregenzer
Bean; (some code later, on a different page) $userBean = $_SESSION["user]; RTFM on sessions - http://www.php.net/session -- Adam Bregenzer [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] OOP methodology

2004-01-30 Thread Adam Bregenzer
your HTMLGenerator (like generate HTML that is not tied to the iterator) as well as use different iterators in the same HTMLGenerator instance, etc. Also, if the iterator is what is using the dbObj class (to iterate through the database data) then consider passing it to the iterator instead. Rega

RE: [PHP] How do you guys do this?

2004-01-31 Thread Adam Bregenzer
avy lifting involved in ensuring > uniqueness. Even though it seems incredibly unlikely, isn't is safer to just not worry about it and use unique ids instead? Why take the risk when you can use an autonumber from a database or md5(uniqid(rand(), true)), or even: time() . md5(uniqid(rand(), tr

Re: [PHP] Pulling unique data from database

2004-02-01 Thread Adam Bregenzer
se array_unique (http://www.php.net/array_unique) to remove the dupes. -- Adam Bregenzer [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Regular expression help?

2004-02-02 Thread Adam Bregenzer
racters 0-9a-fA-F > each block of 2 characters is followed by a : and repreated in 6 > blocks. That's a long expression, try: !preg_match('/^([0-9a-f]{2}($|:)){6}/i', $_POST['mac']); This pattern finds 6 matches of a number or letter (the /i means case-insensitive) foll

[PHP] Retrieving class names in a static method

2004-02-02 Thread Adam Bregenzer
se class that is inherited and used in a static method. TIA, Adam -- Adam Bregenzer [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Session (maybe cookies)

2004-02-03 Thread Adam Bregenzer
ion call needs to be at the top of the page, before you send any html to the browser. -- Adam Bregenzer [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problem setting include_path for virtual servers

2004-02-03 Thread Adam Bregenzer
les are under? Try setting: AllowOverride All for those directories in you apache config file. See the following for more information: Apache 2.x: http://httpd.apache.org/docs-2.0/mod/core.html#allowoverride Apache 1.x: http://httpd.apache.org/docs/mod/core.html#allowoverride -- Adam Bregenzer

Re: [PHP] Sessions vs. MySQL records?

2004-02-03 Thread Adam Bregenzer
aining 50 accounts on your site, and having to log-out and back in every 5 searches may be enough to convince them to pay you instead. Good Luck, Adam P.S. Should you find a 'magic' bullet to the web authentication problem please let all of us know! -- Adam Bregenzer [EMAIL

[PHP] authentication comparing to /etc/passwd

2004-02-03 Thread Adam Williams
Hi, is there a PHP function or some sort of way to have a user enter their username and password in a form, and compare the username and password and see if the username exists and the password is correct? basically I want to have a page where a person enters their username and password and if

Re: [PHP] Need to refine this:

2004-02-03 Thread Adam Bregenzer
as well as echo your district header, afterwords things will continue as expected. If you do not want to print out the district info the first time the loop runs then you can set $mydata outside the loop, initialize the flag variable, then use a do..while[1] loop to process the rest of your data.

Re: [PHP] Is there a PHP Style Sheet Switcher that doesn't reload

2004-02-04 Thread Adam Bregenzer
rowsers. Once the browser receives the content PHP is out of the picture until the next reload. You have to use javascript or some other client side language to change anything on a page once it is loaded in the browser. The referred to post describes this in detail. -- Adam Bregen

Re: [PHP] Backslashing the [ and ] in a regex

2004-02-04 Thread Adam Bregenzer
ring. I > tried just adding the [ and ] characters to the line above between the > <> and () characters, but that didn't work along with several other > iterations of attempts to get it to work. > > Does anyone have any ideas? I am stuck. Try adding \\[\\] -- Adam

Re: [PHP] Extract of a Paragraph

2004-02-04 Thread Adam Bregenzer
y(); preg_match('/^(\W*\w+){50}/', $paragraph, $extract); $extract = array_shift($extract); -- Adam Bregenzer [EMAIL PROTECTED] http://adam.bregenzer.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Backslashing the [ and ] in a regex

2004-02-04 Thread Adam Bregenzer
On Wed, 2004-02-04 at 16:35, Sam Masiello wrote: > Thank you for the reply, Adam, but unfortunately it didn't work. Sorry bout that. Here's another shot at it. If I understand your goal correctly you want to escape the existing backslashes that proceed certain special characters (n

Re: [PHP] Recommendation on PHP encoder please

2004-02-05 Thread Adam Bregenzer
server? SSL won't stop him/her and usernames and passwords will most likely be available if you use web based authentication. Your best method would be to require the password be typed every time a page is viewed, which has its own set of problems. Hopefully this gives you something

Re: [PHP] PHP5: __call() implementation

2004-02-05 Thread Adam Bregenzer
ot;SomeClass::$method([arguments])" method... > further, i think i'm getting problems with objects passed through the > __call() method?! You probably want to check out this for working with __call: http://www.php.net/overload And this for not having to use eval: http://www.php.net

[PHP] authentication using /etc/passwd

2004-02-05 Thread Adam Williams
Hi, is there a way to authenticate a username/password someone enters in a form with what is in /etc/passwd? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] php-general list question - [Fwd: Delivery Report (failure) for php-general@lists.php.net]

2004-02-05 Thread Adam Bregenzer
t; Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm > Precedence: bulk > list-help: <mailto:[EMAIL PROTECTED]> > list-unsubscribe: <mailto:[EMAIL PROTECTED]> > list-post: <mailto:[EMAIL PROTECTED]> > Delivered-To: mailing list [EMAIL PROTECTED] > Received: (qm

Re: [PHP] php-general list question - [Fwd: Delivery Report (failure) forphp-general@lists.php.net]

2004-02-05 Thread Adam Bregenzer
solution I'll update this thread. -- Adam Bregenzer [EMAIL PROTECTED] http://adam.bregenzer.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

<    7   8   9   10   11   12   13   14   15   >