Re: [PHP] Purging old files from directories

2003-08-01 Thread Marek Kilimajer
Verdon vaillancourt wrote: Hi :) I need to write a script that will scan/read a given directory's contents and delete files older than a certain date. Ideally, this will be a script that runs via cron once a week and deletes all files it finds in the directory older than 2 weeks from the curren

Re: [PHP] Trouble getting $HTTP_RAW_POST_DATA

2003-08-01 Thread skate
> Also, print_r() does not include any HTML formatting, so you will need to > look at the source for the page in the browser to make it readable. or your could use ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] [PHP-WIN] http://www.zend.com/manual/function.memory-get-usage.php(fwd)

2003-08-01 Thread Miha Nedok
The function doesn't exist but it should since 4.3.2, i'm using the official win32 builds from PHP. Yes, win32 :) Hmmm... we have to do what we have to do to pay the bills, don't you agree ? :)) -Mike On Wed, 30 Jul 2003, Evan Nemerson wrote: > Date: Wed, 30 Jul 2003 19:32:11 -0700 > From: Ev

Re: [PHP] Undefined variable problem

2003-08-01 Thread Ryan A
IT WORKS!!! Thanks for replying and the solution. Cheers, -Ryan Hello, This is a reply to an e-mail that you wrote on Fri, 1 Aug 2003 at 14:47, lines prefixed by '>' were originally written by you. > Notice: Undefined variable: email1 in > c:phpdevwwwbwhprojectcompare.php > on line 117 > $$tmp

Re: [PHP] Undefined variable problem

2003-08-01 Thread Joona Kulmala
Hello This is the code: $m = 1; while ($line = mysql_fetch_assoc($rs)) { //dumping into an array foreach ($line as $field => $value) { $tmp = $field.$m; $$tmp.= $value; /* This is the error line 117*** */ } $m++; } This is basically so that i can use the a

Re: [PHP] Undefined variable problem

2003-08-01 Thread David Nicholson
Hello, This is a reply to an e-mail that you wrote on Fri, 1 Aug 2003 at 14:47, lines prefixed by '>' were originally written by you. > Notice: Undefined variable: email1 in > c:phpdevwwwbwhprojectcompare.php > on line 117 > $$tmp.= $value; /* This is the error line 117*** */ You a

[PHP] Undefined variable problem

2003-08-01 Thread Ryan A
Hi, This is the following code given to me by Jenniffer Goodie (thank you) which is working great but is throwing this notice: Notice: Undefined variable: email1 in c:\phpdev\www\bwh\project\compare.php on line 117 Notice: Undefined variable: address1 in c:\phpdev\www\bwh\project\compare.php on li

[PHP] Purging old files from directories

2003-08-01 Thread Verdon vaillancourt
Hi :) I need to write a script that will scan/read a given directory's contents and delete files older than a certain date. Ideally, this will be a script that runs via cron once a week and deletes all files it finds in the directory older than 2 weeks from the current date. I do currently have sc

RE: [PHP] Trouble getting $HTTP_RAW_POST_DATA

2003-08-01 Thread Donald Tyler
You should encase the $HTTP_RAW_POST_DATA in print_r() or you will just get the word "Array" printed. But I doubt that will solver your problem because it seems that $HTTP_RAW_POST_DATA is empty. Also, print_r() does not include any HTML formatting, so you will need to look at the source for the p

Re: [PHP] Trouble getting $HTTP_RAW_POST_DATA

2003-08-01 Thread Baroiller Pierre-Emmanuel
Hi, $HTTP_RAW_POST_DATA is an array... with echo you'll only get "array".. To get something into $HTTP_RAW_POST_DATA, you need to "submit" your form before... Your script will only display something if you post the form before. Regards, P.E. Baroiller "John W. Holmes" <[EMAIL PROTECTED]> a écr

RE: [PHP] Frames and variables

2003-08-01 Thread Jay Blanchard
[snip] I have a site that uses frames. On one frame i have buttons to select the language. When user hits the button to select the language it is supposed to change in both frames. Any idea how to do this? [/snip] Please read http://www.w3.org/TR/html4/present/frames.html -- PHP General Mailing

Re: [PHP] Upload scripts timing out

