[PHP] Need help with a regex

2003-09-21 Thread Adam Zey
I'm using the following regex: /([^<]*)<\/td>]*)>([^<]*)<\/span>([^<]*)<\/td><\/tr> ([^<]*)<\/td><\/tr>/ Everything works well, except I've ran into one problem. In the last text field, the bulk of the newsitem, sometimes the poster includes some HTML tags (Like "", but others could be inserted).

Re: [PHP] Need help with a regex

2003-09-21 Thread Adam Zey
ng. But it doesn't mean "maybe" in here. Now let's hope that your > post doesn't include .. > > Wouter > > Ps. I'm assuming you use perl compatible regexes (preg_*) and not POSIX > (ereg_*), don't know if this works for POSIX as well > > -

[PHP] Re: uncompressing gz string

2003-10-24 Thread Adam Zey
I've had the exact same problem. I get .html.gz files uploaded to me. My script does a file_get_contents on those, and then tried to use gzinflate or gzuncompress. Neither works. Instead I use a shell command to use the 'gzip' program to do the decompression. This is a big bug that's been around a

Re: [PHP] Is it worth $49? - codeSECURE 1.0 released - - Protecting PHP code

2003-10-24 Thread Adam Zey
I'm sorry to say I must agree with the parent post. There are too many free programs out there to charge 50$ for a program that does the same thing. The free programs might even do more than your 50$ product. mmcache's primary function is to cache compiled opcodes to speed up code execution. It's

Re: [PHP] mail() returns false but e-mail is sent ?

2006-06-26 Thread Adam Zey
Leonidas Safran wrote: Hello, Show us the full context of the code. The example you give us will work fine but that doesn't tell us what's really going on in your code. Here is the function I use to allow french special characters in the subject line (copied from german university tutorial

[PHP] Re: Strip outgoing whitespace in html

2006-06-26 Thread Adam Zey
day. Definitely worth the enormous bandwidth savings! Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP 5, Windows, and MySQL

2006-06-26 Thread Adam Zey
oblem, have you checked the PHP docs on how to install MySQL support for PHP5 on Windows? http://www.php.net/manual/en/ref.mysql.php Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: If statement question

2006-06-26 Thread Adam Zey
es. Alex. Stuff inside an if statement will be compiled (So it has to be free of syntax errors and such), but it won't be executed unless the condition is true. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: A variable inside a variable?

2006-06-26 Thread Adam Zey
Alex Major wrote: Thanks for your help with my other question, heres a new one for you. I need to nest a variable, inside another variable. For example: $($buildingname)level How (if at all) is this possible? Thanks. Alex. Why? What are you doing that requires that that cannot be done with

Re: [PHP] Preventing double-clicks APPEARS TO WORK FINE

2006-06-26 Thread Adam Zey
John Meyer wrote: Jay Blanchard wrote: [snip] I am going to do some thinking (typing) out loud here because I need to come up with a solution to double-clicking on a form button issue. [/snip] Isn't there a javascript method that you could use to accomplish the same thing? Either that, or o

[PHP] Re: modify xml before parse

2006-06-27 Thread Adam Zey
uot;;); I mean, that is what you asked, how to read the xml file... Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Calculations

2006-06-27 Thread Adam Zey
recognise ^ meaning 'to the power of'. Regards, Alex. ... The manual is your friend. Seriously, don't come here looking for all the answers before you checked the manual. I searched for "power", and the first result was the function you want. RTFM. Regards,

Re: [PHP] Calculations

2006-06-27 Thread Adam Zey
tedd wrote: At 2:30 PM -0400 6/27/06, Kristen G. Thorson wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 27, 2006 2:11 PM To: php-general@lists.php.net Subject: Re: [PHP] Calculations When my level of free time matches my level of curiou

[PHP] Re: modify xml before parse

2006-06-28 Thread Adam Zey
eg_replace('/[^(\\/HardwareVersion)]<\\/HardwareVersion>/', '<\/HardwareVersion>', $xml); fwrite(fopen($xmlfile, 'wb'), $xml); Thanks - weetat Adam Zey wrote: weetat wrote: Hi all, I need to read xml file before it was parsed by PHP DOM functions. T

Re: [PHP] serve long duration pages

2006-06-28 Thread Adam Zey
Jochem Maas wrote: John Gunther wrote: This may be more appropriate for an Apache or browser forum. Perhaps you can suggest an appropriate one. I have a PHP script that takes a long time to complete (due to very heavy database activity) although it echoes unbuffered output every few seconds. I'

