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] 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: 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: 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] 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: 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

[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

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: 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] 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: 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 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
with setting information. 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] 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
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

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

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] 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] 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

[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

[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: 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: 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

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,

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

[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

[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

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!

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] 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] 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

[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] 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: 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

[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

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

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

[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

[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: 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: 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

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: 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

[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
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

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

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

[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: 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

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

[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] 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

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] 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] 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] 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
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

[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

[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: 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: 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: 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

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

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'

[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] 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: 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,

[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

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: 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

[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: 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: 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

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: rss feeds from db

2006-06-22 Thread Adam Zey
Dan McCullough wrote: I'm having some problems where some undefined entity are getting in, these entities are usually html entities. sad thing is"¦bringing in these large chains is putting the xml doc points to the & in ";¦" as the problem. what do I need to do to get this stuff cleaned up?

Re: [PHP] Equivelant to mysql_fetch_row for normal array

2006-06-22 Thread Adam Zey
Dave M G wrote: Jochem, Tul, Nicolas, Thank you for your help. I must be doing something wrong with how my array is generated. It's actually just a MySQL result, but because it is returned from a function, it does not seem to behave as I would expect a MySQL result should. I'm trying the f

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

2006-06-21 Thread Adam Zey
[EMAIL PROTECTED] wrote: Content Filter @ AIT Batam has detect violation of the PROFANITY rule, and Quarantine entire message has been taken on 21-Jun-2006 22:49:25. Message details: Server:BTMAIL Sender: [EMAIL PROTECTED]; Recipient:[EMAIL PROTECTED];php-general@lists.php.net; Subject:Re: [PHP

[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

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

Re: [PHP] For Loop

2006-06-20 Thread Adam Zey
Ray Hauge wrote: On Tuesday 20 June 2006 15:14, Albert Padley wrote: I have a regular for loop - for($i=1; $i<100; $i++) Within the loop I need to create variables named: $p1name; $p2name; $p3name; etc. The integer portion of each variable name needs to be the value of $i. I can't seem to ge

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

2006-06-20 Thread Adam Zey
, Adam Ben Liu wrote: Thanks Adam, What you say makes good sense to me. Is there some method to run a script that kills all active sessions on a host? It could become part of the maintenance script I suppose: 1) Kill all active sessions 2) Put up generic maintenance screen 3) Deny further login at

[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 (

Re: [PHP] Paging Help

2006-06-20 Thread Adam Zey
Andrei wrote: Since you query all enregs from table why not query all first and the do mysql_data_seek on result? // Query to show $query_rsData = "SELECT * FROM {table} ORDER BY {Whatever field}"; $rsData = mysql_query($query_rsData, $DB_CONECTION); $num_total_records = mysql_num_rows(

[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

[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: Replacing text with criteria

2006-06-15 Thread Adam Zey
Jeff Lewis wrote: I have been working on a script to parse a CSV file and in the process I clean out a lot of the garbage not needed but I am a bit stumped on one aspect of this file. It's a list of over 3000 contacts and I'm trying to mask a lot of the information with *. So as I loop through

[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: 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: 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: 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

Re: [PHP] server sending notifications to clients

2006-06-08 Thread Adam Zey
script from within itself? Regards KM On 6/8/06, Adam Zey <[EMAIL PROTECTED]> wrote: Barry wrote: > Angelo Zanetti schrieb: >> kartikay malhotra wrote: >>> Hi All, >>> >>> Is there a way for the server to notify the client about an event, >>> pr

Re: [PHP] server sending notifications to clients

2006-06-08 Thread Adam Zey
Barry wrote: Angelo Zanetti schrieb: kartikay malhotra wrote: Hi All, Is there a way for the server to notify the client about an event, provided the client was online in the past X minutes? To elaborate: A client comes online. A script PHP executes (serves the client), and terminates. Now

[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

[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

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

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] 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] 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

[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

  1   2   >