[PHP] ICQ # validation

2003-03-04 Thread SLanger
if(ereg(^[0-9]{7,9}$, $_REQUEST[icqnumber])) { print(a-okay!); } else { print(error msg); } Although I'm not too familiar with regexp I'd say the code validates because the icq number you are providing actually confimrs to the pattern. The first seven to nine digits contain only

[PHP] filesave

2003-03-04 Thread Diksha Neel
dear all, hi! i have an html page entry.html in which is a submit button that connect me to check.php on clicking it. but when i click on the validate me button, i get the file download boxthat asks whether i want to save the file on disk or open from current location. and what i want is that on

Re: [PHP] ICQ # validation

2003-03-04 Thread Ales Krajník
Well ... - the {7,9} means that the previous char/group should repeat 7 to 9 times ... - ^ means the beginning of the string - $ means the end of the string So everything, that validates, is 7 to 9 numbers. 123456789 This is a test won't validate - it contains chars instead of $ (end of string)

[PHP] Is anyone use / evaluate lxp before?

2003-03-04 Thread Patrick LOK
Is anyone use / evaluate lxp before? How do u comment this product? rgds ./pl

Re: [PHP] entrycheck

2003-03-04 Thread Hugh Danaher
Add the mysql_error() function to your script and run it again. Could give you some hint at what is wrong. $result = mysql_query($query,$connection) or die(Query failed.mysql_error()); - Original Message - From: Diksha Neel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 03,

Re: [PHP] query strings

2003-03-04 Thread Sunfire
ok i will try to reword the question for you jason.. and i will also now that i have a little bit of time post come code too.. i have a form that takes 17 input text fields and 1 textarea field and gives them to a file called addtolist.php. the addtolist.php file has some error checking (of

[PHP] \n

2003-03-04 Thread John Taylor-Johnston
Nothing fancy. Can't get it to echo ¶ textarea cols=30 rows=5 name=testtextareamary had a little lamb/textarea if ($testtextarea) { $inputresult = str_replace(\n, '¶'.\n, $testtextarea); echo textarea cols=30 rows=5 name=testtextarea$inputresult/textarea; } -- PHP General Mailing List

[PHP] Performance Question

2003-03-04 Thread Patrick Teague
What's the difference in performance between print( file_get_contents(myfile.html) ); and include(myfile.html); is there any particular reason for using one over the other? Patrick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Tried: [PHP] \n

2003-03-04 Thread John Taylor-Johnston
I have also tried: $inputresult = str_replace('\n', '¶\n', $testtextarea); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] \n

2003-03-04 Thread Jon Haworth
Hi John, Nothing fancy. Can't get it to echo ¶ Is that a pilcrow sign? If so, have you tried para; instead, like this: $inputresult = str_replace('\n', 'para;\n', $testtextarea); Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] \n

