[PHP] file_exists() behind firewall

2006-06-15 Thread George Pitcher
Hi, I have several websites that are using a common set of pages (to reduce maintenance, development and upgrading) and use configuration files to give the customer the feeling that it is their own unique site. The customers are all universities and use the sites to manage digitisation and copyrig

Re: [PHP] progress monitor in php

2006-06-15 Thread Ruben Rubio Rey
weetat wrote: Hi all , I was using PEAR:HTTP_Upload to upload file in php 4.3.2. Is ok , however i need to display some sort of progress monitor to the user because some file is very large and took some times to upload. I need to inform the users to uploading is in progress. I have searc

Re: [PHP] progress monitor in php

2006-06-15 Thread weetat
Hi all , Thanks for your inputs. I have tried the uber upload progress monitor , look good to me. Thanks all - weetat Richard Lynch wrote: On Thu, June 15, 2006 4:48 am, weetat wrote: I was using PEAR:HTTP_Upload to upload file in php 4.3.2. Is ok , however i need to display some sor

Re: [PHP] Re: File Download Headers

2006-06-15 Thread Chris Shiflett
Richard Lynch wrote: It is possible that all "modern" browsers have given in to whichever johnny-come-lately 'standard' made up the Content-disposition header. The original RFC for it is dated June 1995, so it's not too recent. There are plenty of useful aspects of HTTP not defined in RFC 2616

[PHP] Re: Accepting File Uploads from CURL

2006-06-15 Thread Manuel Lemos
Hello, on 06/15/2006 11:56 AM Brad Bonkoski said the following: > Hello All, > I am using PERL to generate an XML file from a database query. no > problems there. > I then try to use curl to send it to an upload script. > Essentially the command line looks like this: curl -H > 'Content-Type:text/

Re: [PHP] paging results in large resultsets: mysql vs postgresql?

2006-06-15 Thread Richard Lynch
On Thu, June 15, 2006 7:15 pm, D. Dante Lorenso wrote: > Richard Lynch wrote: >> 3. use the built-in "cursor" of PostgreSQL which pre-dates MySQL >> LIMIT and OFFSET clauses, which are non-standard hacks Rasmus >> introduced back in the day. > > Care to elaborate? Cast into context of PDO if y

Re: [PHP] File Download Headers

2006-06-15 Thread Richard Lynch
On Thu, June 15, 2006 10:17 am, Jon Anderson wrote: > Richard Lynch wrote: >> Can any experts on this list explain to me why, despite the >> 1,000,000 >> places that application/octet-stream is documented to work, and has >> always worked, since Mosaic 1.0 days, people manage to find these >> goofb

Re: [PHP] Re: File Download Headers

2006-06-15 Thread Richard Lynch
On Thu, June 15, 2006 7:41 am, Chris Shiflett wrote: > Regardless, I think Content-Disposition is the header you need, not > Content-Type. It is possible that all "modern" browsers have given in to whichever johnny-come-lately 'standard' made up the Content-disposition header. I know for sure it

Re: [PHP] Re: File Download Headers

