Re: [PHP] regular expression help

2004-09-28 Thread Petar Nedyalkov
On Wednesday 29 September 2004 08:46, Ed Lazor wrote: > > Today I discovered that my ISP can't upgrade to PHP 5. They use Plesk for > server Administration and PHP 5 apparently breaks Plesk. Plesk says > they'll make PHP 5 support available as soon as it starts coming default on > RedHat Enterpr

Re: [PHP] regular expression help

2004-09-28 Thread Matthew Fonda
Howdy, Regular expressions are a simple way of matching patters. You can learn more about regular expressions in general here: http://www.opengroup.org/onlinepubs/007908799/xbd/re.html If you are interested in using regular expressions in PHP, check out these sites: http://www.php.net/manual/en/r

Re: [PHP] Multiple pages of data.

2004-09-28 Thread Matthew Fonda
oops, forgot to add this, put as first line in the for loop: if ($i == $num_rows) break; On Tue, 2004-09-28 at 22:45, Matthew Fonda wrote: > Or if you wanted to do it all in PHP, without using LIMIT, you could do > something like this. > > I'm not exactly sure how your database is set up, so I ju

[PHP] regular expression help

2004-09-28 Thread Ed Lazor
Today I discovered that my ISP can't upgrade to PHP 5. They use Plesk for server Administration and PHP 5 apparently breaks Plesk. Plesk says they'll make PHP 5 support available as soon as it starts coming default on RedHat Enterprise. Unfortunately, I now have a bunch of scripts that require

Re: [PHP] Multiple pages of data.

2004-09-28 Thread Matthew Fonda
Or if you wanted to do it all in PHP, without using LIMIT, you could do something like this. I'm not exactly sure how your database is set up, so I just used this made this dummy table as the one I will use in this example: create table topics(id int(8) not null auto_increment, topic varchar(30),

Re: [PHP] Error with php

2004-09-28 Thread Jason Davidson
Can you show me an example.. wild guess without knowing what your doing, but, ?> is the escape code to exit php.. so its possible thats what is happening.. but please post some code that cuases this problem. Jason Timothy Johnson <[EMAIL PROTECTED]> wrote: > > This is my first time using php o

Re: [PHP] Multiple pages of data.

2004-09-28 Thread Jason Davidson
Your not totally lost on it, your very cloes to your solution. Keep track of the LIMITs with php, and not mysql. Pass the LIMIT information to the next page, and use some aritihitc to determine the next and prvious limits for the link... so you would have a var called $limit possibly, and your n

[PHP] Error with php

2004-09-28 Thread Timothy Johnson
This is my first time using php on a gentoo system. I seem to be having a problem everytime I use a > it exits out of the code and prints everything after that like as if it was pure text. So I am assuming the php engine doesnt even seen anything after that. Maybe I have something configured wrong

[PHP] Multiple pages of data.

2004-09-28 Thread Nick Patsaros
I'm trying to build a bulletin style system right now. I have topics and replies to each topic. If a topic gets more than 15 replies I want them to start carrying over onto page 2 and then 3 and so on with 15 replies per page. The key that I'm missing I guess is, how do I keep track of the last

Re: [PHP] can't upload files

2004-09-28 Thread raditha dissanayake
blackwater dev wrote: Doesn't print out anything. then try phpinfo() it will tell you everything about your server, your script and data that is being passed to it. Look for anything amiss. print_r() those two variables (and any others you can think of). -- Raditha Dissanayake.

Re: [PHP] apache 2.0.51 and php 5.0.2 static compile

2004-09-28 Thread Curt Zirzow
* Thus wrote Francis Davidson: > I'm sorry to ask a question that I'm sure exists in the documents, but I > have yet to see it? How does one compile php 5.0.2. statically into your > apache 2.0.51 binary, everything, I've seen thus far shows how to create a > php shared module? As far as I can te

[PHP] Re: PHP Web-App Frameworks?

2004-09-28 Thread M Saleh EG
On Tue, 28 Sep 2004 18:09:48 +0400, M Saleh EG <[EMAIL PROTECTED]> wrote: > Anyone with hands on PHP frameworks? > > I tried Mojavi, BlueShoes, GPF, PHP-MVC, and alot of more ( alot of > them are available) > > I need the answer from an experienced programmer( not a php newbie ) > rather an appli

Re: [PHP] RE: [IGNORE] [PHP] Changing mta in /etc/alternatives : how?

