RE: [PHP] getting a number range from user input.. (weight)

2004-11-04 Thread Murray @ PlanetThoughtful
I don't understand why you have the 'Weight_kg = "6"' clause in your WHERE statement? Aren't you attempting to return one of the zone values depending on a value that falls between range and weight_kg? Let's say, for example, that the value you're searching for is .45. The following statement wou

Re: [PHP] PHP5 syntax question

2004-11-04 Thread Thomas Goyne
On Fri, 05 Nov 2004 09:19:58 +0200, Simas Toleikis <[EMAIL PROTECTED]> wrote: I think PHP5 docs are not full yet. Wasnt there supposed to be namespaces in PHP5? PHP documentation doesnt even mentions them... No, they were cut, and it is highly doubtful they will show up any time before php6.

Re: [PHP] PHP5 syntax question

2004-11-04 Thread Simas Toleikis
Gerard Samuel wrote: I dont see it in the documentation, but I've seen samples of code using something to the effect of -> $foo->method1()->method2() It's called object dereferencing and its not implemented in PHP4. It is avalaible in PHP5. If method1() returns an instance of some object then the

RE: [PHP] Reservation technique

2004-11-04 Thread Roger Thomas
Yes. I flipped thru the manpages and found: expr BETWEEN min AND max If expr is greater than or equal to min and expr is less than or equal to max, BETWEEN returns 1, otherwise it returns 0. This is equivalent to the expression (min <= expr AND expr <= max) if all the arguments are of the sam

Re: [PHP] getting a number range from user input.. (weight)

2004-11-04 Thread Louie Miranda
I have this on my db. mysql> select * from rates_dhl where weight_kg = "6" between range and Weight_KG; ++---+---+++++++++ | id | range | Weight_KG | Zone_A | Zone_B | Zone_C | Zone_D | Zone_E | Zone_F | Zone_G | Zone_

RE: [PHP] getting a number range from user input.. (weight)

2004-11-04 Thread Murray @ PlanetThoughtful
> OK, here is what it should do. > > I have a fixed range of weights from .5 to 20.0 Kg (kilogram) and for > each weight it has a succeeding value, i cannot jump or just round off > the numbers. So i need a range detector to do it. > > Because for each of the item below: > > > weight value >

Re: [PHP] $_SERVER['HTTP_REFERER'] does not work

2004-11-04 Thread Jason Wong
On Friday 05 November 2004 01:13, Michelle Konzack wrote: [snip] > Then I have the same problem with > > echo $_SERVER['SERVER_NAME']; > > which tell me every time the "ServerName" but not the public > "ServerAlias". > > WHY ? Look up "UseCanonicalName" in the Apache docs and see if this relates

Re: [PHP] getting a number range from user input.. (weight)

2004-11-04 Thread Louie Miranda
Im thingking of putting the fixed value into an array and compare thru < and > and get the fixed rate. On Fri, 05 Nov 2004 14:38:17 +1100, Devraj Mukherjee <[EMAIL PROTECTED]> wrote: > Well, I dont know if there is a function that can do this in PHP, but > you could always split the number using

[PHP] PHP5 syntax question

2004-11-04 Thread Gerard Samuel
I dont see it in the documentation, but I've seen samples of code using something to the effect of -> $foo->method1()->method2() Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Reservation technique

2004-11-04 Thread Murray @ PlanetThoughtful
> Great! Thanks Murray. Hi Roger, On second thoughts, perhaps the BETWEEN operator isn't what you're looking for, since it will probably return false matches on bordering reservations. In other words, someone attempting to make a reservation between 10am and 12pm might be told there's a conflict

RE: [PHP] Reservation technique

2004-11-04 Thread Roger Thomas
Great! Thanks Murray. -- roger Quoting "Murray @ PlanetThoughtful" <[EMAIL PROTECTED]>: > > > How will a PHP script perform such checking to prevent that sort of > > overlapping in reservation ? Or could it be that my database design is bad > > that's blocking ideas into my head ? > > Hi Roge

[PHP] Reservation technique

2004-11-04 Thread Roger Thomas
I would like to do some sort of facilities reservation system. Suppose this is for booking , say, a meeting room. Booking detail to be stored in db: - name or id of person - meeting room number - date and time (when room will be used) - number of hours to be allocated Now say Peter booked room R