2006-06-15 Thread Richard Lynch
On Thu, June 15, 2006 3:04 am, Barry wrote: > Richard Lynch schrieb: >> and are all you can find from Google? > O_o > >> Anybody? > What?!? > > > I for myself use this: > header("Content-Type: application/force-download"); > header("Content-Type: application/octet-stream"); > header("Content-Type:

[PHP] Re: Replacing text with criteria

2006-06-15 Thread Rafael
Try with preg_replace('/\d(?!(?>\d*)\))/X', '*', $phone) wich would be a bit more efficient than preg_replace('/\d(?!\d*\))/X', '*', $phone) Jeff Lewis wrote: I have been working on a script to parse a CSV file and in the process I clean out a lot of the garbage not needed but I am a

Re: [PHP] paging results in large resultsets: mysql vs postgresql?

2006-06-15 Thread D. Dante Lorenso
Richard Lynch wrote: 3. use the built-in "cursor" of PostgreSQL which pre-dates MySQL LIMIT and OFFSET clauses, which are non-standard hacks Rasmus introduced back in the day. Care to elaborate? Cast into context of PDO if you can...? Dante -- PHP General Mailing List (http://www.php.net/) T

Re: [PHP] progress monitor in php

2006-06-15 Thread Richard Lynch
On Thu, June 15, 2006 4:48 am, weetat wrote: >I was using PEAR:HTTP_Upload to upload file in php 4.3.2. >Is ok , however i need to display some sort of progress monitor to > the user because some file is very large and took some times to > upload. > I need to inform the users to uploading i

Re: [PHP] serving video files with php

2006-06-15 Thread Richard Lynch
On Thu, June 15, 2006 3:04 am, Andras Kende wrote: > Is there any drawback servings video files through php downloader > script on > high load site? > > Or just straight link to the videos are more efficient? TAANSTAAFL There certainly IS some overhead using PHP downloader script, and a straight

Re: [PHP] Re: Simple blog software... Simple but clean code... suggestions?

2006-06-15 Thread Richard Lynch
On Thu, June 15, 2006 2:17 pm, Micky Hulse wrote: > Barry wrote: >> Well if you have that often this case, i would prefer you code one >> for >> yourself. > > Oh, for sure. I completely agree... For the longest time (i.e. the > college years) I was against using other peoples blog software or > scr

Re: [PHP] A tricky little problem

2006-06-15 Thread Richard Lynch
On Thu, June 15, 2006 4:30 am, Ross wrote: > I have a multiple choice quiz where the questions & answers are > extracted > from an external file > > $q1 = "what is the capital of Scotland "; $a1 = "Edinburgh"; $b1 > ="Glasgow"; > $c1 ="dundee"; $d1 ="Stirling"; $q1_answer = $a1; > $q2 = "what is th

Re: [PHP] generating/transforming HTML so that it 'works' in a flash file

2006-06-15 Thread Jochem Maas
Richard Lynch wrote: > > I suspect the first question would be if Flash people have bothered to > document what HTML subset they support. they do, to a point (although trying to figure out what is supported across all version is painful) and reading what they do apparently support made me cry. >

Re: [PHP] Using PHP/HTML effectivly

2006-06-15 Thread Jochem Maas
Robert Cummings wrote: > On Thu, 2006-06-15 at 03:16, Larry Garfield wrote: >> Another recommendation: Do not, under any circumstances, try to write your >> own >> template engine. All you'll be doing is writing a syntax parser in PHP for >> another syntax that will give you fewer options, less

Re: [PHP] basic php problem

2006-06-15 Thread Richard Lynch
On Thu, June 15, 2006 8:11 am, Ross wrote: > I want to set a page number of a page > > if(!isset($_REQUEST['page'])) { > $page =$_REQUEST['page'] + 1; These two together make no sense at all... If the $_REQUEST['page'] is NOT set, then why use it? It's NOT THERE. > echo "page is ".$page; // th

Re: [PHP] Simple blog software... Simple but clean code... suggestions?

2006-06-15 Thread Anthony Ettinger
echo $_GET['comment'] >> htdocs/comments.html :) On 6/15/06, Micky Hulse <[EMAIL PROTECTED]> wrote: Dave Goodchild wrote: > www.abuddhistpodcast.com and > www.mediamasters.co.uk/dg/insp Cool sites btw! Good work. :)

Re: [PHP] How to run one php app from another?

2006-06-15 Thread Richard Lynch
Just include 'a.php'; and it will get done. On Thu, June 15, 2006 11:11 am, tedd wrote: > Hi gang: > > This seems like so obvious a question, I am reluctant to ask. > > In any event, I simply want my php application to run another, like > so: > > switch (option) >{ >case a: >run a.ph

Re: [PHP] paging results in large resultsets: mysql vs postgresql?

2006-06-15 Thread Richard Lynch
On Thu, June 15, 2006 11:11 am, D. Dante Lorenso wrote: > I just discovered this neat little gem in MySQL which makes it easy to > page large result sets: > > * SELECT SQL_CALC_FOUND_ROWS * > > * SELECT FOUND_ROWS() > > I can't seem to find the equivalent of it in PostgreSQL! The only > o

Re: [PHP] Simple blog software... Simple but clean code... suggestions?

2006-06-15 Thread Micky Hulse
Dave Goodchild wrote: www.abuddhistpodcast.com and www.mediamasters.co.uk/dg/insp Cool sites btw! Good work. :) Cheers, M -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsu

Re: [PHP] Re: Simple blog software... Simple but clean code... suggestions?

2006-06-15 Thread Micky Hulse
Barry wrote: Well if you have that often this case, i would prefer you code one for yourself. Oh, for sure. I completely agree... For the longest time (i.e. the college years) I was against using other peoples blog software or scripts... I would have never learned anything about PHP if it was

Re: [PHP] Simple blog software... Simple but clean code... suggestions?

2006-06-15 Thread Micky Hulse
Dave Goodchild wrote: Use WordPress - clean, css-based, standards-compliant. You can set up a basic site very quickly. If you want me to walk you through an example contact me off list ( [EMAIL PROTECTED] ). I set up two installations, www.abuddhistpodcast.com

Re: [PHP] paging results in large resultsets: mysql vs postgresql?

2006-06-15 Thread tedd
At 11:11 AM -0500 6/15/06, D. Dante Lorenso wrote: >I can't seem to find the equivalent of it in PostgreSQL! The only options I >see are: > > 1. > > TWO queries. The first query will perform a SELECT COUNT(*) ...; and the > second query performs the actualy SELECT ... LIMIT x OFFSET y; > >

[PHP] Re: Replacing text with criteria

2006-06-15 Thread Adam Zey
Jeff Lewis wrote: I have been working on a script to parse a CSV file and in the process I clean out a lot of the garbage not needed but I am a bit stumped on one aspect of this file. It's a list of over 3000 contacts and I'm trying to mask a lot of the information with *. So as I loop through

[PHP] Re: How to run one php app from another?

2006-06-15 Thread Adam Zey
tedd wrote: Hi gang: This seems like so obvious a question, I am reluctant to ask. In any event, I simply want my php application to run another, like so: switch (option) { case a: run a.php; exit; break; case b: run b.php; exit; break; case c: run c.php;

[PHP] How to run one php app from another?

2006-06-15 Thread tedd
Hi gang: This seems like so obvious a question, I am reluctant to ask. In any event, I simply want my php application to run another, like so: switch (option) { case a: run a.php; exit; break; case b: run b.php; exit; break; case c: run c.php; exit; break

[PHP] paging results in large resultsets: mysql vs postgresql?

2006-06-15 Thread D. Dante Lorenso
All, I just discovered this neat little gem in MySQL which makes it easy to page large result sets: * SELECT SQL_CALC_FOUND_ROWS * FROM table LIMIT 10, 10 * SELECT FOUND_ROWS() The neat thing is that SQL_CALC_FOUND_ROWS will cause MySQL to tally up all the rows that WOULD ha

Re: [PHP] Using PHP/HTML effectivly

2006-06-15 Thread Robert Cummings
On Thu, 2006-06-15 at 03:16, Larry Garfield wrote: > > Another recommendation: Do not, under any circumstances, try to write your > own > template engine. All you'll be doing is writing a syntax parser in PHP for > another syntax that will give you fewer options, less flexibility, and worse >

Re: [PHP] basic php problem

2006-06-15 Thread D. Dante Lorenso
Dave Goodchild wrote: if $_REQUEST['page'] is not set, why not do this: $page = isset($_REQUEST['page']) ? $_REQUEST['page'] : 1; (ternary operator) // test, numeric read, with default and bounds checking $page = empty($_REQUEST['page']) ? 1 : intval($_REQUEST['page']); $page = min(max($page, 1

Re: [PHP] progress monitor in php

2006-06-15 Thread Martin Alterisio
2006/6/15, weetat <[EMAIL PROTECTED]>: Hi all , I was using PEAR:HTTP_Upload to upload file in php 4.3.2. Is ok , however i need to display some sort of progress monitor to the user because some file is very large and took some times to upload. I need to inform the users to uploading is i

[PHP] Replacing text with criteria

2006-06-15 Thread Jeff Lewis
I have been working on a script to parse a CSV file and in the process I clean out a lot of the garbage not needed but I am a bit stumped on one aspect of this file. It's a list of over 3000 contacts and I'm trying to mask a lot of the information with *. So as I loop through this list I am check

Re: [PHP] File Download Headers

2006-06-15 Thread Jon Anderson
Richard Lynch wrote: Can any experts on this list explain to me why, despite the 1,000,000 places that application/octet-stream is documented to work, and has always worked, since Mosaic 1.0 days, people manage to find these goofball Content-type: headers that are supposed to work, but only work

Re: [PHP] Accepting File Uploads from CURL

2006-06-15 Thread Rabin Vincent
On 6/15/06, Brad Bonkoski <[EMAIL PROTECTED]> wrote: Hello All, I am using PERL to generate an XML file from a database query. no problems there. I then try to use curl to send it to an upload script. Essentially the command line looks like this: curl -H 'Content-Type:text/xml' -d file.xml serve

[PHP] Accepting File Uploads from CURL

2006-06-15 Thread Brad Bonkoski
Hello All, I am using PERL to generate an XML file from a database query. no problems there. I then try to use curl to send it to an upload script. Essentially the command line looks like this: curl -H 'Content-Type:text/xml' -d file.xml server/up.php for my up.php I am just trying to dump stu

Re: [PHP] Simple class declaration returns error

2006-06-15 Thread Eric Butera
On 6/14/06, Dave M G <[EMAIL PROTECTED]> wrote: I put in a very simple echo statement, just as a place marker before I put in the real code, and just to make sure that the index.php file is successfully including the class. After you fix your parse errors you might take a look at: http://us2.ph

Re: [PHP] can I do this: update table while selecting data from table?

2006-06-15 Thread afan
Yes, you are right, I had to be more carefull about how to write my post. >> Thanks. > > for bruising your ego? or for originally giving 2 suggestions as to better > strategies for doing what you *seemed* to be wanting to achieve - 2 > suggestions > which you blatantly seemed to ignore in favor of

Re: [PHP] can I do this: update table while selecting data from table?

2006-06-15 Thread tedd
At 4:11 PM +0200 6/15/06, [EMAIL PROTECTED] wrote: >Jochem, >You are wrong. I tried and it worked. But, when I asked "can I", I meant >"Am I allowed to do that". The same as many security or other kind >questions where answer is: Yes, it works - but it's NOT correct. > >Yes, I did search php.net bu

[PHP] Re: serving video files with php

2006-06-15 Thread Adam Zey
Andras Kende wrote: Hello, Is there any drawback servings video files through php downloader script on high load site? Or just straight link to the videos are more efficient? Thank you, Andras Kende http://www.kende.com Yes, there is. The PHP downloader script will

Re: [PHP] Re: CMS Typo 3 (Slightly 0T(?))

2006-06-15 Thread Ryan A
Hey! @Barry, Thanks for the info. To answer your Q: nope, never coded a CMS but have a rough (very rough) idea on how it works, I have been coding for years from C->Java->PHP > Top3 is a very big Hammer when you start from > scratch. Thats what i wanted to know... @Nick T, Thanks for the huge a

Re: [PHP] can I do this: update table while selecting data from table?

2006-06-15 Thread Jochem Maas
[EMAIL PROTECTED] wrote: > I wonder why this sarcasm? Why so rude? your original question could have been answered by: a, trying to run the code provided (thats called testing btw) b, reading php.net c, reading mysql.com/docs (or where ever they have the docs this week) my reply not only contain

Re: [PHP] can I do this: update table while selecting data from table?

2006-06-15 Thread Jochem Maas
[EMAIL PROTECTED] wrote: > You are wrong. there's a first for everything, heh. > I tried and it worked. But, when I asked "can I", I meant > "Am I allowed to do that". The same as many security or other kind then say what you mean in future. you already knew that you *can* do it, you should hav

Re: [PHP] can I do this: update table while selecting data from table?

2006-06-15 Thread afan
Jochem, You are wrong. I tried and it worked. But, when I asked "can I", I meant "Am I allowed to do that". The same as many security or other kind questions where answer is: Yes, it works - but it's NOT correct. Yes, I did search php.net but didn't find answer. Yes, I did search mysql.com but did

Re: [PHP] basic php problem

2006-06-15 Thread Dave Goodchild
On 15/06/06, Ross <[EMAIL PROTECTED]> wrote: I want to set a page number of a page if(!isset($_REQUEST['page'])) { $page =$_REQUEST['page'] + 1; echo "page is ".$page; // this echos out page is 1 } The problem is when I try and use $page further down in the body $page is 0 Question

Re: [PHP] basic php problem

2006-06-15 Thread nicolas figaro
nicolas figaro a écrit : Ross a écrit : I want to set a page number of a page if(!isset($_REQUEST['page'])) { $page =$_REQUEST['page'] + 1; echo "page is ".$page; // this echos out page is 1 } The problem is when I try and use $page further down in the body $page is 0 Question 2nd

Re: [PHP] progress monitor in php

2006-06-15 Thread weetat
hi , That gd. However i did not see any upload progress monitor at all. Anybody have any ideas how to implement it? Thanks tedd wrote: At 5:48 PM +0800 6/15/06, weetat wrote: Hi all , I was using PEAR:HTTP_Upload to upload file in php 4.3.2. Is ok , however i need to display some sort of

Re: [PHP] basic php problem

2006-06-15 Thread nicolas figaro
Ross a écrit : I want to set a page number of a page if(!isset($_REQUEST['page'])) { $page =$_REQUEST['page'] + 1; echo "page is ".$page; // this echos out page is 1 } The problem is when I try and use $page further down in the body $page is 0 Question I also get an undefined index no

Re: [PHP] Using PHP/HTML effectivly

2006-06-15 Thread tedd
At 1:14 AM -0700 6/15/06, BBC wrote: >Thank Mr.tedd(I guess you are a man) >I think you should check one of my site http://aztec-indianart.com >while you're surfing this site actually you are visiting one page only with >different variable (see url). >I used many data in html, php, inc, txt, cs

[PHP] basic php problem

2006-06-15 Thread Ross
I want to set a page number of a page if(!isset($_REQUEST['page'])) { $page =$_REQUEST['page'] + 1; echo "page is ".$page; // this echos out page is 1 } The problem is when I try and use $page further down in the body $page is 0 Question I also get an undefined index notice Notice: Un

Re: [PHP] Calculating difference between two days

2006-06-15 Thread afan
Thanks Ted. Very helpfull. -afan > On Wed, June 14, 2006 11:45 am, [EMAIL PROTECTED] wrote: >> I need to calculate no. of days between two dates, actually between >> date stored in DB and today's date. > > If you want to do this via mysql, see: > >

Re: [PHP] CMS Typo 3 (Slightly 0T(?))

2006-06-15 Thread Nick Talbott
Hi Ryan On Thursday 15 June 2006 12:48 pm, Ryan A wrote: > Am looking to start working with a CMS for a large > site, after comparing quite a few CMSs Typo3 comes out > looking very very attractive in features and price. > > Before I commit my time to using it I would like a > quick review from th

Re: [PHP] can I do this: update table while selecting data from table?

2006-06-15 Thread afan
I wonder why this sarcasm? Why so rude? -afan > [EMAIL PROTECTED] wrote: >> ?!?!?!?!?!?! > > I hope youi used str_repeat() to generate that. > >>> >>> seriously though, have you tried it? >>> >>> that said your [probably] better off just doing 1 query: >>> >>> UPDATE members SET member_name

Re: [PHP] Re: File Download Headers

2006-06-15 Thread Barry
Chris Shiflett schrieb: Barry wrote: You can send every header twice, triple. a zillion times if you want. Sure, but you have to know how to use header(): http://php.net/header "By default it will replace, but if you pass in FALSE as the second argument you can force multiple headers of the

Re: [PHP] Re: File Download Headers

2006-06-15 Thread Chris Shiflett
Barry wrote: You can send every header twice, triple. a zillion times if you want. Sure, but you have to know how to use header(): http://php.net/header "By default it will replace, but if you pass in FALSE as the second argument you can force multiple headers of the same type." Regardless

[PHP] Re: readdir problem with white spaces

2006-06-15 Thread Barry
Francisco Morales schrieb: Hello, I the following problem with readdir When I read the directory, if the file has more than one "white spaces", readdir only return me the file with one space ... so if I have on the file system . "ROAD 1 005.JPG" or "ROAD1 0005.JPG" php readdir

RE: [PHP] readdir problem with white spaces

2006-06-15 Thread Jay Blanchard
[snip] When I read the directory, if the file has more than one "white spaces", readdir only return me the file with one space ... so if I have on the file system . "ROAD 1 005.JPG" or "ROAD1 0005.JPG" php readdir return me ROAD 1 005.JPG!! [/snip] Additional white space is ty

Re: [PHP] progress monitor in php

2006-06-15 Thread tedd
At 5:48 PM +0800 6/15/06, weetat wrote: >Hi all , > > I was using PEAR:HTTP_Upload to upload file in php 4.3.2. > Is ok , however i need to display some sort of progress monitor to the user > because some file is very large and took some times to upload. >I need to inform the users to uploading

[PHP] readdir problem with white spaces

2006-06-15 Thread Francisco Morales
Hello, I the following problem with readdir When I read the directory, if the file has more than one "white spaces", readdir only return me the file with one space ... so if I have on the file system . "ROAD 1 005.JPG" or "ROAD1 0005.JPG" php readdir return me ROAD 1 005.JPG

Re: [PHP] mysql + PHP

2006-06-15 Thread tedd
At 2:14 PM +0800 6/15/06, weetat wrote: >Hi all, > > I have SQL query , for example , Select country , name from tbl_chassis > order by country. > > The problem of the sql statement is that , if there are empty value in > country field , it be sorted first . > >How to do sorting the empty value

[PHP] Re: CMS Typo 3 (Slightly 0T(?))

2006-06-15 Thread Barry
Ryan A schrieb: How hard was it for you to learn it? It's like a new language... How useful has it been to you? Very. Depends on what you. When you get into meodul coding you are very near to a extremly useable CMS system. Support when you hit a programming wall? The community is quite help

[PHP] CMS Typo 3 (Slightly 0T(?))

2006-06-15 Thread Ryan A
Hey all, Am looking to start working with a CMS for a large site, after comparing quite a few CMSs Typo3 comes out looking very very attractive in features and price. Before I commit my time to using it I would like a quick review from those of you who have used/use it, as from the docs it says i

Re: [PHP] Calculating difference between two days

2006-06-15 Thread tedd
On Wed, June 14, 2006 11:45 am, [EMAIL PROTECTED] wrote: > I need to calculate no. of days between two dates, actually between > date stored in DB and today's date. If you want to do this via mysql, see:

[PHP] [EMAIL PROTECTED]

2006-06-15 Thread Pham Huu Le Quoc Phuc
-Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Thursday, June 15, 2006 5:20 PM To: Barry Cc: php-general@lists.php.net Subject: Re: [PHP] Re: File Download Headers Barry wrote: > Richard Lynch schrieb: >> and are all you can find from Google? > O_o > >> Anybody? >

Re: [PHP] Re: File Download Headers

2006-06-15 Thread Barry
Jochem Maas schrieb: Barry wrote: Barry, chances are Richard was already initiating downloads when you were still eating from a bottle. I don't think so well because the Zuse had no network capability. I for myself use this: header("Content-Type: application/force-download"); header("Content

Re: [PHP] Re: File Download Headers

2006-06-15 Thread Jochem Maas
Barry wrote: > Richard Lynch schrieb: >> and are all you can find from Google? > O_o > >> Anybody? > What?!? Barry, chances are Richard was already initiating downloads when you were still eating from a bottle. > > > I for myself use this: > header("Content-Type: application/force-download");

[PHP] progress monitor in php

2006-06-15 Thread weetat
Hi all , I was using PEAR:HTTP_Upload to upload file in php 4.3.2. Is ok , however i need to display some sort of progress monitor to the user because some file is very large and took some times to upload. I need to inform the users to uploading is in progress. I have search google ,and fo

Re: [PHP] Simple blog software... Simple but clean code... suggestions?

2006-06-15 Thread Dave Goodchild
On 15/06/06, Micky Hulse <[EMAIL PROTECTED]> wrote: Hi, I am looking for a very simple blog software... I would prefer something that functions well with CSS and is standards compliant. I am getting tired of setting-up the bigger full-featured blogging packages for small/quick/simple sites. It

[PHP] Re: Simple blog software... Simple but clean code... suggestions?

2006-06-15 Thread Barry
Micky Hulse schrieb: Hi, I am looking for a very simple blog software... I would prefer something that functions well with CSS and is standards compliant. I am getting tired of setting-up the bigger full-featured blogging packages for small/quick/simple sites. It would be nice to know what

[PHP] A tricky little problem

2006-06-15 Thread Ross
I have a multiple choice quiz where the questions & answers are extracted from an external file $q1 = "what is the capital of Scotland "; $a1 = "Edinburgh"; $b1 ="Glasgow"; $c1 ="dundee"; $d1 ="Stirling"; $q1_answer = $a1; $q2 = "what is the capital of France"; $a2 = "Lyon"; $b2 ="Paris"; $c2 =

[PHP] Simple blog software... Simple but clean code... suggestions?

2006-06-15 Thread Micky Hulse
Hi, I am looking for a very simple blog software... I would prefer something that functions well with CSS and is standards compliant. I am getting tired of setting-up the bigger full-featured blogging packages for small/quick/simple sites. It would be nice to know what others people prefer.

[PHP] Re: Simulating a POST

2006-06-15 Thread Barry
Man-wai Chang schrieb: Here is the new version: { $NetGeoURL = "http://netgeo.caida.org/perl/netgeo.cgi?target=".$ip; if($NetGeoFP = fopen($NetGeoURL,r)) { ob_start(); fpassthru($NetGeoFP);

[PHP] Re: Simulating a POST

2006-06-15 Thread Barry
Man-wai Chang schrieb: Here is the new version: this should work. Have you tested it? -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Simulating a POST

2006-06-15 Thread Man-wai Chang
Here is the new version: -- .~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org / v \ Simplicity is Beauty! May the Force and Farce be with you! /( _ )\ (Ubuntu 6.06) Linux 2.6.16.20 ^ ^ 16:48:01 up 9 days 2:31 1 user load average: 1.02 1.04 1.00 news://news.3home.net ne

[PHP] Re: Simulating a POST

2006-06-15 Thread Man-wai Chang
Here is the new version: -- .~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org / v \ Simplicity is Beauty! May the Force and Farce be with you! /( _ )\ (Ubuntu 6.06) Linux 2.6.16.20 ^ ^ 16:48:01 up 9 days 2:31 1 user load average: 1.02 1.04 1.00 news://news.3home.net news:

[PHP] Re: Simulating a POST

2006-06-15 Thread Man-wai Chang
It says : everytime page loads submit the form. And since submitting a form is like reloading a page it will go over and over again. Then how could I make it happen once only? I already had a if..then..else to separate the 2 sections of codes. -- .~. Might, Courage, Vision, SINCERITY. h

Re: [PHP] Using PHP/HTML effectivly

2006-06-15 Thread Jochem Maas
Richard Lynch wrote: > On Wed, June 14, 2006 3:28 pm, BBC wrote: >> I used many functions as template to change the html syntax. >> this is one of the function as a sample: >> > function >> tabletag($border="0",$width="100%",$height="100%",$cellpadding = >> "0",$cellspacing="0",$style="") >> { >>

Re: [PHP] Using PHP/HTML effectivly

2006-06-15 Thread BBC
Thank Mr.tedd(I guess you are a man) I think you should check one of my site http://aztec-indianart.com while you're surfing this site actually you are visiting one page only with different variable (see url). I used many data in html, php, inc, txt, css, js and MySQL off course. then I includ

[PHP] serving video files with php

2006-06-15 Thread Andras Kende
Hello, Is there any drawback servings video files through php downloader script on high load site? Or just straight link to the videos are more efficient? Thank you, Andras Kende http://www.kende.com

[PHP] Re: File Download Headers

2006-06-15 Thread Barry
Richard Lynch schrieb: and are all you can find from Google? O_o Anybody? What?!? I for myself use this: header("Content-Type: application/force-download"); header("Content-Type: application/octet-stream"); header("Content-Type: application/download"); Never had any problems with any brows

RE: [PHP] Setting headers for file download

2006-06-15 Thread Richard Lynch
Something else is very very very wrong if Content-type: application/octet-stream does not force a download... http://pastebin your code or something, and we'll look at it. On Tue, June 13, 2006 7:19 pm, Peter Lauri wrote: > Hi, when I do that I do not get any download frame showing up. Can > that

Re: [PHP] mysql + PHP

2006-06-15 Thread weetat
Thank all for your inputs. Yes . the data should be null , really bad data , will try to change database structure. Richard Lynch wrote: On Thu, June 15, 2006 1:14 am, weetat wrote: I have SQL query , for example , Select country , name from tbl_chassis order by country. The problem of

Re: [PHP] Using PHP/HTML effectivly

2006-06-15 Thread Richard Lynch
On Wed, June 14, 2006 3:28 pm, BBC wrote: > I used many functions as template to change the html syntax. > this is one of the function as a sample: > function > tabletag($border="0",$width="100%",$height="100%",$cellpadding = > "0",$cellspacing="0",$style="") > { > print (" border=\"$border\"

Re: [PHP] mysql + PHP

2006-06-15 Thread Richard Lynch
On Thu, June 15, 2006 1:14 am, weetat wrote: >I have SQL query , for example , Select country , name from > tbl_chassis order by country. > > The problem of the sql statement is that , if there are empty value > in > country field , it be sorted first . > > How to do sorting the empty value l

Re: [PHP] Problem with the passthru function

2006-06-15 Thread Richard Lynch
On Wed, June 14, 2006 4:51 am, Venkatesh Babu wrote: > I have a small php file (test.php) whose code is shown > below: > > $retval=1; > $command='/bin/ls'; > passthru($command, $retval); > print("Exit status: " . $retval); > ?> > > This test.php works fine when I execute from comma

[PHP] File Download Headers

2006-06-15 Thread Richard Lynch
Can any experts on this list explain to me why, despite the 1,000,000 places that application/octet-stream is documented to work, and has always worked, since Mosaic 1.0 days, people manage to find these goofball Content-type: headers that are supposed to work, but only work in a handful of browser

Re: [PHP] Simple class declaration returns error

2006-06-15 Thread Dave M G
PHP List, Okay, I've upgraded to php 5 on my home machine, and I'm still getting some syntax errors. Parse error: syntax error, unexpected T_NEW in /home/dave/web_sites/thinkingworks.com/web/database.class on line 5 This is the code producing the error: class database { public static $data

Re: [PHP] Simple class declaration returns error

2006-06-15 Thread Jochem Maas
Dave M G wrote: > PHP List, > > Okay, I've upgraded to php 5 on my home machine, and I'm still getting what version? > some syntax errors. > > Parse error: syntax error, unexpected T_NEW in > /home/dave/web_sites/thinkingworks.com/web/database.class on line 5 > > This is the code producing the

Re: [PHP] Seeking recommendations for use of include()

2006-06-15 Thread Richard Lynch
No. He's saying YOUR code is, more or less, not unlike: Maybe it's more like this: Well, if at some point, you forget to initialize $page, AND IF you have register_globals on, for some reason, perhaps even because you later install some 3rd-party software that needs it, and you integrate t

Re: [PHP] Using PHP/HTML effectivly

2006-06-15 Thread Larry Garfield
On Thursday 15 June 2006 01:50, Richard Lynch wrote: > I can guarantee that somebody on this list is going to be agahst at > this recommendation of such a crude solution -- But it has served me > well for a decade for SIMPLE WEB APPLICATIONS and is much less effort > and more maintainable simply b

[PHP] Re: Simulating a POST

2006-06-15 Thread Barry
Man-wai Chang schrieb: > I hit the script by http://server/haha.php?ip=192.168.1.1 > > But the script entered an endless loop. What's wrong? > > > > > > > This is causing the reload. It says : everytime page loads subm

Re: [PHP] Upgrade to PHP5 on Fedora Core

2006-06-15 Thread nicolas figaro
Dave M G a écrit : PHP List, My hosting service allows me enough access to do things like handle my own upgrades and full administrative access. Usually, because I am more of a web designer than an server administrator, I get their support staff to manage upgrades and installations. However

Re: [PHP] mysql + PHP

2006-06-15 Thread Martin Alterisio
2006/6/15, weetat <[EMAIL PROTECTED]>: Hi all, I have SQL query , for example , Select country , name from tbl_chassis order by country. The problem of the sql statement is that , if there are empty value in country field , it be sorted first . How to do sorting the empty value last ? I

Re: [PHP] Seeking recommendations for use of include()

2006-06-15 Thread Richard Lynch
On Tue, June 13, 2006 9:17 pm, Dave M G wrote: > Richard Lynch wrote: >> The problem with making it dynamic, is that you've just made it >> AWFULLY easy for some Bad Guy to inject their own PHP file into your >> system... >> >> Think about that for awhile. > I have thought about it, and I can only

Re: [PHP] mysql + PHP

2006-06-15 Thread Satyam
Actually, does the country field contains null or an empty string? If it is an empty string this will nor work. Try Control Flow Functions: http://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html Satyam - Original Message - From: "weetat" <[EMAIL PROTECTED]> To: ; "Sat

Re: [PHP] transfer file

2006-06-15 Thread Richard Lynch
On Tue, June 13, 2006 9:55 pm, kristianto adi widiatmoko wrote: > $remote = fopen("http://B/file.txt","w+); HTTP just plain ain't gonna let you open a file up for "writing" -- thank god. Can you imagine the number of websites that would get hacked? [shudder] But if you have FTP access to B, you

Re: [PHP] Seeking recommendations for use of include()

2006-06-15 Thread Larry Garfield
On Wednesday 14 June 2006 21:48, Dave M G wrote: > Jochem, > > > ::index.php > > > > > include $_GET['page']; > > ?> > > Wouldn't strip_tags() eliminate the tags that make this possible? No, because that's not what the hole is. YOUR CODE is include $_GET['page']. That's an easily exploitable