Re: [PHP] Re: trying to figure out the best/efficient way to tell whois loggedinto a site..

2005-09-14 Thread Edward Vermillion
Dan Baker wrote: Ben [EMAIL PROTECTED] wrote in message [snip] Interesting, but I think I wouldn't spend the extra code to detect if I was expecting a POST, but got a GET. If I didn't get the value from POST, I'd just assume it wasn't there -- I wouldn't go looking elsewhere for it, and

Re: [PHP] php/mysql object id question..

2005-09-14 Thread Edward Vermillion
bruce wrote: stephen, you're correct regarding what's going on... i had taken some code used in phpBB, and blindly slammed it into my app to test out their db class... i had assumed that it worked guess what!!! in their constructor, they have the 'return false' arrggghh!!! a quick look at

Re: [PHP] Assign values in foreach-loop

2005-09-07 Thread Edward Vermillion
Sabine wrote: Hello to all, is it possible to assign values to the array for which I do the foreach-loop? foreach ($_SESSION['arr1'] as $arr1) { foreach ($_SESSION['arr2'] as $arr2) { if ($arr1['id'] == $arr2['id']) { $arr1['selected'] = true; } } } I think

Re: [PHP] Assign values in foreach-loop

2005-09-07 Thread Edward Vermillion
Jordan Miller wrote: Hello, You simply need the $key variable, then you can set a new value for $arr[$key] for each array element: ?php $arr = array(1, 2, 3, 4); foreach ($arr as $key = $value) { $arr[$key] = $value * 2; } // $arr is now array(2, 4, 6, 8) ? http://www.php.net/foreach If

Re: [PHP] online/offline...but on a list of users

2005-09-05 Thread Edward Vermillion
Ryan A wrote: clip I want to add this same functionality to a forum on the same site (the forum was custom programmed from scratch and not any of the popular ones), but since in a single thread there can be a lot of different people/usernames that answer I would prefer _not_ to do a

Re: [PHP] online/offline...but on a list of users

2005-09-04 Thread Edward Vermillion
Ryan A wrote: Hi, I have a profiles page where next to the username I have a icon that says Online or Offline if the persons whose profile you are browsing signed in or clicked anything in the last 3 minutes (I am also using a meta refresh to call a script every 2 1/2 mins) this is how i am

Re: [PHP] Generating images on the fly, linking via symlink?

2005-09-03 Thread Edward Vermillion
Dan Trainor wrote: Dan Trainor wrote: Hello, all - This is a question that could depend on a completely different (yet, relayed) subject, so I'm sending this email to both php-general@ and [EMAIL PROTECTED] I thank you in advance for your understanding. I am currently generating some

Re: [PHP] Newbie: Safe function call to a .inc file outside the web folder

2005-08-26 Thread Edward Vermillion
Chris Shiflett wrote: Because $_SERVER['SERVER_NAME'] can be manipulated by the user in some cases, you must consider $temp tainted at this point. I was under the the impression that the non-'HTTP_*' keys in the $_SERVER array came from the server itself. Obvoiusly I'm wrong, but I'm

Re: [PHP] Newbie: Safe function call to a .inc file outside the web folder

2005-08-26 Thread Edward Vermillion
Richard Lynch wrote: Disclaimer: I really have no idea how it could harm you, but if Chris Shifflett warns against it, don't do it. :-) That was the assumption I was running under, which is why I was very curious about it. ;) Thanks for the explanation. I'm still not 100% on how a

Re: [PHP] foreach loop changed after 4.3 - 4.4 upgrade

2005-08-23 Thread Edward Vermillion
Larry Brown wrote: I found that the only way to get the function to behave is to add the key... foreach($multiarray as $key=$subArray) Now it displays as it previously did where $subArray is concerned. Is there something I'm missing here? Was I the only person not using keys? [snip]

Re: [PHP] how to clear cache content in IE using php

2005-08-18 Thread Edward Vermillion
John Nichel wrote: 2005/8/18, Jay Blanchard [EMAIL PROTECTED]: [snip] how to clear the contents of cache in Internet explorer using php.If any one finds the solution do reply. [/snip] You cannot do this with PHP as PHP is server-side and you would need a client-side doohickey to clear the

Re: [PHP] Be careful! Look at what this spammer did.

2005-08-17 Thread Edward Vermillion
Greg Schnippel wrote: I'll reply soon off list, as I don't think it appropriate to give potential spammers an archive full of new tricks. I don't know -- I think its always better to discuss this in the open if there is a real security risk that people should be aware of. I tend to agree

Re: [PHP] Be careful! Look at what this spammer did.