Re: [PHP] getting a number range from user input.. (weight)

2004-11-04 Thread Louie Miranda
OK, here is what it should do. I have a fixed range of weights from .5 to 20.0 Kg (kilogram) and for each weight it has a succeeding value, i cannot jump or just round off the numbers. So i need a range detector to do it. Because for each of the item below: > weight value > .59.45

RE: [PHP] Reservation technique

2004-11-04 Thread Murray @ PlanetThoughtful
> How will a PHP script perform such checking to prevent that sort of > overlapping in reservation ? Or could it be that my database design is bad > that's blocking ideas into my head ? Hi Roger, I think you need to check out the BETWEEN operator in MySQL (assuming you're using MySQL? Look for t

[PHP] getting a number range from user input.. (weight)

2004-11-04 Thread Louie Miranda
How can i match a range of numbers from a given input? i tried round() but it rounds off the numbers to the next number, so that will be wrong. My example below show 4 examples of what my db tables looks like. weight value .59.45 1.0 10.71 1.5 11.97 2.0 13.23

RE: [PHP] getting a number range from user input.. (weight)

2004-11-04 Thread Vail, Warren
Are you trying to round to the nearest .5 value? Warren Vail -Original Message- From: Vail, Warren Sent: Thursday, November 04, 2004 7:24 PM To: 'Louie Miranda'; [EMAIL PROTECTED] Subject: RE: [PHP] getting a number range from user input.. (weight) Not sure I completely understand wha

[PHP] Is there an HTTP server that parses PHP that will run on the Axim x3i?

2004-11-04 Thread Megiddo
Is there an HTTP server that parses PHP that will run on the Axim x3i? I'd really like to know the answer to this question. I'm a big PHP programmer, and would love to be able to test my scripts on my Axim. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.

RE: [PHP] getting a number range from user input.. (weight)

2004-11-04 Thread Vail, Warren
Not sure I completely understand what you are trying to do. In your problem, seems to me that both 1.3 and 1.6 would fall under 2.0 and neither of them would fall under 1.0. You must be using some logic that I am not getting. Can you be a little more specific? Warren Vail -Original Messag

Re: [PHP] using require or include?

2004-11-04 Thread John Nichel
Reinhart Viane wrote: i have made a page (overall.php) in which several elements are defined: the connection with the database a function called session_checker to check if users are logged in and a last function(function getuserinfo()) that substracts values from the database based on the session

[PHP] $_SERVER['HTTP_REFERER'] does not work

2004-11-04 Thread Michelle Konzack
Hello, I have a Host on DynDNS.org with the URL In the Pages I like to check, whether the URL was called from inside my Domain or not. For testing I have added echo $_SERVER['HTTP_REFERER']; but it returns every time h

Re: [PHP] How to display a 'please wait' message whilst processing?

2004-11-04 Thread raditha dissanayake
Graham Cossey wrote: On a number of sites a message and/or graphic is displayed asking you to wait or be patient whilst some processing is being performed to compose the next page. Usually you need to do this when the data is collected from a POST and/or you don't want the user to reload the pa

RE: [PHP] using require or include?

