[PHP] PHP performance profiling

2008-11-18 Thread Gryffyn
I did a search and didn't find anything really astounding sounding, so I wanted to ask for some "live" recommendations from the crowd here. I was wondering if anyone had used FirePHP with Firebug or could recommend a good profiling method for figuring out where the slow parts of your PHP code a

[PHP] Firefox and Crafting Tables

2007-04-10 Thread gryffyn
http://wow.crafterstome.com/recipes/enchanting.html http://wow.crafterstome.com/special/burning-crusade-faction-recipes.html Firefox: Firefox changes to help memory allocation (all these take place in "about:config".. enter that on your address bar): right-click and create a boolean entry ca

[PHP] PHP hosting with multiple domains?

2006-01-30 Thread gryffyn
I know every month or so someone asks "What's a good web hosting company to use for my PHP projects?".. I have most of the responses archived and have searched online a bit, but I have a specific "wish" and was hoping someone else had already found a good hosting company that'd let me do what I

RE: [PHP] Date Manipulation

2004-12-02 Thread Gryffyn, Trevor
In addition to Matthew's response... Strtotime() and mktime() both return a serial date. That's the "1101945775" number you got. To get this back to a mmdd format that you seem to be trying to do with mktime(), you want to use date() as Matthew suggested. Again, I think examples help more t

RE: [PHP] Page that checks if a user exists on a remote system

2004-12-02 Thread Gryffyn, Trevor
ts on a > remote system > > > On Thursday 02 December 2004 23:32, Gryffyn, Trevor wrote: > > If it's a un*x system and you have permissions to connect > to the SMTP > > server, you could use the VRFY command to check to see if > their email > > address exists o

RE: [PHP] Page that checks if a user exists on a remote system

2004-12-02 Thread Gryffyn, Trevor
If it's a un*x system and you have permissions to connect to the SMTP server, you could use the VRFY command to check to see if their email address exists or not maybe: Example of Verifying a User Name Either S: VRFY Smith R: 250 Fred Smith <[

RE: [PHP] Days remaining? (years, months, days, hours, minutes, seconds..etc)

2004-12-02 Thread Gryffyn, Trevor
I don't know of a built-in function, but you're welcome to use my daydiff script below. It actually gives you year, month, day, hour, minute, second.. Not just days. But modify it as you desire. -TG 31536000,"Months"=>2592000,"Days"=>86400,"Hours"=>3600,"M inutes"=>60); # How many seconds betw

RE: [PHP] Free for commercial use?

2004-12-02 Thread Gryffyn, Trevor
Taken from http://www.php.net/license/: Note: the following questions and answers only apply to version 2.01 and 2.02 of the PHP license. Ignore for version 3.0. Q. What does the PHP license mean then, in simple words? A. (Note: This answer should in no way be taken to replace the PHP license,

RE: [PHP] Re: Browsing while downloading?

2004-12-02 Thread Gryffyn, Trevor
Yeah, this isn't a PHP specific problem, BUT, in the off chance that PHP could solve the problem (using a different method of sending to the browser, etc) then it becomes PHP relevant... So everyone give the guy a break on the relevance issue. If there were two ways of doing something and you onl

RE: [PHP] Text Parser

2004-12-02 Thread Gryffyn, Trevor
That should do it. The only weird bit is adding the single quotes to the beginning and end of the final string. You could also do a str_replace() And of course you can do regex stuff, but I'm not good at that so I'll leave an example to someone else if they care to give one. Just rem

RE: [PHP] Custom Open Tags

2004-12-01 Thread Gryffyn, Trevor
I think there's a way to redefine what tag PHP uses, but I think it globally resets it. I don't think you can say "use and also use ". I think that setting is in PHP.INI somewhere. It might be easier to change your "to be executed later" php tags to something else and before it's sent to it's f

RE: [PHP] Date Manipulation

2004-12-01 Thread Gryffyn, Trevor
As was already mentioned, mktime() and strtotime() both return a serial date. I use mktime() a lot to add/subtract days and such. It automatically compensates for leap days and all that. Example: This should output "2/1/2004" (unless I made a typo). The initial 0,0,0 are the hour, minute, se

[PHP] [SPAM] RE: [PHP] [Off] - A way for PHP sites to get extreme Google rankings

2004-11-29 Thread Gryffyn, Trevor
Well, there is a 'briandunning.com' as #4 on Google searching for 'ebay motors'. Now the trick would be to get listed under "awesome php scripts" or something relevant to your site. If anyone sees it necessary to try this, try going to: http://www.digitalpoint.com/tools/ad-network/ Sorry Brian.