2003-08-01 Thread Marek Kilimajer
check php.ini for max_input_time Josh Abernathy wrote: My current upload script times out too quickly when users are uploading large files. How can I stop this from happening? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Frames and variables

2003-08-01 Thread Kalle Saarinen
Hi, I have a site that uses frames. On one frame i have buttons to select the language. When user hits the button to select the language it is supposed to change in both frames. Any idea how to do this? Thanks -Kalle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Trouble getting $HTTP_RAW_POST_DATA

2003-08-01 Thread John W. Holmes
Balazs Halasy wrote: I need to have the contents of $HTTP_RAW_POST_DATA because of non-regular uploads (from browser to my home-made WevDAV server implementation (done in PHP)). However, no matter what I do, it is always NULL. I guess the following script should return SOMETHING in $HTTP_RAW_POST

[PHP] Trouble getting $HTTP_RAW_POST_DATA

2003-08-01 Thread Balazs Halasy
I need to have the contents of $HTTP_RAW_POST_DATA because of non-regular uploads (from browser to my home-made WevDAV server implementation (done in PHP)). However, no matter what I do, it is always NULL. I guess the following script should return SOMETHING in $HTTP_RAW_POST DATA if "always_popul

FW: [PHP] Search Engine

2003-08-01 Thread Ryan Gibson
Hi, http://www.conceptx.co.uk/rpgproducts/index.php?pid=1 I made this some time ago, it could do with some work (if I remember rightly, it doesn't cut off after X amount of results, what can I say I'm lazy) id does order by relevance but requires indexing after changes. On 2/8/03 12:14 am, "imr

RE: [PHP] Search Engine

2003-08-01 Thread Jay Blanchard
[snip] Does anyone know any free search engine for web application [/snip] Google for "web application"? It's free. Oh, I get it! Google for "free search engine for web application". HTH! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] What is $$

2003-08-01 Thread Ryan A
Hi all, thanks for replying. I guess i have to read the manaul in a little more detail now and also update the manualam using last years one, i didnt think there was a big differience but i guess there is. Thanks again. Cheers, -Ryan We will slaughter you all! - The Iraqi (Dis)information min

Re: [PHP] Multiple targets with fscanf

2003-08-01 Thread Dan Anderson
Is there any reason you couldn't do something like: "); { $li_tag_start_position = strpos($buffer,""); $li_tag_end_position = strpos($buffer,""); $data = substr($buffer,(4 + $li_tag_start_position),(4 + $li_tag_end_position)); $buffer = substr($buffer, (4 + $li_tag_end_position)); } ?> Note that

Re: [PHP] Multiple targets with fscanf

2003-08-01 Thread Marek Kilimajer
Try (untested) $a = fscanf($fp,"%s"); if that does not work use regular expresions Denis 'Alpheus' Cahuk wrote: Hello! I'll get strait to the point: I want to include a header from another site ($fp = fopen("www.something.info/news.html", "r")) using the fscanf command, The headers are in "..."

[PHP] Multiple targets with fscanf

2003-08-01 Thread Denis 'Alpheus' Cahuk
Hello! I'll get strait to the point: I want to include a header from another site ($fp = fopen("www.something.info/news.html", "r")) using the fscanf command, The headers are in "..." tags and I'm usign $a = fscanf($fp, "%s"). the problem is, that if I use this, I get only the first word in the he

[PHP] Search Engine

2003-08-01 Thread imran
Hi, Does anyone know any free search engine for web application imee

[PHP] force load of ldap.conf

2003-08-01 Thread Turbo Fredriksson
It seems like the OpenLDAP libs is forcing a load of the ldap.conf file... In that there's the BASE option (which tells the clients where/what the base is). In my development systems, I use LDAP as database for users etc (together with Kerberos). The problem is that I also run development databas

[PHP] Re: reading variables in other script files

2003-08-01 Thread Craig Roberts
2 ways come to mind - one's messy one isnt! Non-Messy: You could put $var1 into an include file, and include it in both file1.php and file2.php, eg: //Inc.php $var1 = "some value"; //file1.php include('Inc.php'); $var1 == "some value"; //file2.php include('inc.php'); $var1 == "some value"; $va

[PHP] reading variables in other script files