2005-08-17 Thread Edward Vermillion
I believe that sendmail would send the two emails. How could it know that the headers are not part of a new message? I haven't tested it yet, but to be on the safe side I put up some filters that chech for certain content in the form. If the content is there, then nothing gets sent to mail().

Re: [PHP] parallel execution of php code?

2005-08-08 Thread Edward Vermillion
Martin van den Berg wrote: I have this piece of php-code which inserts data into a database. Before inserting it must verify if the data is unique. The php code looks something like: $query = SELECT id FROM mytable WHERE bla LIKE . $x .; $rows = execute( $query ) if ( $rows == 0 ) { /* some

Re: [PHP] Regular expressions book

2005-08-03 Thread Edward Vermillion
Stefan Lemmen wrote: Hi, I've want to dig a bit deeper into regular expressions for php. I wonder if anyone can help me choosing between 2 books I'm considering buying: 1. Open Source Regular Expression Recipes - Nathan A Good 2. Mastering Regular Expressions - Jeffrey Freidl If your

Re: [PHP] Help with a Parse Error

2005-08-01 Thread Edward Vermillion
selected I kmow this will disappear when I turn off error reporting, but how can I suppress it properly? On 31/07/05, Edward Vermillion [EMAIL PROTECTED] wrote: Tom Chubb wrote: I am trying to create my own news system and to start with I'm using static news pages until I get the db working

Re: [PHP] Limit emails from servers recommend a control panel (most prolly 0T)

2005-08-01 Thread Edward Vermillion
Ryan A wrote: Hey, 'prolly' is not a member of the english language. and yes it's completely off topic but you knew that... Yep, I prolly did :-) Should have taken out the most prolly and just had OT, my apoligies. Cheers, Ryan P.S Join me in my campaign to get PROLLY as a member of the

Re: [PHP] array()

2005-08-01 Thread Edward Vermillion
Sebastian wrote: is it always necessary to call array() when you do something like this: mysql_query(SELECT ); while($rows .) { $data[] = $rows; } if so, why? i have a habit of never calling array() and someone told me i shouldn't do this. If that's your first use of $data then

Re: [PHP] Help with a Parse Error

2005-07-31 Thread Edward Vermillion
Tom Chubb wrote: I am trying to create my own news system and to start with I'm using static news pages until I get the db working properly. I'm using the following code: ?php if(!isset($_GET['id'])) { $article=$id.php if (file_exists($article)) { include $article; } else { echo The

Re: [PHP] input type=file problem (Maybe 0T)

2005-07-30 Thread Edward Vermillion
Ryan A wrote: Hey, Heres what I am doing, I have a form where a user can enter values and in the form I have a FILE box so the user can upload her pic, if she screws up anywhere (eg: putting an alphabet in her date of birth) I send her back to the form and her date of birth gets highlighted

Re: [PHP] define (true/false)

2005-07-28 Thread Edward Vermillion
John Nichel wrote: Jay Blanchard wrote: [snip] never want to use a variable to determine a constant because the variable is not likely to be the same (that is why we call them variables) on any iteration. Using constants in expressions is OK, for instance if(BAR == $foo){ ...stuff... }

Re: [PHP] Is there a way to get a variable name as a string?

2005-07-22 Thread Edward Vermillion
Richard Lynch wrote: [snip] PS It's true that your variable could/would/should appear in debug_backtrace, but how would you pick it out from all the other variables that would appear in your debug_backtrace? For that matter, it's in $_GLOBALS, but how would you pick it out? You could print

Re: [PHP] how to post a question?

2005-07-22 Thread Edward Vermillion
Chirantan Ghosh wrote: Hi Alan Everybody who wasted time to read my 1st Letter, SORRY guys, I do deserve the scorn but it was genuine mistake I didn't want to post garbage bugging other people. I was under the impression that I was mailing to the HELP DESK( nonliving resp system). If you

Re: [PHP] how to post a question?

2005-07-22 Thread Edward Vermillion
Chirantan Ghosh wrote: Hi Edward, I would simply like to print the remote Menu page( http://www.dtcc.com/ThoughtLeadership/menu.htm ) in a new page. I did the Error report print because I had no idea for what reason my PHP code was working. The menu is used as a header as well(the root

Re: [PHP] how to post a question?

2005-07-22 Thread Edward Vermillion
Chirantan Ghosh wrote: Hello Edward, I did try your approach in this page http://www.homecare1.biz/public_html/PHPsiteTest01.html with no avail. How would I find out if I have fopen wrappers enabled? This page is remote hosted ( Hosted by Godaddy.com who state I have PHP/MySQL enabled).

Re: [PHP] Date Handling Recommendations

2005-07-21 Thread Edward Vermillion
Jim Moseby wrote: Hi all, I need to manage some records with dates. mmdd I'm putting select options breaking the three up in numeric pull [snip] For instance, what would you have to do to get the day of the week for a day 66 days prior to the stored date? If your date was stored in a

Re: [PHP] My Project

2005-07-20 Thread Edward Vermillion
Matt Darby wrote: It *is* a great book (I cut my teeth with it as well): PHP and MySQL Development (Welling and Thomson) http://www.amazon.com/exec/obidos/tg/detail/-/0672326728/qid=1121869940/sr=8-1/ref=pd_bbs_1/002-5827183-4477639?v=glances=booksn=507846 Read it, learn it, live it. Matt

Re: [PHP] Session has new id on 'some' pages.

2005-07-18 Thread Edward Vermillion
Andy Pieters wrote: Ok found the solution, seems like one page is on http://server.org.uk and the other on www.server.org.uk even though its the same server it generates a different session id! That's a cookie thing, if your transmitting the session ids through cookies, I'm going to assume

Re: [PHP] Re: Include path quirks

2005-07-18 Thread Edward Vermillion
Ethilien wrote: Actually, I think I might have found a solution, although its not a very good one. include realpath(dirname(__FILE__) . / . ../include/global.php); Ethilien wrote: I've been attempting to write an application with a bit more ordered directory structure than I normally use,

Re: [PHP] Is there a way to get a variable name as a string?

2005-07-18 Thread Edward Vermillion
Rasmus Lerdorf wrote: Daevid Vincent wrote: Is there a way to get the name of a variable as a string? For example... Nope, not possible. -Rasmus Wouldn't the name of the variable show up in a var_dump()? It would be messy, but if it's there... -- PHP General Mailing List

Re: [PHP] Is there a way to get a variable name as a string?

2005-07-18 Thread Edward Vermillion
Edward Vermillion wrote: Rasmus Lerdorf wrote: Daevid Vincent wrote: Is there a way to get the name of a variable as a string? For example... Nope, not possible. -Rasmus Wouldn't the name of the variable show up in a var_dump()? It would be messy, but if it's there... Actually I

Re: [PHP] Re: How to read PHP variables.

2005-07-15 Thread Edward Vermillion
Bruno B B Magalhães wrote: Hi everybody, well I don´t want to include and use those variables or set then. I want to read the file, parse the vars to a form, so the user can change the system configs using the web instead of FTP... I am thinking reading using a simple include, and then

Re: [PHP] not sure why form submission gives me error

2005-07-15 Thread Edward Vermillion
Bruce Gilbert wrote: Hello, I have a form on my site http://www.inspired-evolution.com/Contact.php produces this error on submission Parse error: parse error, unexpected T_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Thankyou.php on line 35 Well.. it says it's found a

Re: [PHP] Dynamic Images and File Permissions

2005-07-14 Thread Edward Vermillion
Adam Hubscher wrote: I have a script that generates, creates, and updates dynamic banner images for users of a service. Recently I have run into a problem with file permissions... that has thoroughly annoyed me. I found a solution to fix the problem, however, it was then hit with another

[PHP] Security, Late Nights and Overall Paranoia

2005-07-08 Thread Edward Vermillion
. Is there anything else that can be checked to verify the identity of a request/post? Is it really stupid to allow the templates to be edited through the web interface? TIA to all who read and reply. (TM) I love you guys(TM) Edward Vermillion [EMAIL PROTECTED] -- PHP General Mailing List (http

Re: [PHP] Re: Security, Late Nights and Overall Paranoia

2005-07-08 Thread Edward Vermillion
there, no cookies or info other than the html request/response of a 'normal' site. Edward Vermillion [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Security, Late Nights and Overall Paranoia

2005-07-08 Thread Edward Vermillion
prominent issue, which you could eliminate with BBcode or wiki language. Perhaps you are being a little paranoid? Or do I miss something? So yeah, I'm being paranoid but I'm also trying to cover as many bases as I can and yet still provide some decent functionality. Edward Vermillion [EMAIL

Re: [PHP] Re: Security, Late Nights and Overall Paranoia

2005-07-08 Thread Edward Vermillion
On Jul 8, 2005, at 12:31 PM, Edward Vermillion wrote: On Jul 8, 2005, at 12:02 PM, Ezra Nugroho wrote: I am just wondering, how could someone craft an html to steal cookies? If your cookie distribution is done right, I don't think you need to worry about this. That's what XSS is all

Re: [PHP] Re: Security, Late Nights and Overall Paranoia

2005-07-08 Thread Edward Vermillion
with the stolen cookie, and the checks you have will let him in. All the ip, user agent, etc. checks do is slow down a brute-force attack. They have to guess more than one correct value to get in. But that cookie that's the prize. Edward Vermillion [EMAIL PROTECTED] -- PHP General Mailing List

Re: [PHP] TimeStamp BEFORE 1970

2005-07-07 Thread Edward Vermillion
in the return, like why 1976?, why would you want to generate a positive number that will conflict with dates before 1970? but it could just be that I'm not thinking the math all the way through, and what you eventually want to do with the dates once you store them. Edward Vermillion [EMAIL PROTECTED

Re: [PHP] TimeStamp BEFORE 1970

2005-07-07 Thread Edward Vermillion
for it, of a forward slash instead of the parenthesis. ie preg_match('/[0-2][0-9][0-9][0-9]/', $input, $year); ^^ But in the end it's what works that counts, eh? ;) Edward Vermillion [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net

Re: [PHP] date() problem

2005-07-06 Thread Edward Vermillion
); $age = floor(($dif_d/365.24)); echo $age; ? Thanks, Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php If I change $day2 to =time(); instead of strtotime() I get 17. Could be some weirdness going on with using date()?. Edward

Re: [PHP] date() problem

2005-07-06 Thread Edward Vermillion
On Jul 6, 2005, at 2:35 PM, Edward Vermillion wrote: On Jul 6, 2005, at 2:07 PM, Ryan A wrote: Hi, I'm confused, this should give me the age as 17 instead of 16...but it does not...any ideas why? ?php print date(Y:m:d); $age=1988-07-06; $day1=strtotime($age); $day2 = strtotime(date(Y-m

Re: [PHP] date() problem

2005-07-06 Thread Edward Vermillion
be figuring out the actual seconds in a year and doing most of the calculations on the unix timestamp. Something is tickling the back of my brain on this but I can't see it just yet. Eh... Edward Vermillion [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] date() problem

2005-07-06 Thread Edward Vermillion
problem, since I'm not going to be able to do anything else till I figure this out now..., if one of the dates is a leap year the 365.25 works fine, which make me wonder how the strtotime() function is working... or maybe that's what it's supposed to do... ;) Edward Vermillion [EMAIL

Re: [PHP] date() problem

2005-07-06 Thread Edward Vermillion
On Jul 6, 2005, at 5:17 PM, Edward Vermillion wrote: On Jul 6, 2005, at 4:44 PM, Philip Hallstrom wrote: of leap years between the two dates. Leap years occur every 4 years, and 17 / 4 = 4.25, so there were 4 leap years between 7/6/88 and 7/6/05 and Just to nitpick... :-) http

Re: [PHP] date() problem

2005-07-06 Thread Edward Vermillion
On Jul 6, 2005, at 5:31 PM, Edward Vermillion wrote: On Jul 6, 2005, at 5:17 PM, Edward Vermillion wrote: On Jul 6, 2005, at 4:44 PM, Philip Hallstrom wrote: of leap years between the two dates. Leap years occur every 4 years, and 17 / 4 = 4.25, so there were 4 leap years between 7/6/88

Re: [PHP] Removing nonlatin characters

2005-06-28 Thread Edward Vermillion
On Jun 27, 2005, at 3:35 PM, John Nichel wrote: Dotan Cohen wrote: snip What CAN'T php do?!? /snip I can't get it to alter space-time...yet. Actually it does this for me all the time. I sit down at my trusty editor and next thing I know I'm missing a few hours! Edward Vermillion

Re: [PHP] Breaking up data efficiently

2005-06-28 Thread Edward Vermillion
, ie. the script is more likely to work as expected. Eh? ;) Edward Vermillion [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Strange is_dir() behavior

2005-06-25 Thread Edward Vermillion
reason, that echoes nothing. is_dir is returning false on every folder (dir) under photos, except for '.' and '..' dirs. Can someone explain this? What do you get if you just echo out $entry without the if() statement? Do you get a list of the directories you'd expect? Edward Vermillion [EMAIL

[PHP] Verifying images with getimagesize()

2005-06-24 Thread Edward Vermillion
getimagesize() doesn't necessarily mean it's a good image. Edward Vermillion [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] comparing two texts

2005-06-18 Thread Edward Vermillion
in the day... Edward Vermillion [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: How to print variable name and contents

2005-06-17 Thread Edward Vermillion
function to pull the info out that you want, but I usually just do a print_r() on it and manually look through the output. Edward Vermillion [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] imagedestroy()

2005-03-09 Thread Edward Vermillion
long, but this is a rather important problem in what I'm coding. Edward Vermillion [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

<    1   2