2004-09-28 Thread Curt Zirzow
/me puts flame thrower away darn you spoiled all the fun ;) * Thus wrote Graham Cossey: > > Sorry, mailed to the wrong list :( > > -Original Message- > From: Graham Cossey [mailto:[EMAIL PROTECTED] > Sent: 28 September 2004 23:27 > To: Php-General > Subject: [PHP] Changing mta in /etc/a

Re: [PHP] Need some ideas

2004-09-28 Thread Curt Zirzow
* Thus wrote Yoed Anis: > Hi guys, > > OK I need some ideas. > > Somebody created the stupidest XML file I've ever seen. And of > course they can't change it, and I *must* be able to read it. I'm all out of > brain power on thinking how to go about reading it. I typically use > simple

Re[2]: [PHP] Make cron file

2004-09-28 Thread Tom Rogers
Hi, Wednesday, September 29, 2004, 1:18:20 AM, you wrote: JB> [snip] JB> I need make a cron file, for example a .job file: JB> #mi hodimeseq jobcomment JB> 45 11** 0-5 php -q /home/test/test.php # Make backup JB> How can make it?. JB> [

Re: [PHP] classes in php5

2004-09-28 Thread Matthew Fonda
Works fine for me. It still works if you add methods or properties to Foo as well, I'm not sure why it wouldn't work for you, possibly you have another error along the lines somewhere. I am on PHP 5.0.1 BTW On Tue, 2004-09-28 at 19:42, Curt Zirzow wrote: > * Thus wrote Daniel Watrous: > > Hello

Re: [PHP] classes in php5

2004-09-28 Thread Curt Zirzow
* Thus wrote Daniel Watrous: > Hello all, > > I have a class Foo. In PHP4 I could create an instance of Foo in the following > manner: > $className = "Foo"; > $fooInstance = new $className; > > This would yield the same result as: > $fooInstance = new Foo; Can you provide the definition of you

Re: [PHP] classes in php5

2004-09-28 Thread Curt Zirzow
* Thus wrote Maciek Ruckgaber Bielecki: > you are just missing the (); it wont work either in php4 or php5 that > way. > > > $className = "Foo"; > $fooInstance = new $className(); $a = new Foo; Is perfectly valid. Curt -- The above comments may offend you. flame at will. -- PHP General

Re: [PHP] __call and static methods

2004-09-28 Thread Curt Zirzow
* Thus wrote Jackson Miller: > So, now you have found the static method docs, and you have found the > very minimal __call() docs but you have not come close to answering > anything about using call with static methods. > > For those who seem to miss the point, a static method call would be like:

Re: [PHP] can't upload files

2004-09-28 Thread blackwater dev
Doesn't print out anything. On Wed, 29 Sep 2004 05:32:32 +0800, Jason Wong <[EMAIL PROTECTED]> wrote: > On Wednesday 29 September 2004 01:44, blackwater dev wrote: > > > Then, here is part of the code doing the upload: > > To be precise this is the part of the code which handles the upload. The

Re: [PHP] Re: grabbing information from websites

2004-09-28 Thread champinoman
i tried putting in fread() but still getting a blank screen. any other errors in here? http://hiscore.runescape.com/aff/runescape/hiscorepersonal.cgi?username=champinoman","r";); $line = fread ($file, 1024); if (preg_match('#username=champinoman&category=13.*align="right">(.*)#mi',$line,$out))

Re: [PHP] Need some ideas

2004-09-28 Thread Paul Bissex
On Tue, 28 Sep 2004 16:58:07 -0500, Yoed Anis <[EMAIL PROTECTED]> wrote: > Hi guys, > > OK I need some ideas. > > Somebody created the stupidest XML file I've ever seen. And of > course they can't change it, and I *must* be able to read it. I'm all out of > brain power on thinking

[PHP] apache 2.0.51 and php 5.0.2 static compile

2004-09-28 Thread Francis Davidson
I'm sorry to ask a question that I'm sure exists in the documents, but I have yet to see it? How does one compile php 5.0.2. statically into your apache 2.0.51 binary, everything, I've seen thus far shows how to create a php shared module? Thank You -- PHP General Mailing List (http://www.php.n

Re: [PHP] Changing mta in /etc/alternatives : how?

2004-09-28 Thread John Holmes
Graham Cossey wrote: Sorry for the probably basic question, but I would like to change the default mta on my FC2 box from sendmail to exim. I believe to do this I need to change the 'entry' in /etc/alternatives/ to point to /usr/sbin/sendmail.exim instead of /usr/sbin/sendmail.sendmail. Doing a 'ls

Re: [PHP] Loop within Loop help please

2004-09-28 Thread Andrew Kreps
On Tue, 28 Sep 2004 16:22:18 -0300, Eduardo Sampaio <[EMAIL PROTECTED]> wrote: > You missed the $count = 0; > right below it Andrew... his code works just like the modulus one... Whoops, my mistake. I write code, really I do. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] RE: [IGNORE] [PHP] Changing mta in /etc/alternatives : how?

2004-09-28 Thread Graham Cossey
Sorry, mailed to the wrong list :( -Original Message- From: Graham Cossey [mailto:[EMAIL PROTECTED] Sent: 28 September 2004 23:27 To: Php-General Subject: [PHP] Changing mta in /etc/alternatives : how? Sorry for the probably basic question, but I would like to change the default mta on

[PHP] Changing mta in /etc/alternatives : how?

2004-09-28 Thread Graham Cossey
Sorry for the probably basic question, but I would like to change the default mta on my FC2 box from sendmail to exim. I believe to do this I need to change the 'entry' in /etc/alternatives/ to point to /usr/sbin/sendmail.exim instead of /usr/sbin/sendmail.sendmail. Doing a 'ls -al' on /etc/alter

RE: [PHP] Re: Need some ideas

2004-09-28 Thread Yoed Anis
Well, that is one approach. >how about ignoring them? :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Need some ideas

2004-09-28 Thread M. Sokolewicz
Yoed Anis wrote: Hi guys, OK I need some ideas. Somebody created the stupidest XML file I've ever seen. And of course they can't change it, and I *must* be able to read it. I'm all out of brain power on thinking how to go about reading it. I typically use simplexml to read xml and that's w

[PHP] Need some ideas

2004-09-28 Thread Yoed Anis
Hi guys, OK I need some ideas. Somebody created the stupidest XML file I've ever seen. And of course they can't change it, and I *must* be able to read it. I'm all out of brain power on thinking how to go about reading it. I typically use simplexml to read xml and that's where my

Re: [PHP] SF Project: In Need of PHP & MySQL Developers

2004-09-28 Thread Matthew Sims
> I don't know if this is the right place to post this, so my fault if it > isn't. > > I am looking for PHP & MySQL Developers to help create a web-based RPG > written using the latest versions of PHP and MySQL. I unfortunately am > not a programmer, but hope to find programmers that can take my id

Re: [PHP] can't upload files

2004-09-28 Thread Jason Wong
On Wednesday 29 September 2004 01:44, blackwater dev wrote: > Then, here is part of the code doing the upload: To be precise this is the part of the code which handles the upload. The files have already been uploaded and stored by your webserver long before your script starts executing. > It p

[PHP] SF Project: In Need of PHP & MySQL Developers

2004-09-28 Thread Michael Lauzon
I don't know if this is the right place to post this, so my fault if it isn't. I am looking for PHP & MySQL Developers to help create a web-based RPG written using the latest versions of PHP and MySQL. I unfortunately am not a programmer, but hope to find programmers that can take my ideas and tur

Re: [PHP] Re: how to retrieve path to web server files

2004-09-28 Thread Maciek Ruckgaber Bielecki
this could be handy for you: print_r($_SERVER); or phpinfo(); On Tue, Sep 28, 2004 at 04:15:39PM -0400, GH wrote: > does that work for sub directories ... i.e. I have multiple "mini" > sites that I run on my domain and they are just folders underneath... > > I.E. mydom.com > --- mydom.com/123 >

RE: [PHP] Loop within Loop help please

2004-09-28 Thread Jason Davidson
Well, elegance, is in the eye of the beholder !!.. but ya, i certainly wasnt contesting the modulas solutiion, ive used mod in similar cases myself, i was just adding some variety. Jason "Jay Blanchard" <[EMAIL PROTECTED]> wrote: > > [snip] > well, actually, the code resets the count var, so it

Re: [PHP] Loop within Loop help please

2004-09-28 Thread John Nichel
Jay Blanchard wrote: [snip] well, actually, the code resets the count var, so it makes absolutely no difference how many iterations the loop makes, it could iterated indefinately and still function identically. [/snip] That is quite true, but which is more elegant? Whichever way Martha Stewart wo

[PHP] How do you guys validate your xml schema's with php?

2004-09-28 Thread bclem
Just curious to see how "everyone else does it" when it comes to validating your xml against an xsd file. Right now I'm fighting a problem where I don't have DOM installed that would enable me the ability to write my own validator and none of the online validators seem to want to play nice with p

Re: [PHP] Re: how to retrieve path to web server files

2004-09-28 Thread GH
does that work for sub directories ... i.e. I have multiple "mini" sites that I run on my domain and they are just folders underneath... I.E. mydom.com --- mydom.com/123 --- mydom.com/ahr --- mydom.com/subsite4 On Sat, 25 Sep 2004 14:17:50 -0700, Jasper Howard <[EMAIL PROTECTED]> wrote:

Re: [PHP] classes in php5

2004-09-28 Thread Maciek Ruckgaber Bielecki
you are just missing the (); it wont work either in php4 or php5 that way. $className = "Foo"; $fooInstance = new $className(); Cheers On Tue, Sep 28, 2004 at 01:46:27PM -0600, Daniel Watrous wrote: > Hello all, > > I have a class Foo. In PHP4 I could create an instance of Foo in the follow

RE: [PHP] Loop within Loop help please

2004-09-28 Thread Jay Blanchard
[snip] well, actually, the code resets the count var, so it makes absolutely no difference how many iterations the loop makes, it could iterated indefinately and still function identically. [/snip] That is quite true, but which is more elegant? -- PHP General Mailing List (http://www.php.net/) T

Re: [PHP] Re: grabbing information from websites

2004-09-28 Thread Eduardo Sampaio
I agree with Trevor... but if he manages to nvigate to the page and try to parse it, he will end up finding the problem Graham said. He is only reading the first line. He can either use fread or shrink his regex to #align="right">([0-9]*,?[0-9]*)# and make a loop using fgets. The second option is t

Re: [PHP] Loop within Loop help please

2004-09-28 Thread Jason Davidson
Hey, im sorry, i didnt read the other responses to your post, ive posted the same thing... Jason "Jason Davidson" <[EMAIL PROTECTED]> wrote: > > well, actually, the code resets the count var, so it makes absolutely no > difference how many iterations the loop makes, it could iterated > indefin

Re: [PHP] classes in php5

2004-09-28 Thread Andrew Kreps
On Tue, 28 Sep 2004 13:46:27 -0600, Daniel Watrous <[EMAIL PROTECTED]> wrote: > In my efforts to port this over to PHP5 I am having trouble. Not only do I not get > back an > instance of my Foo class, but the script execution stops entirely without so much as > a > warning. My first suggesti

Re: [PHP] Loop within Loop help please

2004-09-28 Thread Jason Davidson
well, actually, the code resets the count var, so it makes absolutely no difference how many iterations the loop makes, it could iterated indefinately and still function identically. Jason Andrew Kreps <[EMAIL PROTECTED]> wrote: > > On Tue, 28 Sep 2004 10:45:19 -0700, Jason Davidson <[EMAIL PRO

[PHP] classes in php5

2004-09-28 Thread Daniel Watrous
Hello all, I have a class Foo. In PHP4 I could create an instance of Foo in the following manner: $className = "Foo"; $fooInstance = new $className; This would yield the same result as: $fooInstance = new Foo; In my efforts to port this over to PHP5 I am having trouble. Not only do I not get

RE: [PHP] __call and static methods

2004-09-28 Thread Jay Blanchard
[snip] So, now you have found the static method docs, and you have found the very minimal __call() docs but you have not come close to answering anything about using call with static methods. [/snip] Sorry, I was just trying to help. -- PHP General Mailing List (http://www.php.net/) To unsubscrib

Re: [PHP] __call and static methods

2004-09-28 Thread Jackson Miller
So, now you have found the static method docs, and you have found the very minimal __call() docs but you have not come close to answering anything about using call with static methods. For those who seem to miss the point, a static method call would be like: $a = Caller::test(1, "2", 3.4, true);

Re: [PHP] Loop within Loop help please

2004-09-28 Thread Eduardo Sampaio
You missed the $count = 0; right below it Andrew... his code works just like the modulus one... On Tue, 28 Sep 2004 12:10:21 -0700, Andrew Kreps <[EMAIL PROTECTED]> wrote: > On Tue, 28 Sep 2004 10:45:19 -0700, Jason Davidson <[EMAIL PROTECTED]> wrote: > > I see lots of references to modulus, whic

Re: [PHP] Loop within Loop help please

2004-09-28 Thread John Nichel
Andrew Kreps wrote: On Tue, 28 Sep 2004 10:45:19 -0700, Jason Davidson <[EMAIL PROTECTED]> wrote: I see lots of references to modulus, which works fantastic.. but how abut just testing if its equal to 20, then there isnt that extra arthmitc call.. this is just another way to do the same thing.. tak

Re: [PHP] __call and static methods

2004-09-28 Thread Maciek Ruckgaber Bielecki
Hmm don't see clearly how could work for static methods :P On Tue, Sep 28, 2004 at 01:39:46PM -0500, Jay Blanchard wrote: > [snip] > Is there a way to get __call to work for static methods? It doesn't > seem to work by default and the docs are pretty sparse. > [/snip] > > Found a little more inf

[PHP] PHP as CGI: Denial of Service?

2004-09-28 Thread Florian Effenberger
Hello there, PHP set up as CGI (either with binfmt and suEXEC or via suPHP) can expose your system to a denial of service attack. Even a very simple page like can bog down a server completely if the reload button on the browser is pressed continously for some seconds. I already tried the RMax

Re: [PHP] Loop within Loop help please

2004-09-28 Thread Andrew Kreps
On Tue, 28 Sep 2004 10:45:19 -0700, Jason Davidson <[EMAIL PROTECTED]> wrote: > I see lots of references to modulus, which works fantastic.. but how > abut just testing if its equal to 20, then there isnt that extra > arthmitc call.. this is just another way to do the same thing.. take > your pick.

Re: [PHP] Loop within Loop help please

2004-09-28 Thread Nick Wilson
* and then Jason Davidson declared > I see lots of references to modulus, which works fantastic.. but how > abut just testing if its equal to 20, then there isnt that extra > arthmitc call.. this is just another way to do the same thing.. take > your pick.. unless someone can see a bad reason

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] __call and static methods

2004-09-28 Thread Jay Blanchard
[snip] Is there a way to get __call to work for static methods? It doesn't seem to work by default and the docs are pretty sparse. [/snip] Found a little more info http://us4.php.net/manual/en/language.oop5.overloading.php x; } } $foo = new Caller(); $a = $foo->test(1, "2", 3.4, true); var_du

RE: [PHP] __call and static methods

2004-09-28 Thread Jay Blanchard
[snip] Is there a way to get __call to work for static methods? It doesn't seem to work by default and the docs are pretty sparse. [/snip] http://us4.php.net/manual/en/language.oop5.static.php may help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/

RE: [PHP] Match Vs Where - Fulltext Search

2004-09-28 Thread Jay Blanchard
[snip] I know this post is lengthy and I apologise for putting you to sleep but I'd really love to get to the bottom of this one sometime soon. Has anyone else experienced similar frustrations searching their databases - I can't be the only one...! [/snip] What you are dealing with here, Michae

[PHP] __call and static methods

2004-09-28 Thread Jackson Miller
Is there a way to get __call to work for static methods? It doesn't seem to work by default and the docs are pretty sparse. Thanks, -Jackson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Make cron file

2004-09-28 Thread Maciek Ruckgaber Bielecki
So I understand, correct me if i am wrong, that your problem is just to append a line to the file ? if that is the case: //open and place pointer at the end of the file $fhandler = fopen("file",'a'); fputs($fhandler,$string_with_code); fclose($fhandler); if not, the case and you are h

[PHP] Match Vs Where - Fulltext Search

2004-09-28 Thread Harlequin
Hi all. It took me some time to discover that you can't use a "MATCH | AGAINST" statement unless you create an fulltext index of the fields to search at the same time. Strange, I know. What's more strange is that as I read more I wonder why people use it because it will only seartch complete w

Re: [PHP] Loop within Loop help please

2004-09-28 Thread Nick Wilson
* and then Jesse Castro declared > [snip] > $count=0; > foreach($someArray as $someVal) { > if($count is divisible by 20 exactly) { > // do some stuff > } > //do some stuff > } > ?> > [/snip] > > if($count is divisible by 20 exactly) > Can be written as > If ($count

Re: [PHP] Loop within Loop help please

2004-09-28 Thread Jason Davidson
I see lots of references to modulus, which works fantastic.. but how abut just testing if its equal to 20, then there isnt that extra arthmitc call.. this is just another way to do the same thing.. take your pick.. unless someone can see a bad reason for this method. $count = 0; foreach . {

[PHP] can't upload files

2004-09-28 Thread blackwater dev
--sorry if you get this twice...it didn't seem to go through the first time-- I just switched hosts and I am now working on all the stuff that once worked but now doesn't. I have an image upload script with the following code: ?method=upload&id='>

Re: [PHP] Loop within Loop help please

2004-09-28 Thread Janet Valade
Nick Wilson wrote: hi everyone, I have a simplified bit of code below: What i'd like to do is have a count inside that loop that will trigger some action every 20 iterations of the foreach. Like this: How might i do that? if($count % 20 == 0 ) { Janet -- Janet Valade -- janet.valade.com --

RE: [PHP] Loop within Loop help please

2004-09-28 Thread Justin Palmer
How might i do that? Something like that. Justin Much thanks... -- Nick W -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Loop within Loop help please

2004-09-28 Thread Nick Wilson
* and then Marek Kilimajer declared > % operator: http://www.php.net/operators Thanks EVERYONE, i feel like i should have known that, but i didnt, my thanks! - and the guy that suggested the other way? that was how i was trying to do it ;-) -- Nick W -- PHP General Mailing List (http://w

Re: [PHP] Loop within Loop help please

2004-09-28 Thread Nick Wilson
* and then Pablo Gosse declared > if ($count%20 == 0) > > http://ca3.php.net/manual/en/language.operators.arithmetic.php in the > manual (look for Modulus). Yes, thankyou very much, got a bunch of similar replys in my personal inbox to ;-) And there was me sifting through the math functions!

Re: [PHP] GNU/Linux & MacOsX Server different behaviour

2004-09-28 Thread Brent Baisley
Reading the man page on a Mac it says that you are trying to set the system date if you provide a date, which you need to be root to be able to do. If you just run your command in the shell, you'll see that you get an operation not permitted error. Using the -r switch you can provide the second

RE: [PHP] Loop within Loop help please

2004-09-28 Thread Jay Blanchard
[snip] What i'd like to do is have a count inside that loop that will trigger some action every 20 iterations of the foreach. Like this: How might i do that? [/snip] With modulus ...http://us2.php.net/manual/en/language.operators.arithmetic.php -- PHP General Mailing List (http://www.php.net/

Re: [PHP] Loop within Loop help please

2004-09-28 Thread Marek Kilimajer
% operator: http://www.php.net/operators Nick Wilson wrote: hi everyone, I have a simplified bit of code below: What i'd like to do is have a count inside that loop that will trigger some action every 20 iterations of the foreach. Like this: How might i do that? Much thanks... -- PHP General Ma

RE: [PHP] Loop within Loop help please

2004-09-28 Thread Pablo Gosse
[snip] I have a simplified bit of code below: What i'd like to do is have a count inside that loop that will trigger some action every 20 iterations of the foreach. Like this: [/snip] if ($count%20 == 0) http://ca3.php.net/manual/en/language.operators.arithmetic.php in the manual (look for Mod

Re: [PHP] Loop within Loop help please

2004-09-28 Thread John Nichel
Nick Wilson wrote: hi everyone, I have a simplified bit of code below: What i'd like to do is have a count inside that loop that will trigger some action every 20 iterations of the foreach. Like this: How might i do that? Much thanks... $count = 0; foreach ( $someArray as $someVal ) { i

[PHP] Loop within Loop help please

2004-09-28 Thread Nick Wilson
hi everyone, I have a simplified bit of code below: What i'd like to do is have a count inside that loop that will trigger some action every 20 iterations of the foreach. Like this: How might i do that? Much thanks... -- Nick W -- PHP General Mailing List (http://www.php.net/) To unsubscr

[PHP] GNU/Linux & MacOsX Server different behaviour

2004-09-28 Thread Francesco Casalena
Hi, I've an Apple G5 Xserve with MacOsX server 10.3 (Darwin 7.3.1) and PHP 4.3.2 and I need to run a PHP script containing this line: Linux: $temp=shell_exec("date 01/01/2004 +%a"); Mac: $temp=shell_exec("date 010104 +%a"); (man date says me how to write correctly date string in bot

Re: [PHP] Make cron file

2004-09-28 Thread Juan Pablo Herrera
sorry, my cuestion is about the construction of the job file with php. I send parameters via POST: day, hours, minute, sentence for execuite with cron. This is cached for a php file that make the job file. Well, my problem is make this php file.I think to use file() for this, but maybe somebody thi

Re: [PHP] simple date/now() question

2004-09-28 Thread Mag
Hi, Thanks for replying. > Just select out records that are NOW() - (24 * 60 * > 60) I just need this for 1 record, when the user logs in I want to know if he has joined more than 1 day back or not... I am looking into php.net/date and php.net/time, but if have an example for me...:-) Tha

Re: [PHP] simple date/now() question

2004-09-28 Thread Jason Davidson
Just select out records that are NOW() - (24 * 60 * 60)or if you use datetime field instead of timestamp, which is prolly better off ofr many reasons, use DATE_SUB(NOW(), INTERVAL 1 DAY) or something similar. you can get timestamps from datetime fields, if that is an issue for you... Jason M

Re: [PHP] How can I formated a PHP script into colored HTML

2004-09-28 Thread Chris Dowell
There's also a pear package that might help you: http://pear.php.net/package/Text_Highlighter Cheers Chris Jason Wong wrote: > On Tuesday 28 September 2004 12:40, [EMAIL PROTECTED] wrote: > > >>How can I make a code into html format like this > > > You can have a look at the highlight_file(

Re: [PHP] Fwd: [SPAM] Plan Ahead. Shop For Life Insuranc

2004-09-28 Thread John Nichel
Justin Patrin wrote: -- Forwarded message -- From: BonusMail from MyPoints <[EMAIL PROTECTED]> Date: Mon, 27 Sep 2004 11:24:19 -0600 Subject: [SPAM] Plan Ahead. Shop For Life Insuranc To: [EMAIL PROTECTED] Why? -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED]

Re: [PHP] Make cron file

2004-09-28 Thread E SA
Juan, Are you trying to do so from inside a PHP script? If that is the case, you could do: $entry = "$min $h $d $m $s $command $comment"; $added = system ("echo $entry >> /var/spool/cron/tabs/$user", $retval); if ($retval) { echo "success"; } else { echo "failure"; } Please notice th

[PHP] Fwd: [SPAM] Plan Ahead. Shop For Life Insuranc

2004-09-28 Thread Justin Patrin
-- Forwarded message -- From: BonusMail from MyPoints <[EMAIL PROTECTED]> Date: Mon, 27 Sep 2004 11:24:19 -0600 Subject: [SPAM] Plan Ahead. Shop For Life Insuranc To: [EMAIL PROTECTED] Justin, your current Point balance is 4,565 Quotes based on a composit

Re: [PHP] Make cron file

2004-09-28 Thread Maciek Ruckgaber Bielecki
I do not understand what is the problem, you just add the the time format as should be and put the following at the beginning of your script: #!/usr/local/bin/php -q (or your path to the php interpreter) then you simply add the line (crontab -e) 0 3 * * * /area_backup/bin/sync.php [args] hope i

Re: [PHP] Make cron file

2004-09-28 Thread John Nichel
Jay Blanchard wrote: At least he is CRON'ing a php script Well, we can't have that. Maybe we can talk the OP to change his question...maybe he can ask how to set up a cron to sync his system clock with a time server. ;) -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- P

RE: [PHP] Make cron file

2004-09-28 Thread Jay Blanchard
[snip] Juan Pablo Herrera wrote: > Hi! > I need make a cron file, for example a .job file: > #mi hodimeseq jobcomment > 45 11** 0-5 php -q /home/test/test.php # Make backup > How can make it?. How about asking on the proper list? Or Go

Re: [PHP] Make cron file

2004-09-28 Thread John Nichel
Juan Pablo Herrera wrote: Hi! I need make a cron file, for example a .job file: #mi hodimeseq jobcomment 45 11** 0-5 php -q /home/test/test.php # Make backup How can make it?. How about asking on the proper list? Or Google? Do we now ad

RE: [PHP] simple date/now() question

2004-09-28 Thread Jay Blanchard
[snip] data like: 20040928170708 20040916163619 etc Anybody have a function for this? or can help? am a bit confused because reading on google I see that there are 2 possible problems as MySql has its own time and PHP its own time (most of the time!) [/snip] http://www.php.net/date http://ww

[PHP] simple date/now() question

2004-09-28 Thread Mag
Hi, I have a field in the db called join_date_time(timestamp 14) which has data like: 20040928170708 20040916163619 etc This keeps track of the customer join date, I need to know if the client has joined in the last 24hrs or more than 24hrs back... Anybody have a function for this? or can he

Re: [PHP] Make cron file

2004-09-28 Thread M. Sokolewicz
Jay Blanchard wrote: [snip] I need make a cron file, for example a .job file: #mi hodimeseq jobcomment 45 11** 0-5 php -q /home/test/test.php # Make backup How can make it?. [/snip] Type crontab -e and the cron file will be openedunl

RE: [PHP] Make cron file

2004-09-28 Thread Jay Blanchard
[snip] I need make a cron file, for example a .job file: #mi hodimeseq jobcomment 45 11** 0-5 php -q /home/test/test.php # Make backup How can make it?. [/snip] Type crontab -e and the cron file will be openedunless you're on a Wind

[PHP] Make cron file

2004-09-28 Thread Juan Pablo Herrera
Hi! I need make a cron file, for example a .job file: #mi hodimeseq jobcomment 45 11** 0-5 php -q /home/test/test.php # Make backup How can make it?. Regards. JP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Re: Mass Mailing Using PHP

2004-09-28 Thread Paul Bissex
On Tue, 28 Sep 2004 14:54:24 +0800, Roger Thomas <[EMAIL PROTECTED]> wrote: > Quoting Manuel Lemos <[EMAIL PROTECTED]>: > > For this reason, during deliveries of messages to many recipients, it is better to > > pause once in a while to let the queue be fully processed and do not stall other > > p

[PHP] files not uploading

2004-09-28 Thread blackwater dev
I just switched hosts and I am now working on all the stuff that once worked but now doesn't. I have an image upload script with the following code: ?method=upload&id='>

[PHP] PHP Web-App Frameworks?

2004-09-28 Thread M Saleh EG
Anyone with hands on PHP frameworks? I tried Mojavi, BlueShoes, GPF, PHP-MVC, and alot of more ( alot of them are available) I need the answer from an experienced programmer( not a php newbie ) rather an application designer or a windows-dna programmer who is into php. I have some sort of unders

RE: [PHP] Re: grabbing information from websites

2004-09-28 Thread Graham Cossey
fgets() will read in from file until end of line or end of file up to the No bytes given. Is there an end of line between the "username=chapinoman" and the "70,277" ? If there is a line break then $line will never contain both strings. You may need to use fread() instead. HTH Graham -Ori

Re: [PHP] Re: grabbing information from websites

2004-09-28 Thread champinoman
i said i was learning this and didnt really understand it. so going by what has been said i have come up with the following but still doesnt want to work. heres what i have: http://hiscore.runescape.com/aff/runescape/hiscorepersonal.cgi?username=champinoman","r";); $line = fgets ($file, 1024)

Re: [PHP] Need help in implementing Payment Gatewaydetails

2004-09-28 Thread Burhan Khalid
suneel wrote: Hi. Any one could tell me about how to implement VeriSign Payment Gateway. I mean I want to know how to implement the AVS and CSC filter settings in test mode and how to convert them in to live mode. Its Very Important Thanks in advance... http://www.php.net/manual/en/

Re: [PHP] submit to a remote form without the use of curl?? Is it possible?

2004-09-28 Thread Brent Clements
Stupid me completely forgot about the socket functions in PHP. Again, that's what I get for having too little coffee last night. Thanks for the help everyone. - Original Message - From: "Chris Shiflett" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, Septem

Re: [PHP] How can I formated a PHP script into colored HTML

2004-09-28 Thread Jason Wong
On Tuesday 28 September 2004 12:40, [EMAIL PROTECTED] wrote: > How can I make a code into html format like this You can have a look at the highlight_file() function. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Intern

Re: [PHP] Testing Response of A Proxy with PHP?

2004-09-28 Thread Nick Wilson
* and then Marek Kilimajer declared > >oookay... i think i understand the page, but how would i imlement that > > $fp = fsockopen ("proxy.server.net", 8080, $errno, $errstr, 30); > if (!$fp) { > echo "$errstr ($errno)\n"; > } else { > fputs ($fp, "OPTIONS * HTTP/1.0\r\nMax-Forwards: 0

Re: [PHP] Website with a Instant Messenger

2004-09-28 Thread Robert Sossomon
Use jabber. They had a web interface over a year ago, and it can be tweaked to operate with or without a locked down registration form. I had some scripts at my old job to handle just this very thing, but alas I did not get a chance to copy them before I left. It's pretty straight forward and

  1   2   >