2003-08-01 Thread Kalle Saarinen
Hello I was just wondering how can I get value of a variable in php code located in a different file? ie. I have file1.php wich stores $var1 how can I read the value of $var1 in file2.php I have database and I can put it in there (I quess) but is that the only way? -Kalle -- PHP General Mai

Re: [PHP] Display question

2003-08-01 Thread messju mohr
On Fri, Aug 01, 2003 at 03:00:23AM -0500, John T. Beresford wrote: > Hi All, > > I'm having a hard time wrapping my head around this. I have a query > that returns the following (Sorted by col2): > > col1 col2 > - > house1Com1 > house2Com1 > house3Com2 > hous

RE: [PHP] Re: Opinions on Micro$oft .NET

2003-08-01 Thread Adrian Teasdale
I'd just like to say that I've found this discussion to be very interesting and enlightning. It also makes a change to see people not "microsoft bashing" but taking an objective view on everything. We keep getting more and more requests to develop products for .net because our clients want softwa

[PHP] Re: eval

2003-08-01 Thread Bogdan Stancescu
You can put whatever you want in eval: You could even do this: HTH Bogdan Decapode Azur wrote: Is it possible to put PHP code in eval ? Or just vars ? $string = 'The result of '; eval ($string); ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.

Re: [PHP] Redirect to HTTPS

2003-08-01 Thread Nicholas Robinson
It might also be worth making sure that your web server is configured to force https on this page if this is what you want. Otherwise a user could type the URL in without the HTTPS and still get the page. On Friday 01 Aug 2003 9:20 am, [EMAIL PROTECTED] wrote: > I have a stupid question. > > I

RE: [PHP] Re: include help please