Re: [PHP] serve long duration pages

2006-06-28 Thread Adam Zey
John Gunther wrote: You're right , my task is really not a web function except for the need to trigger it from an admin page. I'm going to use the PHP command line interface to run it without web interaction. However, there are still situations where a web script may sometimes involve long run

[PHP] Re: modify xml before parse

2006-06-29 Thread Adam Zey
Yeo Wee Tat wrote: Hi Adam, I can modify the xml file without any error , however when I tried to unserializer the xml file using PEAR:XML , it gave the error message below. I have attached my code for your perusal. Any ideas ? thanks /", "", $xml); $filehandle = fopen($xmlfile, 'wb'); $o

[PHP] Re: creating a threaded message system--sorting messages

2006-06-29 Thread Adam Zey
Ben Liu wrote: This question might deviate from PHP into the domain of MySQL but I thought best to post here first. I'm building a message board system with PHP/MySQL. I'm trying to present the messages to the users in threaded order rather than flat. I'm having a lot of trouble figuring out how

[PHP] Re: Update site through email

2006-06-29 Thread Adam Zey
r, it's an opensource app maintained by people at my workplace. Still, it's probably the fastest POP3 mail fetcher out there. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: creating a threaded message system--sorting messages

2006-06-29 Thread Adam Zey
Ben Liu wrote: , almost. I read the article suggested by K.Bear and found the recommended solution to be a bit more complicated than I wanted to implement. I then found another way to do this using the existing "Adjacency List Model" through a recursive function. So basically, you query the datab

[PHP] Re: Find out cookies on a computer?

2006-06-29 Thread Adam Zey
Peter Lauri wrote: Is it possible to some how find out all cookies on a specific computer and their name and value? I assume not :) /Peter No, because you don't OWN them, therefore you have no right (either technologically or ethically) to see them. Asking such unethical questions on th

Re: [PHP] Re: creating a threaded message system--sorting messages

2006-06-30 Thread Adam Zey
Dan McCullough wrote: I've come into this discussion pretty late so please bear with me if I go over something that has been ruled out. You are trying to print out in a threaded method the first post in a thread followed by each post after that, that is a child/reply to that post. Is that corre

Re: [PHP] Re: creating a threaded message system--sorting messages