2004-11-04 Thread Reinhart Viane
That indeed did the trick. global $username; global $userstatus; $username=$row['user_name']; $userstatus=$row['user_status']; Thx very much -Original Message- From: Graham Cossey [mailto:[EMAIL PROTECTED] Sent: vrijdag 5 november 2004 0:47 To: Php-General; [EMAIL PROTECTED] Subject: R

[PHP] Session object destruction failed

2004-11-04 Thread Pablo Gosse
Hi folks. Earlier today I received the following error when I tried to log out of my CMS: Session object destruction failed in [blah blah blah file info]. I googled this and took a look on bugs.php.net but couldn't find much useful info. Everything worked fine before, and has worked fine since,

Re: [PHP] Is there any 'strict' and 'warnings' like packages inside PHP ?

2004-11-04 Thread Curt Zirzow
* Thus wrote Greg Donald: > On Fri, 5 Nov 2004 06:20:11 +0800, Exile <[EMAIL PROTECTED]> wrote: > > Is there any package like 'strict' or 'warnings' in PHP, like Perl ? > > error_reporting(E_ALL | E_STRICT); > > E_STRICT was added in PHP5. E_STRICT has a different purpose though.. it will report

RE: [PHP] using require or include?

2004-11-04 Thread Graham Cossey
Have you looked at the GLOBAL keyword? http://uk.php.net/manual/en/language.variables.scope.php > -Original Message- > From: Reinhart Viane [mailto:[EMAIL PROTECTED] > Sent: 04 November 2004 23:02 > To: [EMAIL PROTECTED] > Subject: [PHP] using require or include? > > > i have made a pag

Re: [PHP] Downloading Large (100M+) Files

2004-11-04 Thread Curt Zirzow
* Thus wrote Robin Getz: > Curt Zirzow [EMAIL PROTECTED] wrote: > >> replaced: > >> readfile($name); > >> with: > >> $fp = fopen($name, 'rb'); > >> fpassthru($fp); > > > >The only difference between readfile() and fpassthru() is what parameters > >you pass it. > > > >Something else is the pr

[PHP] Getting all namespaces of a DOM document.

2004-11-04 Thread David Schlotfeldt
This should work perfectly. Thanks a lot! David --- Hello David, I had the same problem some weeks before and solved it with the use of xpath (thus it isn't in the dom documentation of w3c but you'll find it under xpath recommendation): $xml = "http://anynamespace.tld/

[PHP] Getting all namespaces of a DOM document.

2004-11-04 Thread David Schlotfeldt
This should work perfectly. Thanks a lot! David --- Hello David, I had the same problem some weeks before and solved it with the use of xpath (thus it isn't in the dom documentation of w3c but you'll find it under xpath recommendation): http://anynamespace.tld/\";>nodeVa

Re: [PHP] Question: Validation on a text field

2004-11-04 Thread Stuart Felenstein
--- Ben Ramsey <[EMAIL PROTECTED]> wrote: > You should also use mysql_real_escape_string() on > the data from the client. Even though Magic Quotes GPC is turned on ? Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Downloading Large (100M+) Files

2004-11-04 Thread Robin Getz
OK, I checked things out, and based on some private emails, and pointers, from Francisco M. Marzoa [EMAIL PROTECTED], I have now replaced: readfile($name); with: while(!feof($fp)) { $buf = fread($fp, 4096); echo $buf; $bytesSent+=strlen($buf);/* We know how many

[PHP] using require or include?

2004-11-04 Thread Reinhart Viane
i have made a page (overall.php) in which several elements are defined: the connection with the database a function called session_checker to check if users are logged in and a last function(function getuserinfo()) that substracts values from the database based on the session variables of the logge

Re: [PHP] Is there any 'strict' and 'warnings' like packages inside PHP ?

2004-11-04 Thread Greg Donald
On Fri, 5 Nov 2004 06:20:11 +0800, Exile <[EMAIL PROTECTED]> wrote: > Is there any package like 'strict' or 'warnings' in PHP, like Perl ? error_reporting(E_ALL | E_STRICT); E_STRICT was added in PHP5. -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- P

Re: [PHP] Downloading Large (100M+) Files

2004-11-04 Thread Klaus Reimer
Robin Getz wrote: The same problem exists with fpassthru (now that I have let it run a little longer) I now have 5 sleeping httpd processes on my system that are consuming 200Meg each. Any thoughts? Ok, so much for the theory. What about the output buffering? Have you checked if you have output

[PHP] Is there any 'strict' and 'warnings' like packages inside PHP ?

2004-11-04 Thread Exile
Hi list, Is there any package like 'strict' or 'warnings' in PHP, like Perl ? Thanks in advise, Exile

RE: [PHP] Question: Validation on a text field

2004-11-04 Thread Stuart Felenstein
--- Jay Blanchard <[EMAIL PROTECTED]> wrote: > [snip] > May I ask why you are suggesting this function ? > > > You can use htmlentities() on the information > placed > [/snip] > > Because it will convert things like quotes into > their HTML counterparts > before you place them into the table. I

Re: [PHP] Downloading Large (100M+) Files

2004-11-04 Thread Robin Getz
Curt Zirzow [EMAIL PROTECTED] wrote: > replaced: > readfile($name); > with: > $fp = fopen($name, 'rb'); > fpassthru($fp); The only difference between readfile() and fpassthru() is what parameters you pass it. Something else is the problem, what version of php are you running? I am using php

Re: [PHP] Question: Validation on a text field

2004-11-04 Thread Ben Ramsey
Jay Blanchard wrote: [snip] May I ask why you are suggesting this function ? You can use htmlentities() on the information placed [/snip] Because it will convert things like quotes into their HTML counterparts before you place them into the table. If you are reading it back out to a web interface t

Re: [PHP] Zip Codes

2004-11-04 Thread Dusty Bin
Brian V Bonini wrote: On Thu, 2004-11-04 at 12:47, Vail, Warren wrote: If you can figure out how to make sense of this, you might be able to find the point that a system is connected to the internet, by tracing back to a visitors current IP address. Which may get you close but either way would pr

RE: [PHP] Question: Validation on a text field

2004-11-04 Thread Jay Blanchard
[snip] May I ask why you are suggesting this function ? > You can use htmlentities() on the information placed [/snip] Because it will convert things like quotes into their HTML counterparts before you place them into the table. If you are reading it back out to a web interface they get properly

Re: [PHP] Re: VOTE TODAY

2004-11-04 Thread Michael Lauzon
6Mb, that's no fair, the highest we have in Canada is 4Mb; although supposedly there is a 5Mb service somewhere...well there is 7Mb service but you'll be paying out of your @$$ for it. On Thu, 4 Nov 2004 04:09:50 +0100, Michelle Konzack <[EMAIL PROTECTED]> wrote: > Am 2004-11-02 18:36:08, schri

RE: [PHP] Question: Validation on a text field

2004-11-04 Thread Stuart Felenstein
May I ask why you are suggesting this function ? Stuart --- Jay Blanchard <[EMAIL PROTECTED]> wrote: > [snip] > It's a mysql text field. > [/snip] > > You can use htmlentities() on the information placed > into the field > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe,

RE: [PHP] Question: Validation on a text field

2004-11-04 Thread Jay Blanchard
[snip] It's a mysql text field. [/snip] You can use htmlentities() on the information placed into the field -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Question: Validation on a text field

2004-11-04 Thread Stuart Felenstein
--- "Vail, Warren" <[EMAIL PROTECTED]> wrote: > I also don't know if MySQL will police things input > to a text column to make > sure they are valid ascii text characters. > No Mysql won't do it. PHP validation would have to be involved. Stuart -- PHP General Mailing List (http://www.php.net

RE: [PHP] Question: Validation on a text field

2004-11-04 Thread Stuart Felenstein
It's a mysql text field. Stuart --- Jay Blanchard <[EMAIL PROTECTED]> wrote: > [snip] > Any thoughts ? > [/snip] > > I thought I'd have lunch today, but I didn't. > > Is it a 'text' data type, or 'BLOB', (you said, > "actual Mysql Text > column, aka like a blob") because the distinction is > ne

RE: [PHP] Question: Validation on a text field

2004-11-04 Thread Vail, Warren
Assuming that the pasting is done into a on an html form, I believe the Textarea will limit the past to just "text" characters. I suppose this could be dependent on the browser. I don't know of any html input control that would allow "blob" (binary) values. I also don't know if MySQL will po

RE: [PHP] Question: Validation on a text field

2004-11-04 Thread Jay Blanchard
[snip] Any thoughts ? [/snip] I thought I'd have lunch today, but I didn't. Is it a 'text' data type, or 'BLOB', (you said, "actual Mysql Text column, aka like a blob") because the distinction is needed. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/

[PHP] Question: Validation on a text field

2004-11-04 Thread Stuart Felenstein
I have a field that is an actual Mysql Text column, aka like a blob. I'm wondering if doing a standard validation that checks for characters outside of the alphanumeric range is enough. I'm imagining some users will cut and paste from a Word or PDF doc into the field. I've done it myself and no w

Re: [PHP] Strange query

2004-11-04 Thread Greg Donald
On Thu, 4 Nov 2004 13:02:19 -0700, Vail, Warren <[EMAIL PROTECTED]> wrote: > It is too bad this clause is not supported by some of the other > databases I have had to use I think calling a limit a limit and an offset an offset is a good thing. -- Greg Donald Zend Certified Engineer http://gdcon

RE: [PHP] Strange query

2004-11-04 Thread Ryan A
Hey, > the second > specifies the maximum number of rows to return. Thats where my problem was...thanks. I forget the Limit parameters, i for some reason though the second parameter was till which record to return... Loud and clear sign telling me to get some sleep (i guess) :-) Thanks, Ryan

RE: [PHP] Strange query

2004-11-04 Thread Vail, Warren
The second limit parameter is the actual number of rows to limit to, and in most situations this is usually the same number (i.e. 0,15; 15,15; 30,15; etc). It is too bad this clause is not supported by some of the other databases I have had to use, it makes a convenient way of paging where the sec

RE: [PHP] Strange query

2004-11-04 Thread Jay Blanchard
[snip] $query = "select gallery_url,description from members limit ".$limit[0].",".$limit[1]; the first time: limit 0,15 and the second time: limit 16,30 [/snip] from http://www.mysql.com/select "The LIMIT clause can be used to constrain the number of rows returned by the SELECT statement. LIM

[PHP] Strange query

2004-11-04 Thread Ryan A
Hi, I am running this query from my script: $query = "select gallery_url,description from members limit ".$limit[0].",".$limit[1]; the first time: limit 0,15 and the second time: limit 16,30 the problem is the first time I am getting 15 rows returned (as expected) the second query of select g

[PHP] How to display a 'please wait' message whilst processing?

2004-11-04 Thread Graham Cossey
On a number of sites a message and/or graphic is displayed asking you to wait or be patient whilst some processing is being performed to compose the next page. How are these done within PHP scripts? Could output buffering be used for this purpose? For example is it possible to do something like:

Re: [PHP] Re: Advice on imagecreatefrom

2004-11-04 Thread Jason Wong
On Thursday 04 November 2004 18:33, Daniel Lahey wrote: > I find it hard to believe, too. The error is (as I recall) "call to > undefined function () in at " with no function name > given, just the empty parentheses. It doesn't happen in Firefox, > Mozilla, or Netscape. Post some *concise* cod

Re: [PHP] Downloading Large (100M+) Files

2004-11-04 Thread Curt Zirzow
* Thus wrote Robin Getz: > Klaus Reimer [EMAIL PROTECTED] wrote: > >If this theory is true, you may try fpassthru(). > > replaced: > readfile($name); > with: > $fp = fopen($name, 'rb'); > fpassthru($fp); The only difference between readfile() and fpassthru() is what parameters you pass it.

RE: [PHP] Zip Codes

2004-11-04 Thread Brian V Bonini
On Thu, 2004-11-04 at 12:47, Vail, Warren wrote: > If you can figure out how to make sense of this, you might be able to find > the point that a system is connected to the internet, by tracing back to a > visitors current IP address. Which may get you close but either way would probably be more i

RE: [PHP] Zip Codes

2004-11-04 Thread Jay Blanchard
[snip] > Thanks for the sarcasm, it definitely helps. > > Why is it that when people ask a question there is always someone that has > a smartass answer? > It keeps us on our toes. Someone's gotta do it. [/snip] It would be a terrible thing to arrive one day, open the list, and see that everyone

[PHP] Re: Advice on imagecreatefrom

2004-11-04 Thread Daniel Lahey
I find it hard to believe that your choice of browser affects the operation of PHP. Where is this report? I may have been mistaken about the "report": "Windows versions of PHP prior to PHP 4.3.0 do not support accessing remote files via this function, even if allow_url_fopen is enabled." (Foun

Re: [PHP] Zip Codes

2004-11-04 Thread Matthew Sims
> Thanks for the sarcasm, it definitely helps. > > Why is it that when people ask a question there is always someone that has > a smartass answer? > It keeps us on our toes. Someone's gotta do it. -- --Matthew Sims -- -- PHP General Mailing List (http://www.php.net/) T

RE: [PHP] Zip Codes

2004-11-04 Thread Vail, Warren
Because for some of us, that part of our body is the smartest thing we have going, and the rest of us is not engaged in the question. Warren Vail -Original Message- From: bb9876 [mailto:[EMAIL PROTECTED] Sent: Thursday, November 04, 2004 9:41 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Z

Re: [PHP] Determining system resources

2004-11-04 Thread Robin Getz
Francisco M. Marzoa Alonso [EMAIL PROTECTED] wrote: As far as you cannot lock another processes in the system, so this will not give you the security that the resources will not change -and probably they'll do it- while you're trying to download that file. Yes, I understand, but not to know even

Re: [PHP] Re: PHP Crypt on MacOSX

2004-11-04 Thread Kris
Galen P.Zink wrote: Kris, I doubt there's "no way" to do this under OS X. Maybe by default, you have a curve ball to deal with. But considering the kernel is open source, you could make this OS do anything... literally :) That is how I feel as well. Being a long-time *nix/BSD user.. I have hear

RE: [PHP] Zip Codes

2004-11-04 Thread Vail, Warren
One thing I might be tempted to try would be to execute a trace route utility and analyze the output, but it is very cryptic; http://www.traceroute.org/ http://www.tracert.com/cgi-bin/trace.pl HOSTLOSS RCVD SENTBEST AVG WORST er1.sfo1.speakeasy.net

Re: [PHP] Zip Codes

2004-11-04 Thread bb9876
Thanks for the sarcasm, it definitely helps. Why is it that when people ask a question there is always someone that has a smartass answer? "Jason Wong" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Thursday 04 November 2004 16:59, bb9876 wrote: > > Is there any way to use PHP t

Re: [PHP] Zip Codes

2004-11-04 Thread Matthew Weier O'Phinney
* Bb9876 <[EMAIL PROTECTED]>: > "John Nichel" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > bb9876 wrote: > > > Is there any way to use PHP to determine the zip code someone is > > > visiting > > > from, assuming they are all from the US? > > > > > > > Outside of asking the visi

Re: [PHP] Determining system resources

2004-11-04 Thread Francisco M. Marzoa Alonso
Greetings Robin, As far as you cannot lock another processes in the system, so this will not give you the security that the resources will not change -and probably they'll do it- while you're trying to download that file. Best regards, Robin Getz wrote: I have been unable to find a php function

Re: [PHP] Zip Codes

2004-11-04 Thread bb9876
Okay, I run a movie news site and wanted to use it to make it even quicker for users to find movie times in their area whether they were logged in or not, but that's the way it goes. Thanks fo rthe replies. "John Nichel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > bb9876 wrote:

Re: [PHP] Zip Codes

2004-11-04 Thread Jason Wong
On Thursday 04 November 2004 16:59, bb9876 wrote: > Is there any way to use PHP to determine the zip code someone is visiting > from, assuming they are all from the US? Something like this should work: -- start Please input zipcode -- end -- Jason Wong -> Gremlins Associat

[PHP] Re: settin mine type while saving files

2004-11-04 Thread M. Sokolewicz
Merlin wrote: Hi there, I am creating pdf files inside my application and do save them to the server file system. Now I have sent some of the emails by the system via email and found that the mine type is not set. So the pdf file apears in the attachement, but one has to select the application f

Re: [PHP] Zip Codes

2004-11-04 Thread John Nichel
bb9876 wrote: Is there any way to use PHP to determine the zip code someone is visiting from, assuming they are all from the US? Outside of asking the visitor for it, no. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsu

Re: [PHP] Zip Codes

2004-11-04 Thread Greg Donald
On Thu, 4 Nov 2004 08:59:50 -0800, bb9876 <[EMAIL PROTECTED]> wrote: > Is there any way to use PHP to determine the zip code someone is visiting > from, assuming they are all from the US? http://www.usps.com/webtools/ -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://desti

RE: [PHP] Zip Codes

2004-11-04 Thread Jay Blanchard
[snip] Is there any way to use PHP to determine the zip code someone is visiting from, assuming they are all from the US? [/snip] You would have to determine their IP, which, some being dynamically assigned at log on, would not necessarily indicate the users location. Then you would have to be abl

RE: [PHP] Zip Codes

2004-11-04 Thread Vail, Warren
Do you mean other than asking them, like using their IP address? Warren Vail -Original Message- From: bb9876 [mailto:[EMAIL PROTECTED] Sent: Thursday, November 04, 2004 9:00 AM To: [EMAIL PROTECTED] Subject: [PHP] Zip Codes Is there any way to use PHP to determine the zip code someone

[PHP] Zip Codes

2004-11-04 Thread bb9876
Is there any way to use PHP to determine the zip code someone is visiting from, assuming they are all from the US? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] settin mine type while saving files

2004-11-04 Thread Merlin
Hi there, I am creating pdf files inside my application and do save them to the server file system. Now I have sent some of the emails by the system via email and found that the mine type is not set. So the pdf file apears in the attachement, but one has to select the application from a list to

Re: [PHP] Determining system resources

2004-11-04 Thread Greg Donald
On Thu, 04 Nov 2004 08:25:19 -0800, Robin Getz <[EMAIL PROTECTED]> wrote: > I have been unable to find a php function to determine available system > memory (physical and swap)? > php -r "system('free -m');" total used free sharedbuffers cached Mem: 2

Re: [PHP] Downloading Large (100M+) Files

2004-11-04 Thread Greg Donald
On Thu, 04 Nov 2004 08:22:18 -0800, Robin Getz <[EMAIL PROTECTED]> wrote: > and now I don't loose 250 Meg of memory every time I download a 250Meg > file. If someone wants to add this to the readfile() php manual - great. Anyone can post user comments in the manual. Give it a shot. -- Greg Do

[PHP] Determining system resources

2004-11-04 Thread Robin Getz
I have been unable to find a php function to determine available system memory (physical and swap)? Right now I am using something like: = # ensure there is enough free memory for the download $free = shell_exec('free -b'); $i=0; while ( $i != strlen($free) ) { i = strlen($free);

Re: [PHP] Downloading Large (100M+) Files

2004-11-04 Thread Robin Getz
Klaus Reimer [EMAIL PROTECTED] wrote: If this theory is true, you may try fpassthru(). replaced: readfile($name); with: $fp = fopen($name, 'rb'); fpassthru($fp); and now I don't loose 250 Meg of memory every time I download a 250Meg file. If someone wants to add this to the readfile() php m

Re: [PHP] what am i doing wrong..??

2004-11-04 Thread M. Sokolewicz
well ofcourse it "keeps the get variables" as you put it. PHP_SELF is the path and arguments that php was called with. use phpinfo(); to find out which variables hold the real path, make sure to add some random "get variables" when calling that script so you see the difference Jack Van Zanen wr

RE: [PHP] what am i doing wrong..??

2004-11-04 Thread Jack . van . Zanen
somehow keeps the $_GET variables. If you change this to the real script name it seems to work JACK -Original Message- From: Aalee [mailto:[EMAIL PROTECTED] Sent: Thursday, November 04, 2004 1:54 PM To: [EMAIL PROTECTED] Subject: [PHP] what am i doing wrong..?? Hi there please have a

Re: [PHP] help in php script

2004-11-04 Thread Klaus Reimer
Klaus Reimer wrote: This can't work. You browser tries to download an image with the name ''. Ah, I'm talking nonsense. I meant "the browser tries to DISPLAY an image with the CONTENT ''." The browser can't do this. That's why you don't see anything. -- Bye, K (FidoNe

Re: [PHP] help in php script

2004-11-04 Thread Klaus Reimer
Deepak Dhake wrote: "; ?> did you get what i am saying? please let me know if you have some solution. thanks No. I must admit, It don't understand it. Let me try: You have a script "a.php" which outputs this static content: b.php outputs the static content " This can't work. You browser tries to

Re: [PHP] help in php script

2004-11-04 Thread Deepak Dhake
PRINT is nothing but... TimeRotateImage.php = 6 and $curr_time[2] <= 17) { print ""; } else { print ""; } ?> this script (something like this) should be called from another script like, "; ?> did you get what i am saying? please let me know if you have some solution. thanks Klaus Reimer wro

[PHP] Very wierd issue with pdf's and rotating images

2004-11-04 Thread Brent Clements
I have tried this with pretty much every pdf library available to use with PHP and all have the same results. 1. I create a new pdf. 2. I rotate a jpeg using gd's imagerotate 3. I output the jpeg to a new pdf page 4. I then output the pdf to the browser and/or to a file. When I view the pdf, th

Re: [PHP] Lost session variables still confounding me

2004-11-04 Thread Daniel Kullik
Stuart Felenstein wrote: --- Jason Wong <[EMAIL PROTECTED]> wrote: Maybe what you had before was: if (count($myarray) > 5) $_SESSION['arrayerr'] = "you have selected too many industries"; session_write_close(); header ("Location: Page2.php?".SID); exit; And yes that has

[PHP] pdf_stringwidth

2004-11-04 Thread blackwater dev
I am using pdf_stringwidth and only passing in the first two parameters yet I recently updated to php 4.3.9 and it now want all 4. According to the manual, these where required with 5...why does 4.3.9 want them? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.

Re: [PHP] ezpublish question -- take 2

2004-11-04 Thread Greg Donald
On Thu, 4 Nov 2004 07:12:12 -0800 (PST), Daniel Guerrier <[EMAIL PROTECTED]> wrote: > Has anyone used the latest version of ezpublish? No I haven't. > How did you learn how to use it? I'd read the (free) online docs first: http://www.ez.no/ez_publish/documentation It's a CMS system, it can't be

Re: [PHP] help in php script

2004-11-04 Thread Klaus Reimer
Deepak Dhake wrote: But i am not getting any output if i follow the above procedure. Can you tell me how to do it? I have to have the script TimeRotateImage.php which calculates which image to print accoring to local time and i want to embed the file name in html tag to print it on screen. It's

[PHP] help in php script

2004-11-04 Thread Deepak Dhake
I have a following PHP file TimeRotateImage.php which prints an image = 6 and $curr_time[2] <= 17) { PRINT IMAGE_1; } else { PRINT IMAGE_2; } ?> I want to use this script in another file to display the image. the tag should be But i am not getting any output if i follow the above procedure.

[PHP] ezpublish question -- take 2

2004-11-04 Thread Daniel Guerrier
Has anyone used the latest version of ezpublish? How did you learn how to use it? Do you recommend getting the book? __ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Sessions and threading

2004-11-04 Thread Klaus Reimer
Devraj Mukherjee wrote: The first part of the problem is that I need to be able to at all times maintain a readable set of objects in memory, I am planning to achieve that using session variables, but I hear that session variables can become very inefficient, how true is that? Very true. In Java

Re: [PHP] Sessions and threading

2004-11-04 Thread Greg Donald
On Fri, 05 Nov 2004 00:26:24 +1100, Devraj Mukherjee <[EMAIL PROTECTED]> wrote: > The first part of the problem is that I need to be able to at all times > maintain a readable set of objects in memory, I am planning to achieve > that using session variables, but I hear that session variables can >

[PHP] Sessions and threading

2004-11-04 Thread Devraj Mukherjee
Hi everyone, I am attempting to write an implementation of Prevayler (http://sourceforge,net/projects/prevayler), which has originally been written for Java and provides a prevalance layer for storing objects using incremental log files and taking snapshots of in fixed time intervals. It seems

[PHP] Shorthand functions (was: Code Snippets' you couldn't live without)

2004-11-04 Thread Klaus Reimer
Murray @ PlanetThoughtful wrote: with exploring include files to find out what a function does or how a class operates. I doubt half-a-dozen shorthand functions in that include file would place a measurable strain on the readability or maintainability of a project. I disagree on that. The problem

Re: [PHP] how to create pdf file.

2004-11-04 Thread John Nichel
Roman Duriancik wrote: Please help me with this problem. I need create pdf file who contains table with 4-5 columns and many rows (it dependence by mysql export) in php code. How can i do it ? Thank you roman You can either read the manual, or pay one of us to write it for you. http://us4.php.net

RE: [PHP] how to create pdf file.

2004-11-04 Thread Jay Blanchard
[snip] Please help me with this problem. I need create pdf file who contains table with 4-5 columns and many rows (it dependence by mysql export) in php code. How can i do it ? [/snip] http://www.php.net/pdf http://www.fpdf.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vi

[PHP] how to create pdf file.

2004-11-04 Thread Roman Duriancik
Please help me with this problem. I need create pdf file who contains table with 4-5 columns and many rows (it dependence by mysql export) in php code. How can i do it ? Thank you roman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] what am i doing wrong..??

2004-11-04 Thread bbonkosk
Echo out your queries! $query = "insert into joke values('',".$_POST['joke_text'].",'date')"; ---> echo $query; $result= mysql_query($query); This will tell you what is going on, perhaps some of the information is not set? You can even copy and paste the output to run against your mysql backend

[PHP] what am i doing wrong..??

2004-11-04 Thread Aalee
Hi there please have a look the code below...I dont know wht am doing wrong here... This code is suppose to show the number of jokes in a mysql database and allows user to add a joke when the user clicks addjoke link. And when the joke is added, it suppose to say that "Joke inserted, Thank you" and

  1   2   >