RE: [PHP] IE title bug

2004-11-23 Thread Gryffyn, Trevor
This is probably more of a straight HTML/JS/something question. Do you happen to be using any kind of javascript or vbscript in your source that does any kind of "application.caption" or "window.title" or anything like that? I've used "Application.Caption" in VBA within Excel to update the title

RE: [PHP] Is there a shorthand way to...?

2004-11-23 Thread Gryffyn, Trevor
I didn't see this in any of the responses, and truthfully it's not the best way or most secure.. .basically it has a lot of flaws that you should watch out for (probably creates security issues more than any other thing) but another option for mass setting variables that are possible set or not is

RE: [PHP] Timezones

2004-11-22 Thread Gryffyn, Trevor
didn't even consider the whole alphabetical thing, I should have noticed. Good luck! -TG > -Original Message- > From: Venelin Arnaudov [mailto:[EMAIL PROTECTED] > Sent: Monday, November 22, 2004 11:24 AM > To: Gryffyn, Trevor > Subject: Re: [PHP] Timezones > &

RE: [PHP] HTML form online

2004-11-19 Thread Gryffyn, Trevor
Sure, get whatever data you need into variables and just do something like this: First Name: Last Name: Company: Basic HTML form pre-population, but using PHP variables. Makes it nice and dynamic, good for pre-populating query data that's already been run (searches and such

RE: [PHP] Timezones

2004-11-19 Thread Gryffyn, Trevor
Don't know if this helps, but this was a message regarding Windows based long timezone formats that was posted a little while ago by another user: --- Kim [EMAIL PROTECTED] Managed to find it It helps using just those right keywords after a million goes...

RE: [PHP] getting the highest number in 3 db fields?