2006-06-30 Thread Adam Zey
Ben Liu wrote: Thanks to everybody who posted on this thread. I wanted to post back the solution I came up with after removing the DB query from the recursion. In case anyone else is trying to accomplish the same thing, this is how I solved it (criticisms welcome, and note that I have not tested

Re: [PHP] Re: creating a threaded message system--sorting messages

2006-06-30 Thread Adam Zey
Ben Liu wrote: The second thing to do is to make the foreach work on references instead of copies. I actually think that since what we have in our function is now a reference, the foreach WILL NOT copy it. Anyone have any ideas on this? Is the foreach loop in fact copying $workArr? And how co

Re: [PHP] Update or add?

2006-06-30 Thread Adam Zey
Paul Nowosielski wrote: On Friday 30 June 2006 14:37, Brian Dunning wrote: I have a table where I want to update each record with today's date as it's hit, or add the record if it's not in there: +--+-++ | id | creation_date | last_hit | +--+-

Re: [PHP] Chnage Management in PHP aka version control?

2006-07-05 Thread Adam Zey
[EMAIL PROTECTED] wrote: By 'change management' do you mean something like version control software? CVS, Subversion, etc? We use CVS at work and tried setting up Subversion at one point. I don't know, maybe we're all a bunch of retarded monkies here or maybe both systems are just overly c

Re: [PHP] GD to database directly

2006-07-11 Thread Adam Zey
Eric Butera wrote: On 7/11/06, Kevin Waterson <[EMAIL PROTECTED]> wrote: How much of a performance hit? Kevin -- "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." -- PHP General Mailing List (http://www.php.net/) To unsu

[PHP] Re: regular expression to extract from the middle of a string

2006-07-14 Thread Adam Zey
Steve Turnbull wrote: Hey folks I don't want to "just get you to do the work", but I have so far tried in vain to achieve something... I have a string similar to the following; cn=emailadmin,ou=services,dc=domain,dc=net I want to extract whatever falls between the 'cn=' and the following comm

Re: [PHP] Recurs Directory Delete

2006-07-14 Thread Adam Zey
So? Windows has this thing called the "del" command that does the same thing as "rm". Regards, Adam. Mark Steudel wrote: I wish, I'm on an IIS box. Mark -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Friday, July 14, 2006 2:09 PM To: tedd Cc: Mark Steudel; p

Re: Fwd: [PHP] Recurs Directory Delete

2006-07-14 Thread Adam Zey
in older versions of DOS). You still have to manually (or programmatically) iterate through the directory structure and run 'del *.*' and then 'rd directory' in every single subdirectory to achieve the same result that the single command 'rm -rf' gives you on UNIX-like s

[PHP] Re: headers and newline at end of script

2006-07-20 Thread Adam Zey
Martin Marques wrote: > Now, my question is: Is it a bad practice to "NOT" close the script with the PHP closing "?>"? I mean, just leave the script without a closing PHP simbols, as this scripts are included? Yes. Regards, Adam. -- PHP General Mailing List (http://www.php.net/) To unsubscr

Re: [PHP] Re: headers and newline at end of script

2006-07-20 Thread Adam Zey
Jochem Maas wrote: Robert Cummings wrote: On Thu, 2006-07-20 at 14:15, Martin Marques wrote: On Thu, 20 Jul 2006 13:06:10 -0400, Robert Cummings <[EMAIL PROTECTED]> wrote: On Thu, 2006-07-20 at 12:12, Adam Zey wrote: Martin Marques wrote: > Now, my questi

Re: [PHP] Re: headers and newline at end of script

2006-07-20 Thread Adam Zey
Martin Marques wrote: On Thu, 20 Jul 2006, Adam Zey wrote: Jochem Maas wrote: Robert Cummings wrote: I don't understand - the links point to posts by Rasmus saying that's 'beneficial' - seems to me to be a fairly robust endorsement yet you consider leaving off trailing

[PHP] Re: Bug in == comparison?

2006-07-21 Thread Adam Zey
ompared as integers. These rules also apply to the switch statement." In your case, it's a bug in your code; you should be using === to also verify type, or casting $var1 to a string in your comparison. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Bug in == comparison?

2006-07-21 Thread Adam Zey
I tried comparing in the reverse sequence ($test2==$test) and the same occurred. It does work as expected if I have === but the rest of the scirpt isn't type sensitive so I want NULL, 0, and empty string to still maintain equality. Wups, I missed the last part there. You want the empty() fu

[PHP] Re: Bug in == comparison?

2006-07-21 Thread Adam Zey
. [EMAIL PROTECTED] email 519.745.7374 x103 office 519.897.2552 mobile ~~ Get Mozilla Firefox at http://spreadfirefox.com On 21-Jul-06, at 12:45 PM, Adam Zey wrote: Jeffrey Sambells wrote: OK I have a very strange bug: In the middle of my script I have these two

Re: [PHP] Cleaning bad characters from var

2006-07-21 Thread Adam Zey
tion replaceChars($string) { $find_array = array("a", "b", "c"); $replace_array = array("apple", "banana", "carambola"); return str_replace($find_array, $replace_array, $string); } You can, of course, throw other string

[PHP] Re: Comparing Strings

2006-07-24 Thread Adam Zey
27;s interpreting something as a number somewhere. Did you try using === instead of == for your comparisons? Regards, Adam Zey. PS: Why is your license key so insanely long, and why doesn't it use alphanumeric characters to reduce the length? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Stripping weird characters again...

2006-07-24 Thread Adam Zey
ge this from my feed? Thank you, Paul Nowosielski Webmaster You want str_replace with arrays as parameters. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: SQL Result Set -> HTML Table Fragment (but Simple)

2006-07-24 Thread Adam Zey
Essentially what it does is, loop over each row, and if we're the first row, write out the headers, and for all rows, write out each field. I haven't tested this, just typed it up from memory now, so I'm not sure if it'll compile. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: SQL Result Set -> HTML Table Fragment (but Simple)

2006-07-24 Thread Adam Zey
Adam Zey wrote: Michael B Allen wrote: Anyone have a PHP fragment that just prints a very simple html table from the contents of a db result set? I don't want phpmyadmin or anything remotely that complex. I want something that simply extracts the header info and prints a basic HTML tabl

Re: [PHP] Return Values Copied? Copied if By Reference?

2006-07-27 Thread Adam Zey
Robert Cummings wrote: On Thu, 2006-07-27 at 01:35, Larry Garfield wrote: On Wednesday 26 July 2006 21:41, Robert Cummings wrote: I'm working on some code that would be called to generate a cell in a possibly large table and therefore a small difference in performance may have a significant im

Re: [PHP] Return Values Copied? Copied if By Reference?

2006-07-27 Thread Adam Zey
deciding when to copy. Sometimes it's a good idea to use a reference to stop the copy if memory is a concern. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: memory leak - how to find it?

2006-08-01 Thread Adam Zey
Robin Getz wrote: I am trying to debug a php script that I downloaded, which has a memory leak in it. I was looking for a way to find what variables were in php's memory, and what size, they were, but I couldn't find anything? The script is a off-line wiki conversion tool (walks through a wi

[PHP] Re: non blocking fsockopen

2006-08-01 Thread Adam Zey
socket plugins for PHP4, which should allow similar flexibility to stream_socket_client()? The downside is you'll need the socket module enabled/compiled. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP Frameworks - Opinion

2006-08-01 Thread Adam Zey
Steve Turnbull wrote: On Tue, 2006-08-01 at 12:35 -0400, Gabe wrote: What's the common consensus as to a solid PHP framework to use for application development? There seems to be a number of them out there, but I'm not sure which one's are the most robust, actively developed, secure, etc etc.

[PHP] Re: date(n/Y) strtotime

2006-08-02 Thread Adam Zey
easier to read. All these examples assume that your date is in a fixed format, namely mm/. However, the last three should properly handle 09/2006, because they won't add a second zero to that. So that should work either way. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] date(n/Y) strtotime

2006-08-02 Thread Adam Zey
expDate2str('1/2009'); expDate2str( date( "n/Y")); ?> Which when I run it (in PHP 4 though) prints out this: Invalid, blowing up date In: 1/2009 Out: 2009-01-01 Invalid, blowing up date In: 8/2006 Out: 2006-08-01 For the heck of it, here's a more production-oriented version of the function/test script: return date("Y-m-d", strtotime(str_replace("/", "/01/", strlen($date) == 6 ? "0$date" : $date))); else return date("Y-m-d", $date); } echo expDate2str('1/2009'); echo ""; echo expDate2str( date( "n/Y")); ?> Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] date(n/Y) strtotime

2006-08-02 Thread Adam Zey
ent out my second email before I had read yours. I'll give yours a go, thanks again. Mark -Original Message----- From: Adam Zey [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 02, 2006 11:15 AM To: Mark Steudel Cc: PHP Mailing Lists Subject: Re: [PHP] date(n/Y) strtotime Mark Steudel wr

Re: [PHP] POST on redirects?

2006-08-03 Thread Adam Zey
uot; . strlen($message) . "\r\n"; $headers .= "\r\n"; return $headers . $message; } As far as I can tell, these are the absolute minimum set of headers you can get away with for a POST transaction (If you know how to use less, let me know, I use this in a situ

Re: [PHP] convert byte to MB

2006-08-03 Thread Adam Zey
Porpoise wrote: "Austin Denyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] What's with the blank messages?? His message wasn't blank, he sent this: Andrei wrote: > > So what u'r trying to say is that we should use KiB and not KB for > > kilobytes? That's funny!

[PHP] Re: Regular Expresson for checking password strength

2006-08-04 Thread Adam Zey
in the if. I'm not certain how fast strlen is, but it's usually a bad idea to repeat useless function calls like that. 2) Isn't your second function call supposed to be preg_match, and not pre_match? Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: The difference between ereg and preg?

2006-08-04 Thread Adam Zey
Dave M G wrote: PHP List, Recently I wrote a piece of code to scrape data from an HTML page. Part of that code deleted all the unwanted text from the very top of the page, where it says "of a "" tag. That code looks like this: ereg_replace("", "", $htmlPage); It works fine. But I noticed th

Re: [PHP] php behind firewall

2006-08-04 Thread Adam Zey
ortable with. Also while your DNA comment was meant to be humorous, it's not a bad idea to build a "trust-index" via user actions that would be similar to a DNA-like reasoning solution. Just food for thought. tedd Either account-based authentication, or a unique ID stored in a

Re: [PHP] POST on redirects?

2006-08-07 Thread Adam Zey
Chris Shiflett wrote: Adam Zey wrote: $headers .= "Content-Type: application/octet-stream\r\n"; I missed the context of this function, but it seems like you probably mean to send: Content-Type: application/x-www-form-urlencoded Chris The context is a bit strange,

[PHP] Re: Declaring variables from the url

2006-08-07 Thread Adam Zey
Dave M G wrote: PHP list, I have many times set the value of a variable by declaring it in the URL, like so: http://www.domain.com/index.php?var=1 And then, to use the variable, all I have to do is use it in the script, like so: echo "This is the value of the variable: " . $var; But, for

[PHP] Re: php/ajax..

2006-08-07 Thread Adam Zey
. Such things need to be done on the client side, at which point they're usually called AJAX. PHP can be used for the server-side of an AJAX application. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Regular expression to find from start of string to first space

2006-08-08 Thread Adam Zey
Dave M G wrote: PHP, Shouldn't this regular expression select everything from the start of the string to the first space character: $firstWord = preg_match('#^*(.*) #iU', $word); It doesn't, so clearly I'm wrong, but here's why I thought it would: The enclosing has marks, "#", I *think* jus

[PHP] Re: Multiple Includes vs. One Long Include (Functions)

2006-08-08 Thread Adam Zey
hing cached in memory anyhow, so if you're using an opcode cache that wouldn't matter either. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Strip non-alphanumerics from beginning and end?

2006-08-08 Thread Adam Zey
In that case you may find Regex Coach (http://weitz.de/regex-coach/) handy. It essentially does the match in real-time as you watch, and shows you exactly what each part of the regex is matching. Essentially, you paste the text to search through in the bottom pane, and start typing the regex i

Re: [PHP] List Meeting NNOT

2006-08-10 Thread Adam Zey
till a bit of a drive when you live in Montreal and don't have a car. About an 18 hour drive, plus a few hours for bus stops and border crossings. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Including Google Ads

2006-08-10 Thread Adam Zey
variables) is against the AdSense terms of service, and is a good way to get your account revoked really fast. Only premium publishers that get express permission from Google are allowed to mess with those variables. It's possible that your company is a premium AdSense customer, but Mr. Ant

Re: [PHP] Creating custom superglobals

2006-08-14 Thread Adam Zey
Robert Cummings wrote: Which will make your application incompatible with any distribution where runkit is not enabled :/ Which kinda sucks, I wish more stuff was part of the core. Cheers, Rob. I agree, this module looks very powerful. The ability to write wrappers around internal functions

[PHP] Re: system, exec, shell_exec, passthru

2006-08-14 Thread Adam Zey
x, (unlike DOS), you CANNOT execute applications in the same directory without a path. Even if the program is in the same directory as your present working directory (which is usually where the PHP script is located), you'd have to do "./myprog" as a relative path. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Why does count() make copies of arrays?

2006-08-14 Thread Adam Zey
() on it, which should NOT be modifying the array? Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: system, exec, shell_exec, passthru

2006-08-14 Thread Adam Zey
fe_mode_exec_dir". If safe mode is on, you'll need to put your program ("webpasswd") into that directory to execute it. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Include and require

2006-08-14 Thread Adam Zey
with setting information. Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Why does count() make copies of arrays?

2006-08-14 Thread Adam Zey
Robert Cummings wrote: On Mon, 2006-08-14 at 13:16 -0400, Adam Zey wrote: I was writing a shell script in PHP (4.4.2) that dealt with a rather large array. To figure out what I needed the new memory limit to be, I did a memory_get_usage() at the end of my script, and came up with about 5.5MB

[PHP] Re: Include and require

2006-08-14 Thread Adam Zey
as NULL. When I wrapped it like this: function getmonths() { $months = array(1 => 'January', 2 => 'February', 3 => 'March', 4 => 'April', 5 => 'May', 6=> 'June', 7 => 'July',

Re: [PHP] Why does count() make copies of arrays?

2006-08-14 Thread Adam Zey
Robert Cummings wrote: On Mon, 2006-08-14 at 17:24 -0400, Adam Zey wrote: Robert Cummings wrote: On Mon, 2006-08-14 at 13:16 -0400, Adam Zey wrote: I was writing a shell script in PHP (4.4.2) that dealt with a rather large array. To figure out what I needed the new memory limit to be, I did

[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
Bruce Bailey wrote: Hi In order to improve performance for a socket-based PHP 5 object, I would like to persist an object beyond the end of a script. Is there any way to make this work? Will PHP 5 automatically destroy the object sometime after the script ends? Thanks in Advance, Bruce

[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
Richard Lynch wrote: On Thu, August 17, 2006 9:02 am, João Cândido de Souza Neto wrote: I´m not sure if it´s the right place to get such answer, but if someone know, please, help me. In a select id,name,picture1,picture2,picture3 from product where id="10" i get an array with each colum in each

[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
It seems there's no way to do this. You can unset certain things in simpleXML objects, but it's really strange non-standard behaviour. If I have this for an XML document: foo bar baz XML; and I run that through simplexml into $xml, then doing unset($xml->test) and then exporting agai

[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

  1   2   >