2003-03-04 Thread John Taylor-Johnston
Jon, Anyone, Paragraph sign actually. I'm filterting some data for MySQL. I need a field delimiter. I don't want to use \n. Contents of each field are on a signel line of text. I have come up with this, unless someone can suggest better: if ($testtextarea) { $inputresult = str_replace(\r, ,

RE: [PHP] Performance Question

2003-03-04 Thread Niklas Lampén
I think that file_get_contents() is quicker, since include() runs what it gets as normal php code. And that gives you the answer to the other question as well. :) Niklas -Original Message- From: Patrick Teague [mailto:[EMAIL PROTECTED] Sent: 4. maaliskuuta 2003 10:57 To: [EMAIL

[PHP] StrPos/stristr

2003-03-04 Thread John Taylor-Johnston
http://www.php.net/manual/en/function.stristr.php http://www.php.net/manual/en/function.strpos.php Input from a textarea name=something I want to scan endless lines of $something. If the First Three characters of any line begin with au: (case insensitive) I want to filter out that line, and let

RE: [PHP] \n

2003-03-04 Thread Niklas Lampén
That should be done like $inputresult = str_replace(\n, para;\n, $testtextarea); unless he really wants to output \n, not line change. ? $foo = lines; print this is\ntwo $foo; ? outputs: this is two lines ? $foo = lines; print 'this is\ntwo lines $foo'; ? outputs: this is\ntwo $foo String

[PHP] question about smarty

2003-03-04 Thread Sunfire
just wondering... does smarty have to be installed on the server where the web site or php scripts it makes are going to be ran... or do you just make the stuff and put on the server like normal php files... --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system

[PHP] Re: filesave

2003-03-04 Thread John Taylor-Johnston
It sounds like .php is not enabled on your server? Diksha Neel wrote: dear all, hi! i have an html page entry.html in which is a submit button that connect me to check.php on clicking it. but when i click on the validate me button, i get the file download boxthat asks whether i want to

[PHP] How to use the fields of an array as individual parameter for a function

2003-03-04 Thread Christian Bartels
Hello! I'm new here on the list. I hope you can help me! :) I have a function foo1 which has a parameter $params. In the function i want to pass $params to another function foo2. if $params is an array the elements should be passed to foo2 as individual parameters. Is this possible? How do i do

[PHP] eval challenge

2003-03-04 Thread neko
- define a string that has a function call in it (that returns a string) that at the time of declaration is not in scope, eg $str = this is the name : \$node-getName(); // $node is _not_ defined currently, so we can't escape out then, later on in the code, this string will be passed to a

[PHP] Downloading files outside the webserver

2003-03-04 Thread Daniel Silva
Hello, I'm currently working on a multi-user filemanager, on which each user has its space on the server and can do all the basic file operations we've all seen. I've looked all over the net and the manual, but I can't seem to find the solution for what I want. The system I'm creating keeps all

[PHP] Re: How to use the fields of an array as individual parameter for a function

2003-03-04 Thread Patrick Schnegg
Hi Instead of worrying how to pass the individual parameters to foo2, simply pass the whole array to it and process it within the function itself. Seems more logical to me. Christian Bartels [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello! I'm new here on the list. I hope you

AW: [PHP] How to use the fields of an array as individual parameter for a function

2003-03-04 Thread Christian Bartels
Ok, but how do i pass the vars to the second function (foo2)? There is not a fixed number of parameters (and so fields in the $params array). --- Gruß CB -Ursprüngliche Nachricht- Von: Jason Paschal [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 4. März 2003 11:03 An: [EMAIL

AW: [PHP] Re: How to use the fields of an array as individual parameter for a function

2003-03-04 Thread Christian Bartels
Yes, i thought about this already. But it is more work for me to do, 'cause i would have to rewrite the constructors of several classes. Anyways i am interested, whether this (pass the elements as variables) is possible in php. --- CB -Ursprüngliche Nachricht- Von: Patrick Schnegg

Re: [PHP] Re: How to use the fields of an array as individual parameter for a function

2003-03-04 Thread Patrick Schnegg
In this case, I would write a third function that processes the array for passing it correctly to foo2. In a way that you will end up with something like this: $object = new foo2(processArray($params)); Have you thought about that? Christian Bartels [EMAIL PROTECTED] wrote in message

Re: [PHP] How to use the fields of an array as individual parameter for a function

2003-03-04 Thread Tom Rogers
Hi, Tuesday, March 4, 2003, 7:52:26 PM, you wrote: CB Hello! CB I'm new here on the list. I hope you can help me! :) CB I have a function foo1 which has a parameter $params. In the function i want CB to pass $params to another function foo2. if $params is an array the CB elements should be

AW: [PHP] Re: How to use the fields of an array as individual parameter for a function

2003-03-04 Thread Christian Bartels
Sure. But how do i return the array elements of $params as individual parameters from processArray? Any code? Would be great. --- CB -Ursprüngliche Nachricht- Von: Patrick Schnegg [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 4. März 2003 11:40 An: [EMAIL PROTECTED] Betreff: Re: [PHP]

AW: [PHP] How to use the fields of an array as individual parameter for a function

2003-03-04 Thread Christian Bartels
Mh...i need this for a class loader. Could you post your class loader? (i do not want to invent the wheel again) Thanks! --- Gruß CB -Ursprüngliche Nachricht- Von: Tom Rogers [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 4. März 2003 11:49 An: Christian Bartels Cc: [EMAIL PROTECTED]

Re: [PHP] eval challenge

2003-03-04 Thread Dan Hardiker
- define a string that has a function call in it (that returns a string) that at the time of declaration is not in scope, eg $str = this is the name : \$node-getName(); // $node is _not_ defined currently, so we can't escape out Ya have 2 options really (from my perspective): 1. Place in

AW: [PHP] How to use the fields of an array as individual parameter for a function

2003-03-04 Thread Christian Bartels
Mh...this works great! Thanks a lot! --- Gruß CB -Ursprüngliche Nachricht- Von: Tom Rogers [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 4. März 2003 11:49 An: Christian Bartels Cc: [EMAIL PROTECTED] Betreff: Re: [PHP] How to use the fields of an array as individual parameter for a

RE: [PHP] question about smarty

2003-03-04 Thread Rich Gray
just wondering... does smarty have to be installed on the server where the web site or php scripts it makes are going to be ran... or do you just make the stuff and put on the server like normal php files... No, the Smarty classes and plugins will have to be installed/accessible on the target

Re: [PHP] eval challenge

2003-03-04 Thread neko
Thanks for your time, Dan. Currently, I'm using defined tags for replacing info from my CMS, eg: $str = ofa-core:siteMapLink/ Then I have a function that has all the objects in scope, and can perform the necessary replacements. I am prototyping some stuff with smarty, but so far have yet to

Re: AW: [PHP] How to use the fields of an array as individual parameter for a function

2003-03-04 Thread Tom Rogers
Hi, Tuesday, March 4, 2003, 8:53:25 PM, you wrote: CB Mh...i need this for a class loader. CB Could you post your class loader? (i do not want to invent the wheel again) CB Thanks! This works for me to load modules in a base class so adapt it as you need. ? class loaderClass { var

[PHP] Re: How to use the fields of an array as individual parameter for a function

2003-03-04 Thread Dimitris Kossikidis
I suppose that argc argv variables should be supported in future releases of php. At this time only cgi php supports this feature. Am i wrong? Christian Bartels [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello! I'm new here on the list. I hope you can help me! :) I have a

Re: [PHP] eval challenge

2003-03-04 Thread Dan Hardiker
Currently, I'm using defined tags for replacing info from my CMS, eg: $str = ofa-core:siteMapLink/ Then I have a function that has all the objects in scope, and can perform the necessary replacements. ok ... what would ofa-core:siteMapLink/ represent? The output of $ofa-core-siteMapLink();?

AW: [PHP] Re: How to use the fields of an array as individual parameter for a function

2003-03-04 Thread Christian Bartels
Well, Tom Rogers already posted this solution and it works great: $num = count($params); $vars = '$object = new foo2('; if($num 0) { $i = 0; foreach($params as $var){

Re: [PHP] ICQ # validation

2003-03-04 Thread Hans Prins
Also, don't forget to escape the $ character in your expression, since it is reserved for variable declaration. Ales KrajníK [EMAIL PROTECTED] schreef in bericht news:[EMAIL PROTECTED] Well ... - the {7,9} means that the previous char/group should repeat 7 to 9 times ... - ^ means the

[PHP] Re: question about smarty

2003-03-04 Thread David Eisenhart
You just put the smarty files on the server like you would load up your php files. Note that a common gotcha is when safe mode is enabled on the server - smarty will not ,by default, run in this case; the resolution is simple and is explained in the smarty manual. David Eisenhart Sunfire

Re: [PHP] eval challenge

2003-03-04 Thread neko
ok ... what would ofa-core:siteMapLink/ represent? The output of $ofa-core-siteMapLink();? If your using XML throughout - have you looked at XSLT transformations? It's just a symbolic name - the output is created from a few different objects within the CMS, but it was such a commonly used set

Re: [PHP] Getting Numerical Index of a Key

2003-03-04 Thread Justin French
on 04/03/03 5:47 PM, Matt Honeycutt ([EMAIL PROTECTED]) wrote: I'm just going to spend the extra 5 minutes and rewrite that little chunk of code. Sounds like the right move :) Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Keeping existing data in textarea's

2003-03-04 Thread Justin French
Here's a quick sample of how you can structure a form, and all it's validation, and all it's error messages, and thankyou notes all onto one script. I haven't included every little line and data check that I should (otherwise you'd have to pay me :P), but it works. The beauty of keeping it all

Re: [PHP] Downloading files outside the webserver

2003-03-04 Thread Marek Kilimajer
create a download php file: ?php $res=mysql_query(select * from user_files where filename='$GET['file']'); if($res mysql_num_rows($res)) { $file=mysql_fetch_assoc($res); if($_GET['downaload']) { header('Content-Type: application/octet-stream'); header('Content-disposition:

Re: [PHP] StrPos/stristr

2003-03-04 Thread Marek Kilimajer
$lines=explode(\n,$something); foreach($lines as $line) { if(eregi('^au: (.*)$',$line,$m)) { $au=$m[1]; // you may want to break here } } John Taylor-Johnston wrote: http://www.php.net/manual/en/function.stristr.php http://www.php.net/manual/en/function.strpos.php Input from

Re: [PHP] Downloading files outside the webserver

2003-03-04 Thread Daniel Silva
That is a very nice solution, the problem is, the files are stored on disk, not on the DB. I suppose it can be addapted to work with the disk, can't it? Cheers, Daniel Marek Kilimajer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] create a download php file: ?php

Re: [PHP] Using PHP to Generate a CSS Style Sheet

2003-03-04 Thread Justin French
on 04/03/03 5:37 PM, Phillip S. Baker ([EMAIL PROTECTED]) wrote: I would like to use PHP to make calls from a DB and generate a CSS file. Anyone have any ideas on doing this? every day :) PHP is some kind of programming language which is PARSED by PHP. The result is a TEXT FILE of some

[PHP] mail() function

2003-03-04 Thread Denis L. Menezes
Hello friends, Can the mail() function send emails to multiple addresses which are formatted as follows : [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED] etc with a comma or a semicolon between them? Thanks Denis

Re: [PHP] Downloading files outside the webserver

2003-03-04 Thread Marek Kilimajer
Yes, sure, but you many times won't know the mime type and might be forced to use application/octet-stream. You can do if(dirname(realpath($user_files_dir . $_GET['filename'])) == $user_files_dir) as a security check Daniel Silva wrote: That is a very nice solution, the problem is, the files

Re: [PHP] pharse file random work with -n lines

2003-03-04 Thread Marek Kilimajer
while(list ($adnr, $user, $date, $listed, $hlong, $eins, $zwei, $drei, $vier, $usern, $locst, $locstaa, $locc, $funf, $sech, $email, $Url, $ClassCat, $ClassCat2, $Headstart, $Headend, $Descrip, $End1, $Endzwei, $End3, $Endvier, $Endfunf, $Endsech, $Endsieben, $Endacht, $Endne, $dreizwei,

[PHP] Re: mail() function

2003-03-04 Thread Patrick Schnegg
The mail() function will only send one mail at a time, to send multiple mails you would write a loop like this (presuming you had your mail addresses ready in an array called $emails): foreach ($emails as $email) { mail($email, your subject, your message); } Denis L. Menezes [EMAIL

Re: AW: [PHP] How to use the fields of an array as individual parameter for a function

2003-03-04 Thread Jason Wong
On Tuesday 04 March 2003 18:24, Christian Bartels wrote: Ok, but how do i pass the vars to the second function (foo2)? There is not a fixed number of parameters (and so fields in the $params array). You can do something along these lines: function doo($args) { // these are the default

Re: [PHP] Re: mail() function

2003-03-04 Thread Jason Wong
On Tuesday 04 March 2003 21:13, Patrick Schnegg wrote: The mail() function will only send one mail at a time, to send multiple mails you would write a loop like this (presuming you had your mail addresses ready in an array called $emails): foreach ($emails as $email) { mail($email, your

[PHP] PHP OOP design question

2003-03-04 Thread Joseph Szobody
I have several web projects that are all database driven. I have recently been diving into OOP, and rewriting a lot of procedural code in OOP. I have a design question about handling the MySQL connection. I have a mysql() class which handles all my queries, automatic inserts/updates, etc. Just

[PHP] Re: mail() function

2003-03-04 Thread Patrick Schnegg
Just in case you don't know, you can easily make an array out of your string of emails by exploding using the commas as separators: $emails = explode (,, $stringOfEmails); Patrick Schnegg [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The mail() function will only send one mail at a

Re: [PHP] Re: mail() function

2003-03-04 Thread Patrick Schnegg
Oh, silly me. Commas are indeed accepted. My apologies. - Original Message - From: Jason Wong [EMAIL PROTECTED] Newsgroups: php.general To: [EMAIL PROTECTED] Sent: Tuesday, March 04, 2003 2:18 PM Subject: Re: [PHP] Re: mail() function On Tuesday 04 March 2003 21:13, Patrick Schnegg

[PHP] Truncating text

2003-03-04 Thread Sebastian
Good morning all. I have a mysql query that fetches some text. I am limiting the results to two (2). Then i am limiting the text to 30 characters and truncating it with some Like this: if(strlen($title) = 30) { $title = substr(trim($title),0,30); $title = $title.'..'; } But when a $title

[PHP] Re: Truncating text

2003-03-04 Thread Dimitris Kossikidis
Just run this query avoiding all this php code SELECT SUBSTRING( MyFieldName, 0, 30 ) FROM MyTable Substring( fieldname, starting position, length ) Sebastian [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Good morning all. I have a mysql query that fetches some text. I am

[PHP] Doing a Multiple Search

2003-03-04 Thread Hunter, Jess
I know this must be an easy solution, just not seeing what it is. I have tried to add several options to the below code but can't seem to get it right. Here is the Base Line I am working with: $Query=SELECT * from $TableName WHERE lastname='$Array[lastname] AND firstname='$Array[firstname]' ;

RE: [PHP] Re: mail() function

2003-03-04 Thread M.A.Bond
Not strictly true, the mail function will send to multiple email addresses separated by a comma, you can also cc and bcc by using headers. See the manual, which has some good examples of this. Mark -Original Message- From: Patrick Schnegg [mailto:[EMAIL PROTECTED] Sent: 04 March 2003

[PHP] Re: PHP OOP design question

2003-03-04 Thread neko
Answer - use PEAR for both your database connection and as a data modeling layer: http://pear.php.net check the documentation for more info. neko Joseph Szobody [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have several web projects that are all database driven. I have recently

Re: [PHP] Doing a Multiple Search

2003-03-04 Thread Marek Kilimajer
There have been plenty answers for this, search the archives. Hunter, Jess wrote: I know this must be an easy solution, just not seeing what it is. I have tried to add several options to the below code but can't seem to get it right. Here is the Base Line I am working with: $Query=SELECT *

Re: [PHP] PHP OOP design question

2003-03-04 Thread Ernest E Vogelsinger
At 14:24 04.03.2003, Joseph Szobody spoke out and said: [snip] I have several web projects that are all database driven. I have recently been diving into OOP, and rewriting a lot of procedural code in OOP. I have a design question about handling the MySQL

Re: [PHP] question about smarty

2003-03-04 Thread Sunfire
k then that wont be able to be a choice for me then... will try maguma studio then.. - Original Message - From: Rich Gray [EMAIL PROTECTED] To: Sunfire [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, March 04, 2003 5:58 AM Subject: RE: [PHP] question about smarty just

Re: [PHP] Splitting up big strings

2003-03-04 Thread Chris Hayes
At 19:17 26-2-03, you wrote: On Thu, 27 Feb 2003 01:02:54 +0800, Jason Wong wrote: On Thursday 27 February 2003 00:54, {R}ichard Ashton wrote: I have the body ov a Usnet article, all of it, in $body. I want to split it into lines. I have tried $lines = explode( X, $body); where I have used

[PHP] using preg_match to extract information from pop3

2003-03-04 Thread Henry Grech-Cini
Hi All, I know that you will probably tell me to RTFM but I have (several times) and I cannot quite understand it! So failing that I turn to you for help. I know that this is very trivial but please humour me. I have a line containing From: Henry henry @ .com (please ignore any spaces

[PHP] Remember scrolled position

2003-03-04 Thread Lars Espelid
I'm trying to implement the following functionality into the file test.php: When I scroll down the page and then hit a button, the page should remember the scrolled position, refresh the page and then scroll down to the remembered position. If I knew how many form-schemas there would be on the

Re: [PHP] Doing a Multiple Search

2003-03-04 Thread Ernest E Vogelsinger
At 14:50 04.03.2003, Hunter, Jess spoke out and said: [snip] Here is the Base Line I am working with: $Query=SELECT * from $TableName WHERE lastname='$Array[lastname] AND firstname='$Array[firstname]' ; What I ant to be able to do is a search on both the

[PHP] CLI Current Directory

2003-03-04 Thread Adam Voigt
Anyone know how you would get the directory a user is in when they call a command line PHP script (assuming it's on the path)? Like if I execute prog1 and I'm in /usr, and prog1 is in /usr/local/bin, getcwd() will return /usr/local/bin instead of /usr, I need to reverse this behavior.

Re: [PHP] CLI Current Directory

2003-03-04 Thread Adam Voigt
Crap, just noticed, execute php with -C and it won't change dir's. On Tue, 2003-03-04 at 09:26, Adam Voigt wrote: Anyone know how you would get the directory a user is in when they call a command line PHP script (assuming it's on the path)? Like if I execute

Re: [PHP] question about smarty

2003-03-04 Thread rush
Sunfire [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] k then that wont be able to be a choice for me then... will try maguma studio then.. I think you have misunderstood the posting, since Smarty can be used in most web hosting environments. Anyway if you would like to evaluate

[PHP] maguma problems with php 4.3 and apache

2003-03-04 Thread Sunfire
hi.. went and installed maguma that has php 4.3 in it and then went to start apache up again after setting up the new php.ini file.. and ran into a few problems.. i keep getting a warning from php: php warning: cant load dynamic library c:\program files\maguma\php\extensions\php_dbg.dll a device

Re: [PHP] question about smarty

2003-03-04 Thread Sunfire
sigh well im sort of crashed my web server right now because maguma decided to mess up a few things with extensions and now dont know how to fix it.. but once i get that fixed i guess i can try smarty and see how that goes.. - Original Message - From: rush [EMAIL PROTECTED] To: [EMAIL

RE: [PHP] maguma problems with php 4.3 and apache

2003-03-04 Thread Barajas, Arturo
Let's check: 1. Do you have that file? I think that maguma needs it, but I'm not sure, since I haven't used it. 2. Do you have the extension_dir pointing to the place where the files should be? Extracted from php.ini: ; Directory in which the loadable extensions (modules) reside. extension_dir

[PHP] Re: Remember scrolled position

2003-03-04 Thread Patrick Schnegg
I would tend to make this with common html using named anchors. Just enclose every button with a an anchor and define its name numbering it with php. Then simply make sure that when the button is pressed that number is appended to the url so it will look like yourdocument.php?yourdata=blah#5

[PHP] Variables / Memory Allocation

2003-03-04 Thread Adam Voigt
Ok, first, is there any difference in respect to memory or CPU speed between defining a variable with define() and addressing it without a $, and simply using $var = whatever. Second, putting good programming practices aside, what is the cost in CPU speed for unsetting a variable after

[PHP] strange problem

2003-03-04 Thread Denis L. Menezes
Hello friends, Following is the part html output of my page got from View-source in IE. The problem is that I gate a big blank gap on the output page from the top until about 10 lines height and only then the table is displayed. As you see I have no BR tags here. Can someone tell me why I get

Re: [PHP] Downloading files outside the webserver

2003-03-04 Thread Daniel Silva
There's actually a function in (PHP 4 = 4.3.0) that returns a file's MIME type. Here it is: string mime_content_type ( string filename) Marek Kilimajer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Yes, sure, but you many times won't know the mime type and might be forced to use

Re: [PHP] strange problem

2003-03-04 Thread 1LT John W. Holmes
Look for anything outside of the tr or td tags in the rest of your table. That's generally what causes things like this. ---John Holmes... - Original Message - From: Denis L. Menezes [EMAIL PROTECTED] To: PHP general list [EMAIL PROTECTED] Sent: Tuesday, March 04, 2003 10:40 AM Subject:

[PHP] PHP OpenSSL question

2003-03-04 Thread Pierre-Luc Soucy
Hi, I have loaded the appropriate keys: //load keys $ca_file = openssl_x509_read('file://'.$ca_file); $public_key = openssl_pkey_get_public('file://'.$public_key_file); $private_key = openssl_pkey_get_private('file://'.$private_key_file); and can successfully encrypt data: $to_send = '?xml

[PHP] Problems to log into my application as an Admin

2003-03-04 Thread Ricardo Fitzgerald
Hi to all, I designed an application for managing mailing lists, but something really strange happened, I logged in as an admin only once and then it only allows me to log as a regular user, if I try to use the admin user it keeps returning the error messages. I used sessions to distinguish

[PHP] Testing for installed components....

2003-03-04 Thread Christopher Ditty
I am trying to write a small script that will test and report what PHP components are available on a given server. Is there a quick and easy way to do this? I know about php info, but I would prefer to have something that will spit hte information out in my format where the user can easily

RE: [PHP] Doing a Multiple Search

2003-03-04 Thread Justin Michael Couto
Hunter, What you need to do is this: $Query=SELECT * from $TableName WHERE lastname='$Array[lastname]' OR firstname='$Array[firstname]' ; That will get the functionality you are looking for. You might also want to consider doing this: $Query=SELECT * from $TableName WHERE lastname LIKE

[PHP] http benchmark tools

2003-03-04 Thread Tamas Arpad
Hi, I'm searching for a good http benchmark tool. Of course I found some, but don't know them and don't know which one to choose. I found JMeter slow, in other aspects it would be perfect. Used httperf before, but I need more complicated test cases. I'd like to simulate visitors who first go to

Re: [PHP] pharse file random work with -n lines

2003-03-04 Thread Marek Kilimajer
Sorry, I forgot about the random part. Append the lines to an array, and then use array_rand: while($tmp= fgetcsv($fp,5,\|)) { $array[]=$tmp; } $rand_array=array_rand($array, 10); WebDev wrote: Yes it works here only this way \| but I have not figuered it to return it random -

[PHP] form submit oddities?

2003-03-04 Thread Ray
i have posted the question to phpMyAdmin user list already and after talking with someone about my problem, it looks like its not in the phpMyAdmin, but in my settings for php, but they seemed to have no clue as to what. anyways, with a clean install of phpMyAdmin 2.4.0 we can't query the

[PHP] short_open_tags = On

2003-03-04 Thread Keith Mastin
I was asked to change this in the php.ini file by a user to make it easier to use php on the server. Before doing so, I thought I better ask if there's any know security implications. I checked the wiki, and it showed that there are 31 instances of this, but didn't actually show any. :) The

Re: [PHP] http benchmark tools

2003-03-04 Thread Tamas Arpad
On Tuesday 04 March 2003 17:43, Jason k Larson wrote: How about Apache Bench? http://httpd.apache.org/docs/programs/ab.html It's really a cool program, but too simple. I need to simlute requests that are normally made by visitors, not just stress one url. For example: main page-click on a

[PHP] Re: using preg_match to extract information from pop3

2003-03-04 Thread Henry Grech-Cini
Hi All, This has to be easy to do using preg_match! Can no one spare a minute of their time? Henry Henry Grech-Cini [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi All, I know that you will probably tell me to RTFM but I have (several times) and I cannot quite understand it!

Re: [PHP] http benchmark tools

2003-03-04 Thread Gerard Samuel
This is what I use - http://www.joedog.org/siege/index.shtml Tamas Arpad wrote: Hi, I'm searching for a good http benchmark tool. Of course I found some, but don't know them and don't know which one to choose. I found JMeter slow, in other aspects it would be perfect. Used httperf before, but I

Re: [PHP] http benchmark tools

2003-03-04 Thread Jason k Larson
How about Apache Bench? http://httpd.apache.org/docs/programs/ab.html -- Jason k Larson Tamas Arpad wrote: Hi, I'm searching for a good http benchmark tool. Of course I found some, but don't know them and don't know which one to choose. I found JMeter slow, in other aspects it would be perfect.

[PHP] Re: using preg_match to extract information from pop3

2003-03-04 Thread Henry Grech-Cini
I tried if(preg_match(/^From:(.*)$/, $headers[$line], $info)) { echo [; print_r($info); echo ]; echo PRE,HtmlSpecialChars($headers[$line]),/PRE; } But all I get is [Array ( [0] = From: [1] = ) ] From: Henry henry @ .com Any pointers? Henry Grech-Cini [EMAIL

[PHP] Re: Remember scrolled position

2003-03-04 Thread Lars Espelid
I've tried this and it works fine, but then the user must click the anchor-link on the top of the page each time he has submitted a form. This is not what I want. I would like the page to scroll down automatically. Is it possible to click the anchor-link automatically? If so this could be a

Re: [PHP] short_open_tags = On

2003-03-04 Thread Rasmus Lerdorf
No, there are no security implications. In fact, it is arguably more secure to have short tags enabled as it is then less likely for someone to accidentally expose their PHP source code since everything between ? and ? will be parsed by PHP. However, keep in mind that XHTML and XML also uses

Re: [PHP] http benchmark tools

2003-03-04 Thread Tamas Arpad
Experimenting with it, thanks! Arpi This is what I use - http://www.joedog.org/siege/index.shtml Tamas Arpad wrote: Hi, I'm searching for a good http benchmark tool. Of course I found some, but don't know them and don't know which one to choose. I found JMeter slow, in other

Re: [PHP] pharse file random work with -n lines

2003-03-04 Thread WebDev
the last script gives me no error but it returns nothing on the page only empty - Original Message - From: Marek Kilimajer [EMAIL PROTECTED] To: WebDev [EMAIL PROTECTED] Sent: Tuesday, March 04, 2003 9:11 AM Subject: Re: [PHP] pharse file random work with -n lines You don't need to

Re: [PHP] pharse file random work with -n lines

2003-03-04 Thread Marek Kilimajer
I'm not sure what is wrong, you should add print_r function in different places to see if the variables really contain what they should. WebDev wrote: the last script gives me no error but it returns nothing on the page only empty - Original Message - From: Marek Kilimajer [EMAIL

RE: [PHP] Problems to log into my application as an Admin

2003-03-04 Thread Ricardo Fitzgerald
I'm hosting at a hosting provider, that's not my ISP which is Bellsouth. They are ezoshosting.com. Thank you Rick Off Price Closeouts 1700 W 8 Ave Miami, FL 33010 (305) 888 2555 FAX (305) 884 1761 -Mensaje original- De: Denis L. Menezes [mailto:[EMAIL PROTECTED] Enviado el: Tuesday,

[PHP] Re: using preg_match to extract information from pop3

2003-03-04 Thread Henry Grech-Cini
Found a solution if (preg_match(/Form:[ ]*(.+)[ ]*(.+)/, Form:Henry [EMAIL PROTECTED], $info)) { print_r($info); } else print Pattern not found; but I'm refining it so that it doesn't need the last bit, any more pointers appreciated!!! Thanks All Henry Henry Grech-Cini [EMAIL PROTECTED]

[PHP] regex makes my head hurt

2003-03-04 Thread Kris Jones
I've been attempting to figure out regex, and I've realized I need to start over from scratch. And get lots of help! I'm inputting a text file containing html which will contain this: a href=/q?s=IBMd=tIBM/a/font/tdtd nowrap align=center font face=arial size=-12:59pm/font/td td nowrapfont

Re: [PHP] deciperhing oop

2003-03-04 Thread Greg Beaver
PHP 5 will allow your assumption, i.e. $db will resolve to the $db in the class namespace. If you also have a global variable named $db, you can refer to it using main::$db, instead of using the global statement. Pretty slick, if you ask me. By the way, check out PEAR's DB and MDB classes,

[PHP] php forgetting variables very easily

2003-03-04 Thread Ian A. Gray
Hi everyone.I am probably doing something obviously wrong but I can't seem to sort it! It's regarding variables.In one script, lets call it main.php I make a variable- say $colour. It inludes a file which prints the variable: main.php ?php $colour = 'green'; include('new.php') ? new.php ?php

Re: [PHP] php forgetting variables very easily

2003-03-04 Thread Rasmus Lerdorf
Ok, this works fine for me. However it doesn't seem to work when main.php and new.php have html in them. You are doing something wrong then. Show us a simple example that doesn't work. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Debugging fsockopen errno 0?

2003-03-04 Thread Jeff Lewis
I've been trying to use fsockopen and it fails to get by if (!fp) and returns an errno of 0. In the documentation it says that indicates an error initializing the socket. Is there anyway I can debug this or find out what is going wrong? Jeff

  1   2   >