2004-11-19 Thread Gryffyn, Trevor
If we're trying to get the max value between 3 columns in a row like this: Prolog transmodal asian 1 2 3 We'd want to get the value "3" If you wanted to get the max out of three values in a row, you might do something like this: SELECT MAX(prolog, transmodal, a

RE: Re[2]: [PHP] PHP Supremacy...

2004-11-18 Thread Gryffyn, Trevor
> GT> Roughly 1/3 of the web servers on the internet these days run IIS > GT> Roughly 2/3 run Apache in some fashion > > I know you said roughly, but it's less than 1/3 running IIS, quite > a bit less infact. The latest Nov. 2004 Netstat survey puts it at > well under a quarter (21.25% to be exact

RE: [PHP] PHP Supremacy...

2004-11-18 Thread Gryffyn, Trevor
Thanks for the link. Here's one relating to Yahoo's use of PHP: http://public.yahoo.com/~radwin/talks/yahoo-phpcon2002.htm Also, out of curiosity I recently did a search trying to find some numbers comparing ASP usage to PHP usage. Market dominance and penetration and such. I didn't look too

RE: [PHP] PHP-editor connected to FTP?

2004-11-18 Thread Gryffyn, Trevor
I use Crimson Editor which will save directly to an FTP location fairly easily. I'm not sure if they fixed this, but in earlier versions it wouldn't save a local backup copy and I ran into problems where it would fail to send via FTP, I'd have a zero byte file on the remote web server and would c

RE: [PHP] mp3 parsing

2004-11-18 Thread Gryffyn, Trevor
Nice script.. Short and concise. Havn't tested it yet, but I like short and concise. :) One thing to note.. This appears to handle ID3v1 tags (which are stored at the beginning of the file). ID3v2 tags are stored at the end of the MP3 and are a little trickier to deal with but they can hold a

RE: [PHP] Database search logic question

2004-11-15 Thread Gryffyn, Trevor
> > Did you take the time to think about what you were > > going to do before starting your application? > > Honestly , no I did not. What I did start out with is > a belief that there wouldn't be a need to know php. I > was using a RAD, that was sold as all encompassing. > Fool me once. Yeah

RE: [PHP] Column Totals

2004-11-15 Thread Gryffyn, Trevor
Because you don't technically 'need' it, unless you're trying to reference the results by column name and you're using an aggregate like that. :) And in most systems, you don't need the "AS" just a space and a new name: SELECT SUM(Revenue) Revenue FROM Sales Where. But all depends on your st

RE: [PHP] XML Parser doesn't work when moved....

2004-11-15 Thread Gryffyn, Trevor
Using PHP 4.2.1 as a development platform to run on a 4.3.7 production box? How strange. Haha Assuming you have zero control over this (otherwise, UPGRADE or something :) then I'm not sure what to tell you. Here are some articles you may have seen already, but passing them on anyway: "Parsing

RE: [PHP] Hacking attempt

2004-11-15 Thread Gryffyn, Trevor
Sounds like someone replaced their INDEX.PHP with something else. Short answer: You can get the INDEX.PHP back if you restore it from a backup copy you should have. If you don't have a backup copy, then you can't get it back most likely (unless it's on a system that you can manage to undelete fr

RE: [PHP] Help: Database Search

2004-11-15 Thread Gryffyn, Trevor
You can't do "WHERE Industry = 1, 2, 3" unless that's something you can do in MySQL but not the other DB's I've used. What you CAN do is us "IN": WHERE Industry IN (1, 2, 3) Or.. WHERE Industry IN ('1','2','3') "IN" basically does a Industry = 1 OR Industry = 2 OR Industry = 3 type thing. I

[PHP] Copyright law, how to protect your investment, how to protect your work... Was - RE: [PHP-DB] Please point me in the right direction.......

2004-11-10 Thread Gryffyn, Trevor
I'm surprised I havn't seen this question come up before (might have just missed it) but it's an excellent question so forgive the crossposting as it's extremely relevant to coders and those purchasing services of coders. Anyone who's gotten married and hired a wedding photographer is probably fam

RE: [PHP] 'Code Snippets' you couldn't live without

2004-11-03 Thread Gryffyn, Trevor
I agree that shorthand is probably bad for, BUT... Greg is absolutely correct. The gist of the post was "What do YOU use frequently". His examples were good enough to illustrate the idea. For me, I have a handful of includes that are in most/a lot of my scripts. I'm not going to paste them her

RE: Re[2]: [PHP] Php files with .html extension?

2004-10-25 Thread Gryffyn, Trevor
> True, it doesn't do anything other than output the HTML. But it's that > "load - scan - determine - output" that takes up CPU time and memory. > > Sure, on most sites it doesn't matter one bit. But on popular sites.. > well, you can do the math I'm sure. > > I guess at the end of the day it com

RE: [PHP] Php files with .html extension?

2004-10-25 Thread Gryffyn, Trevor
That's definitely a good point. I'm curious though, would it really be a significant performance issue? Even if a lot of HTML files are being processed by PHP? I mean, if the PHP parser goes through and never sees a -Original Message- > From: Graham Cossey [mailto:[EMAIL PROTECTED] > S

RE: [PHP] Re: ' (Single Quotes) in user inputs

2004-10-19 Thread Gryffyn, Trevor
Also, you probably want to do a string replace of some kind and make the single quote a double single-quote ' to '' I don't know if that's how MySQL does it, but that's how SQL Server escapes single quotes and I believe other DBs do as well. Just something to look into because I think the \'

RE: [PHP] setting index of array as 1

2004-10-18 Thread Gryffyn, Trevor
In that case, you could do this: $x = 1; $query = mysql_query("select name from names order by date desc"); while($result = mysql_fetch_array($query)) { $all_names[$x] = $result['name']; $x++; } -TG > -Original Message- > From: Afan Pasalic [mailto:[EMAIL PROTECTED] > Sent:

RE: [PHP] constant tasks

2004-10-18 Thread Gryffyn, Trevor
It's possible to have a script running constantly, but Jay's right. CRON or some other task scheduler would probably be better. If you had something running constantly and there was some problem with your compile of PHP or something else that's getting used, there can be memory leaks or other issu

RE: [PHP] Advanced maths help (part 2)

2004-10-15 Thread Gryffyn, Trevor
how to best do that. -TG > -Original Message- > From: Mag [mailto:[EMAIL PROTECTED] > Sent: Friday, October 15, 2004 2:00 PM > To: Gryffyn, Trevor > Cc: php php > Subject: RE: [PHP] Advanced maths help (part 2) > > > Hi Trevor, > > Sorry, am just a bit confu

RE: [PHP] Advanced maths help (part 2)

2004-10-15 Thread Gryffyn, Trevor
My interpretation of Problem 2 before was that you wanted to get a 120w x 90h (?) section of the original image, not of the thumbnail you generated by resizing the original. You seem to be working off of the adjusted height. Sorry, I didn't noodle all the way through this one, what I am missing?

RE: [PHP] Advanced maths help (for GD image functionality)

2004-10-15 Thread Gryffyn, Trevor
Algebra! I aced that in 7th grade! (don't ask me about all the other years of math. Haha.. I think I just got bored and slept a lot or something) -TG > -Original Message- > From: Jonel Rienton [mailto:[EMAIL PROTECTED] > Sent: Friday, October 15, 2004 11:02 AM > To

RE: [PHP] Advanced maths help (for GD image functionality)

2004-10-15 Thread Gryffyn, Trevor
Good questions.. Here's some stuff to play with: > Heres my maths problems in 2 parts: > > Problem 1) > I need to scale down an image (eg: example.jpg) to > height of 120 pixels while maintaining the images > proportions. > > eg: > if i have an image of (height and width) 800x600 what > would th

RE: [PHP] Re: Exporting HTML to Excel

2004-10-13 Thread Gryffyn, Trevor
> Philip Thompson wrote: > > > - > > > header('Content-Type: application/ms-excel'); > > header('Content-Disposition: attachment; filename="project.xls"'); > > ?> > > > > > > > > Something > > Something else > > > > > > - > > > > I just want i

RE: [PHP] Re: [PHP-DB] folder creation in php

2004-10-12 Thread Gryffyn, Trevor
to think about though. -TG > -Original Message- > From: Ben Ramsey [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 12, 2004 3:10 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Re: [PHP-DB] folder creation in php > > > Trevor Gryffyn wrote: > > It's wor

[PHP] RE: [PHP-DB] folder creation in php

2004-10-12 Thread Gryffyn, Trevor
windows box by default). If, for example, you generated html like this though: Your Download Then your "datasendscript.php" would have to generate the proper headers. -TG > -Original Message- > From: Dylan Barber [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 12,

RE: [PHP] Is there any way of knowing User Currently Logged On?

2004-10-12 Thread Gryffyn, Trevor
thenticated user, you can probably still access the LOGON_USER variable. -TG > -Original Message- > From: Mulley, Nikhil [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 12, 2004 1:02 AM > To: Gryffyn, Trevor; [EMAIL PROTECTED] > Cc: John Holmes; Mulley, Nikhil > Sub

RE: [PHP] Is there any way of knowing User Currently Logged On?

2004-10-11 Thread Gryffyn, Trevor
It does and Windows Integrated Authentication has to be turned on (and Anonymous access turned off). I just got my company to configure that so my PHP scripts could grab the authenticated user for logging purposes. -TG > -Original Message- > From: John Holmes [mailto:[EMAIL PROTECTED] >

RE: [PHP] PHP gurus...how are they doing this?

2004-10-11 Thread Gryffyn, Trevor
I can't check this out from work (for obvious reasons) but web server logs should record all the incoming requests and what hosts requested what files. Also, search engines like Google provide an API for programmers that could potentially be used to get data like "how many people are linked to thi

RE: [PHP] textarea vs. type="text" data difference?

2004-10-11 Thread Gryffyn, Trevor
Just wanted to point out something little. "text" types are all single-line data items. "textarea" can contain line breaks. Looks like you may have solved your problem already, but wanted to fill in some info that didn't seem to be mentioned. -TG > -Original Message- > From: Sam Smith

RE: [PHP] Two people working on the same app / script?

2004-09-30 Thread Gryffyn, Trevor
CVS is definitely something to check into. In addition to the Mac product mentioned before, Zend Studio and many other IDEs and editors have CVS compatibility built into them. CVS is similar to (but of course has differences to) Microsoft's Source Safe, if you're familiar with that product. (yeah

RE: [PHP] I have a really stupid question, just trying to debug a script though.

2004-09-29 Thread Gryffyn, Trevor
"Permission denied" could also probably indicate (in addition to what's already been mentioned) that there's authentication needed. If you connect with a web browser, do you get a login prompt window pop up? Not an HTML one, but one of the the basic HTML Auth type stuff? Try pointing your script

RE: [PHP] I have a really stupid question, just trying to debug a script though.

2004-09-29 Thread Gryffyn, Trevor
Can you connect to the same address from the same machine with a web browser? That should help troubleshoot this. If you can and you're still getting the error, maybe post a section of your code and maybe we can get a better idea if why it's failing. -TG > -Original Message- > From: Bre

RE: [PHP] Re: grabbing information from websites

2004-09-28 Thread Gryffyn, Trevor
The URL that you're grabbing there is a frameset, it's probably not the page you want to look at. When you right-click on the page you want to parse and select "View Source" and get the information you posted below, do the same thing but right-click and select "Properties" (in IE at least) and it'

RE: [PHP] Missing $_POST data from a Outlook Express email form

2004-09-24 Thread Gryffyn, Trevor
But Outlook Express, like most Microsoft products, use an embedded version of IE to display HTML documents. Which makes sense, no sense having two HTML rendering engines on the same box. I'm not sure why it WOULDN'T send the post data if the HTML form in email was properly set up with http://www.

RE: [PHP] Newbie array problem

2004-09-23 Thread Gryffyn, Trevor
I definitely think implode() is the better way to do this, but if you DID have to loop through an array, isn't it easier to do "Foreach ($array as $item)"? In this case, requiring the ";" between them (and choosing not to use implode) you could do something like this: Foreach ($array as $count=>$

RE: [PHP] thumbnail of webpage

2004-09-20 Thread Gryffyn, Trevor
--Original Message- > From: raditha dissanayake [mailto:[EMAIL PROTECTED] > Sent: Monday, September 20, 2004 12:28 PM > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] thumbnail of webpage > > > Gryffyn, Trevor wrote: > > >Some great recommendations, but my first thought is

RE: [PHP] thumbnail of webpage

2004-09-20 Thread Gryffyn, Trevor
Some great recommendations, but my first thought is wondering if you can interface with IE via COM or something. Or open the URL via IE and use the Windows API to do a PRINT SCREEN or ALT-PRINT SCREEN to capture it to the clipboard and do something funny that way. If I had time right now, I'd lo

RE: [PHP] reading from files

2004-09-17 Thread Gryffyn, Trevor
I usually use file(): http://www.php.net/manual/en/function.file.php -TG > -Original Message- > From: Merlin [mailto:[EMAIL PROTECTED] > Sent: Friday, September 17, 2004 4:17 PM > To: [EMAIL PROTECTED] > Subject: [PHP] reading from files > > > Hi there, > > I am wondering how to read

[PHP] Microsoft Support - RE: [PHP] Instal or config this package UnxUtils.zip under windows

2004-09-17 Thread Gryffyn, Trevor
First let me say that I'm a Microsoft product fan. Yeah, I do like their products. I like many *nix products and Mac products as well. Basically I'll use whatever's in front of me, but I prefer Microsoft products in a lot of cases, with all of it's flaws and whatnot. (as an avid Firefox user,

RE: [PHP] Highest Key in an Array

2004-09-17 Thread Gryffyn, Trevor
Or... $highestkey = max(array_keys($arr)); > -Original Message- > From: Martin Holm [mailto:[EMAIL PROTECTED] > Sent: Friday, September 17, 2004 11:11 AM > To: Daniel Schierbeck > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] Highest Key in an Array > > > Daniel Schierbeck wrote: > > > I

RE: [PHP] Re: A native Windows binding for PHP - released

2004-09-17 Thread Gryffyn, Trevor
stuff for it. I just want something a little different. -TG > -Original Message- > From: Marek Kilimajer [mailto:[EMAIL PROTECTED] > Sent: Friday, September 17, 2004 11:10 AM > To: Gryffyn, Trevor > Cc: PHP List > Subject: Re: [PHP] Re: A native Windows binding for PHP - rel

RE: [PHP] Host for Mod PHP5

2004-09-17 Thread Gryffyn, Trevor
I use DixieSys.com. They seem to have fairly reasonable rates and good speed. They have a very personable support staff that you can reach via their IRC server, ICQ or through conventional email, trouble tickets, etc. They'd big and well equipped but still have a "down home" manner that I really

RE: [PHP] Re: A native Windows binding for PHP - released

2004-09-17 Thread Gryffyn, Trevor
> On 09/16/2004 09:01 PM, Rubem Pechansky wrote: > > I have designed and successfully prototyped a native Windows binding > > for PHP. This binding is very lightweight and it is already > capable of > > doing dialogs, controls, and a lot more with a few dozen lines of > > code. PHP can thus be use

RE: [PHP] Novice PHP Variable/Link Question

2004-09-17 Thread Gryffyn, Trevor
Alternately, you can do it the lazy way like me: Is the same as... I also think that's a little easier to read. But that's my preference in style. -TG > -Original Message- > From: Greg Donald [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 16, 2004 6:02 PM > To: revDAVE >

RE: [PHP] checking multiple URL parameters

2004-09-16 Thread Gryffyn, Trevor
Ahh.. Andrew has read my confused mind. Yeah, that's what I was getting at. Solution Accepted or something. :) Ok, I'm going to go home now before I cause any more problems. -TG > -Original Message- > From: Andrew Kreps [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 16, 2004 4:

RE: [PHP] checking multiple URL parameters

2004-09-16 Thread Gryffyn, Trevor
> This makes absolutely no sense to me. What do you mean by > submitted? How > would a PHP script be executed at all if the browser never sends a > request? Hah.. I should just let this all go, go home, get some sleep, and start confusing people again tomorrow, but I want to clarify a little bit.

RE: [PHP] MySQL query for average records per day

2004-09-16 Thread Gryffyn, Trevor
Select date1,count(date1) group by date1 where date1 <> '$today' That'll get you the count of how many records were done on each day (excluding today). I don't know what you're trying to average, but you can probably figure it out from there. -TG > -Original Message- > From: Jeff Oien [

RE: [PHP] checking multiple URL parameters

2004-09-16 Thread Gryffyn, Trevor
w Kreps; PHP > Subject: Re: [PHP] checking multiple URL parameters > > > --- Andrew Kreps <[EMAIL PROTECTED]> wrote: > > --- Trevor Gryffyn <[EMAIL PROTECTED]> wrote: > > > I could have sworn that there was a function that dropped ALL > > > GET values

RE: [PHP] checking multiple URL parameters

2004-09-16 Thread Gryffyn, Trevor
t; From: Andrew Kreps [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 16, 2004 1:55 PM > To: PHP > Subject: Re: [PHP] checking multiple URL parameters > > > On Thu, 16 Sep 2004 11:15:13 -0400, Gryffyn, Trevor > <[EMAIL PROTECTED]> wrote: > > I could have sworn th

RE: [PHP] checking multiple URL parameters

2004-09-16 Thread Gryffyn, Trevor
I could have sworn that there was a function that dropped ALL GET values into an associative array. Kind of the inverse of "http_build_query". At any rate, you can keep doing (isset($_REQUEST['mov']) AND isset($_REQUEST['year'])) and such. Is that your question? How do you do AND and OR operatio

RE: [PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread Gryffyn, Trevor
Fair enough. > -Original Message- > From: Ron Guerin [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 15, 2004 3:04 PM > To: Gryffyn, Trevor > Cc: php-general; Dan Joseph > Subject: Re: [PHP] iguanahost - anyone else being plagued? > > > Gryffyn, Trevor

RE: [PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread Gryffyn, Trevor
It appears to be a "user not found" type error..'desintione non existente' looks a lot like "destination doesn't exist". The guys that manage the PHP-General list need to be made aware so they can remove the offending email address. There's not a lot these iguana guys can do if a user no long

RE: [PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread Gryffyn, Trevor
Yeah, I get tons of them too. Ideally, someone should identify which user subscribed to the list is the culprit and remove their address. -TG > -Original Message- > From: Nick Wilson [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 15, 2004 11:53 AM > To: php-general > Subject: [P

RE: [PHP] Image question

2004-09-15 Thread Gryffyn, Trevor
Jason Paschal posted this link a while ago, regarding storing and retriving images from MySQL: http://www.dailymedication.com/modules.php?name=Forums&file=viewtopic&t= 15 -TG > -Original Message- > From: Ed Lazor [mailto:[EMAIL PROTECTED] > Sent: Tuesday, September 14, 2004 8:44 PM > To

RE: [PHP] OK ... WHY does this work ?????

2004-09-15 Thread Gryffyn, Trevor
Read over some of the examples at: http://us4.php.net/types.array If you don't set a key, PHP starts with '0' and increments as you add more elements to the array. If you have "NOTICEs" turned on, I believe you'll get a notice saying that $arrlevels[99] doesn't exist. It's not a fatal error, so

RE: [PHP] Benchmarking a script

2004-09-14 Thread Gryffyn, Trevor
s of both functions (in this case). The only thing you're not benchmarking here is the time to declare the functions once, which is extremely minimal. Does that clarify it a bit for you? -TG > -Original Message- > From: Cristian Lavaque [mailto:[EMAIL PROTECTED] > Sent

RE: [PHP] Convert textarea post data from plain text to html using php..how?

2004-09-14 Thread Gryffyn, Trevor
I stand corrected. Nl2br() is still useful when dealing with outputting data from textarea form elements... If you're outputting to a browser at least. But yes, it only inserts a where there's a \n, it doesn't replace \n and doesn't do anything with \r's. -TG > -Original Message- > Fro

RE: [PHP] Communicate with Outlook

2004-09-14 Thread Gryffyn, Trevor
Ok, so I was bored.. Attached below is a PHP script that will connect to Outlook via COM and go through all the items in the Calendar, displaying the appointment name, location, FROM and TO date/times (adjusting for the weird assed MS timestamp.. Apparently # of seconds since some time in 1970), a

RE: [PHP] convert degrees to heading

2004-09-14 Thread Gryffyn, Trevor
o "$degrees degrees is roughly $compdir on the compass\n"; } Yeah, I don't know what "east of northeast" is, so I just labeled it "NEE" :) Great thinking though. You still get the prize on this one. -TG > -Original Message- > From: Da

RE: [PHP] convert degrees to heading

2004-09-13 Thread Gryffyn, Trevor
> Sent: Monday, September 13, 2004 3:26 PM > To: Gryffyn, Trevor; php > Cc: René Fournier > Subject: Re: [PHP] convert degrees to heading > > > > I have to write a little function to convert a direction > from degrees > > to a compass -type heading. 0 = West. 90

RE: [PHP] Convert textarea post data from plain text to html using php..how?

2004-09-13 Thread Gryffyn, Trevor
Two options: 1. nl2br($posteddata) - This converts all the \r\n's to 's so that it comes out with the same carriage returns as the person who inputed it gave it 2. Use HTML "" tabs to do the same thing. I think that's the trickiest thing about using textarea to input then regurgitate the data.

RE: [PHP] convert degrees to heading

2004-09-13 Thread Gryffyn, Trevor
The cleanest looking multiple "if" scenario is to use a "Switch" statement. Unfortunately I don't believe PHP's "switch" will do varied conditions, only equality statements: $j = 5; switch ($j) { case "< 6": echo "first"; break; case <6: echo "second"; break; case 5: e

RE: [PHP] Communicate with Outlook

2004-09-13 Thread Gryffyn, Trevor
If you have an Outlook client running on the same machine as PHP, you should be able to use COM calls to access the data. Here's MS's Outlook Object Model site for "Outlook Item Objects" including MeetingItem: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/off2000 /html/olmscOutl

RE: [PHP] Clear HTTP POST value

2004-09-13 Thread Gryffyn, Trevor
I don't see why that wouldn't work. It's not in a conditional or something where the "unset" command isn't being executed? If that fails still, maybe try: $_POST["var"] = ""; -TG > -Original Message- > From: Nicklas Bondesson [mailto:[EMAIL PROTECTED] > Sent: Monday, August 23, 2004 5

RE: [PHP] Can I name a session variable using another variable?

2004-09-13 Thread Gryffyn, Trevor
Ok, assuming everything's working correctly except for the use of $prevtime in the SESSION, then here's one answer: Yes, you can name a session the way you described. If you're having trouble with doing the concatenation of values inside $_SESSION, then try combining them outside: $roomname="sam

RE: [PHP] Adding +7 more days on date() value problem

2004-09-10 Thread Gryffyn, Trevor
Example 2. Last day of next month Kind of goofy, but good stuff. -TG > -Original Message- > From: Vail, Warren [mailto:[EMAIL PROTECTED] > Sent: Friday, September 10, 2004 4:47 PM > To: Gryffyn, Trevor; [EMAIL PROTECTED] > Cc: Louie M

RE: [PHP] Adding +7 more days on date() value problem

2004-09-10 Thread Gryffyn, Trevor
time(); > $plus7 = $now+(7*24*60*60); // 7 days, containing 24 hours each, > containing 60 minutes each, containing 60 seconds each. > > echo 'Current Date: '.date('Y-m-d', $now); > echo 'Date in 7 days: '.date('Y-m-d', $plus7); > >

RE: [PHP] Adding +7 more days on date() value problem

2004-09-10 Thread Gryffyn, Trevor
I disagree on the strtotime recommendations that everyone else gave. The mktime() function itself will compensate for leap years, "day = 36" type stuff and all of that. "; Echo "+7 Dats Date: $plus7"; ?> Simple as that! -TG > -Original Message- > From: Louie Miranda [mailto:[EMAIL PROT

RE: [PHP] adding *** on email address upon view

2004-09-10 Thread Gryffyn, Trevor
One simple way to do it would be: List($username,$domain) = explode("@",$emailaddress); $newemailaddress = "[EMAIL PROTECTED]"; Maybe I just use list/explode too much. :) -TG > -Original Message- > From: Jason Wong [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 22, 2004 6:09 AM > To

RE: [PHP] Active windows

2004-09-10 Thread Gryffyn, Trevor
Check into the Javascript events "onfocus" and "onblur" (forgive my syntax). Focus is when a window becomes 'active' and Blur is when it becomes 'non active'. -TG > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 15, 2004 10:07 PM > To: PHP

RE: [PHP] A follow up on my question about good coding practice [isset]

2004-09-10 Thread Gryffyn, Trevor
For reference: http://www.blueshoes.org/en/developer/php_cheat_sheet/ > -Original Message- > From: Al [mailto:[EMAIL PROTECTED] > Sent: Sunday, June 06, 2004 7:47 PM > To: [EMAIL PROTECTED] > Subject: [PHP] A follow up on my question about good coding > practice [isset] > > > I could

RE: [PHP] [PHP-GEN] Check Boxes

2004-09-10 Thread Gryffyn, Trevor
You got it right, except you're going to have it blow up on you if someone doesn't select something Try these changes: $a1 = $_POST['ch1']; $a2 = $_POST['ch2']; $a3 = $_POST['ch3']; # Add this bit If (isset($_POST['ch1')) { $collist .= ",$a1"; } If (isset($_POST['ch2')) { if ($collist == "")

RE: [PHP] Re: Unable to open word document.

2004-09-07 Thread Gryffyn, Trevor
Another thing to keep in mind is that Office products can run "invisible". Sometimes you'll get COM failures and can't understand why and it turns out that Word or Excel or whatever is still running, just not visible. Pull up your Task Manager and look for the process and kill it. The property i

[PHP] RE: [PHP-WIN] i need help

2004-05-18 Thread Gryffyn, Trevor
If the format is consistantly the same, try this: $somedata = "[i:aslkdfj]"; $insidedata = substr($somedata,3,strlen($somedata)-4); -TG > -Original Message- > From: Student [mailto:[EMAIL PROTECTED] > Sent: Monday, May 17, 2004 11:42 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subje

RE: [PHP] Control structure - easier way than repeating conditions in IF?

2004-04-30 Thread Gryffyn, Trevor
You could do something like this: $valuesarr = array($a,$b,$c,$d); If (in_array($x,$valuesarr)) { # do something } Or I guess even: If (in_array($x,array($a,$b,$c,$d))) { # do something } I don't know if your method or this method have better performance but it's a little eas

RE: [PHP] Weird question - environment data from windows

2004-02-18 Thread Gryffyn, Trevor
> -Original Message- > From: Martin [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 18, 2004 10:26 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Weird question - environment data from windows > > When you've stopped laughing - is it at all possible to pass Windows > environment data

RE: Re[2]: [PHP] Browser Detection another page

2004-02-18 Thread Gryffyn, Trevor
> mycb> Sure, but why would a user want to fake their browser signature? > > They might do it without even knowing. Opera will identify itself as > IE6 for example if you select that in the Preferences. Other > browsers/packages can do it as standard. Although I can't give a > specific example, I

RE: [PHP] sending a hex string as it is?

2004-01-29 Thread Gryffyn, Trevor
7;)); > pack('C',0x20); > > All of those _should_ create a space... > -- > // DvDmanDT > MSN: dvdmandt¤hotmail.com > Mail: dvdmandt¤telia.com > "Trevor Gryffyn" <[EMAIL PROTECTED]> skrev i meddelandet > news:[EMAIL PROTECTED] > RCARGO.COM... >

RE: [PHP] sending a hex string as it is?

2004-01-29 Thread Gryffyn, Trevor
Ahh.. Since you're not declaring what data type $var is, it must be treating it as a string, even though I'd think it'd take it as an int if you didn't put quotes around it. That's one thing I like about PHP.. You can be as strict or lax as you want with the types. But I can see in this case wh

RE: [PHP] Integration between ASP & PHP.

2004-01-29 Thread Gryffyn, Trevor
time efficient to bite the bullet and pick a language. -TG > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 29, 2004 5:35 PM > To: Gryffyn, Trevor > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] Integration between ASP

RE: [PHP] index page not running and other woes (0t?)

2004-01-29 Thread Gryffyn, Trevor
I'd check the permissions of your files as well as any .htaccess settings you may need to set allowances on the files and folders involved. Also check your 'default document' name in your configuration and make sure that it's looking for "index.html" at all. Although that wouldn't affect it if yo

RE: [PHP] Integration between ASP & PHP.

2004-01-29 Thread Gryffyn, Trevor
Define "integrate"? Using both ASP and PHP within the same physical file/script like: <% Aspcodehere %? ?? ...or going from ASP pages to PHP pages? That is, "Default.asp" calls "menu.php" or something like that? In the first case, I'm not sure if it's possible since the web server passes

RE: [PHP] Spell checker in PHP

2004-01-29 Thread Gryffyn, Trevor
There are a lot of words in the spelling checking in Microsoft products that isn't part of what you'd consider a standard 'dictionary', like city names and such. I think for spell checking, using the internal spell check in Word would be best, but if you ever decided to work on Word<->PHP integrat

  1   2   >