2003-08-01 Thread Ford, Mike [LSS]
> -Original Message- > From: Jennifer Goodie [mailto:[EMAIL PROTECTED] > Sent: 31 July 2003 22:42 > > > if (isset($page)) { > > include $$_GET['page']; > > } else { > > $page = $home; > > include $page; > > } > > > > would that be right? > > or should i use > > > > if (isset($page)) { > >

RE: [PHP] Deleteing one session

2003-08-01 Thread Ford, Mike [LSS]
> -Original Message- > From: Ryan A [mailto:[EMAIL PROTECTED] > Sent: 31 July 2003 00:34 > > > have around 20 sessions setup and want to delete one of them... > eg: > I have the following sessions: Can I just make a little correction to your terminology, as every time I read your questio

Re: [PHP] COUNT(*)

2003-08-01 Thread Richard Baskett
Actually that does retrieve the number of rows.. // Query $query = "SELECT COUNT(*) AS count FROM pet"; // Execute Query $result = mysql_query($query); // Get the result of query named count $count = mysql_result($result,0); echo $count." is the number of rows"; Cheers! Rick In order to seek

[PHP] Multiple targets with fscanf

2003-08-01 Thread Denis 'Alpheus' Cahuk
Hello! I'll get strait to the point: I want to include a header from another site ($fp = fopen("www.something.info/news.html", "r")) using the fscanf command, The headers are in "..." tags and I'm usign $a = fscanf($fp, "%s"). the problem is, that if I use this, I get only the first word in the

Re: [PHP] howto set variablevalue with link?

2003-08-01 Thread Kalle Saarinen
Jep, that did it Thanks! -Kalle - Original Message - From: "Richard Baskett" <[EMAIL PROTECTED]> To: "PHP General" <[EMAIL PROTECTED]> Sent: Friday, August 01, 2003 11:28 AM Subject: Re: [PHP] howto set variablevalue with link? > yeah you can set a variable this way: > > http://www.ex

[PHP] Re: COUNT(*)

2003-08-01 Thread Craig Roberts
use mysql_fetch_rows(); $result="SELECT COUNT(*) FROM pet"; $sql=mysql_query($result); $number_of_rows = mysql_fetch_rows($sql); while ($row=mysql_fetch_array($sql)){ $pet_name=$row['pet_name']; echo ..; } Craig Roberts "Yury B ." <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]

[PHP] COUNT(*)

2003-08-01 Thread Yury B .
Hi I used to use old fashioned mysql quieries but moderm mysql apparently became more flexible so. I want to understand how to use some of the new features like COUNT(*) Let's say I have $result="SELECT COUNT(*) FROM pet"; $sql=mysql_query($result); while ($row=mysql_fetch_array($sql)){

Re: [PHP] howto set variablevalue with link?

2003-08-01 Thread Richard Baskett
yeah you can set a variable this way: http://www.example.com/test.php?var=something This sets the variables $var equal to "something" and you can use them accordingly within your script. If you have safe mode on then you'll need to access the $var variable by using the $_GET array like so: $_GE

[PHP] Re: howto set variablevalue with link?

2003-08-01 Thread Craig Roberts
Yeah - then access the variable in page.php - $_GET['lang'] == "en"; You could then store the language variable in a cookie, session or just pass it from page to page by calling each page with "page.php?lang=xx". Craig Roberts "Kalle Saarinen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL

Re: [PHP] Redirect to HTTPS

2003-08-01 Thread Richard Baskett
This is how I do it: if ($_SERVER['HTTPS']!='on') { header("Location: https://mynet.com/pay.php";); exit; } "It is my ambition to say in ten sentences; what others say in a whole book." - Friedrich Nietzsche > From: [EMAIL PROTECTED] > Date: Fri, 1 Aug 2003 10:20:58 +0200 > To: [EMAIL PROTE

[PHP] howto set variablevalue with link?

2003-08-01 Thread Kalle Saarinen
Hello, I was wondering is it possible to set a variable value with html link? I would like to have link button in my page that changes the language. I thought to set $lang variable with the button and later use it to detedmine what to fetch from the database. What wound be the smartest solution?

[PHP] Redirect to HTTPS

2003-08-01 Thread desa15
I have a stupid question. I need if i be in a http make a redirect to https. Http is a 80 port and ssl is a 443 port if ($HTTP_SERVER_VARS['SERVER_PORT']==80) { header("Location: https://mynet.com/pay.php";); exit; } Is the correct way to do this ??? Exist any function to make this ?

[PHP] Display question

2003-08-01 Thread John T. Beresford
Hi All, I'm having a hard time wrapping my head around this. I have a query that returns the following (Sorted by col2): col1col2 - house1 Com1 house2 Com1 house3 Com2 house4 Com2 house5 Com3 house6 Com3 I would like to display it as shown below: Com 1 house1 - Com1 house2

RE: [PHP] learning php - problem already

2003-08-01 Thread Ford, Mike [LSS]
> -Original Message- > From: CPT John W. Holmes [mailto:[EMAIL PROTECTED] > Sent: 31 July 2003 15:54 > you basically > have this: > > list($k,$v,$key,$value) = array(1=>'abc', 'value'=>'abc', 0=>'a', > 'key'=>'a'); > > So, how this works is that list starts with $value. $value is > at

Re: [PHP] load the PHP script last on the page

2003-08-01 Thread Sek-Mun Wong
I agree with Chris' method, but if you don't have cron, then what I do is a page-based cache. Since weather does not change with every page hit, you could store the parsed page inside a database, or even write it to a flat file, so if the page is hit 100 times an hour, and you do an hourly refresh

Re: [PHP] Re: include help please

2003-08-01 Thread LoonySalmon
nope, it doesn't work. it'll only call up the variables that were specified in my files.inc.php...well so far at least "Curt Zirzow" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > * Thus wrote LoonySalmon ([EMAIL PROTECTED]): > > > > i want to call up my contact page, but how

Re: [PHP] Mysql query and PHP loops

2003-08-01 Thread Nicholas Robinson
On further reflection, my first attempt works for the specific example but may not in the general case. Try using a combination of max( ...id ) and min( ...val2 ) and add t1.val2 to the group by clause. This might work, but I've deleted my test files now! On Friday 01 Aug 2003 7:04 am, Nicholas

Re: [PHP] PHP or CGI in C/C++

2003-08-01 Thread desa15
You can install Zend Optimizer from www.zend.com is free but with comercial license. Perform some optimizations in your code to not compile the same code in each request. Un saludo, Danny

Re: [PHP] jabber - chmod on files

2003-08-01 Thread desa15
To change the rights from a php script put the following lines define('CHMOD_FILES', 0666); //define('CHMOD_DIRS', 0777); @chmod(Your file name, CHMOD_FILES); Un saludo, Danny

<    1   2