Re: [PHP-WIN] Ereg problems

2007-01-16 Thread Daniel Anderson
Then I think this will do the trick for you :) $string = "~YOUR STRING~" if (!eregi_replace("[0-9A-Za-z -_']","",$string)) { echo "string allowed"; } else { echo "string disallowed"; } --

Re: [PHP-WIN] Ereg problems

2007-01-16 Thread Daniel Anderson
} else { echo "string disallowed"; } I tested it with the following strings: $string = "Daniel Anderson" Returned "string allowed". $string = "Daniel Anderson!!" Returned

[PHP-WIN] PHP: Automatically detecting Internet Speed

2006-11-17 Thread Daniel Anderson
Hey, is there a particular algorithm that will enable the PHP script to detect the user's internet connection? Cheers, Dan

Re: [PHP-WIN] Reverse DNS/IP

2006-09-19 Thread Daniel Anderson
thanks for your suggestion, but I need to know the PHP code in which I can do that myself, as I need it desparately to improve a user ban system. Thanks for your help guys! Regards, Dan - Original Message - From: "Mitch Miller" <[EMAIL PROTECTED]> To: "Daniel A

[PHP-WIN] Reverse DNS/IP

2006-09-19 Thread Daniel Anderson
Hi guys, Question: I was wondering if anyone knows if it is possible to find the reverse IP/DNS address of a computer please? Reason: I ask this because I wish to produce a 'ban' list of users on a forum who persistantly cause problems, banning specific IPs is an option, but at the moment is n

[PHP-WIN] Finding a percentage

2006-05-30 Thread Daniel Anderson
Hi, Does anyone know how to find the progress percentage (%) between one number to the next? For example: I have a minimal number of 0 I have a maximum number of 77 I have a current number of 9 Does anyone know how I may find the percentage of this number from the minimal number, to the maximu

Re: [PHP-WIN] Configuration problem?

2006-05-23 Thread Daniel Anderson
PHP uses the settings from: C:\Windows\php.ini, not C:\PHP\php.ini Have you ensured you've allowed Apache to parse HTML files to act as PHP Files? - Original Message - From: "Bill Angus" <[EMAIL PROTECTED]> To: Sent: Monday, May 22, 2006 7:29 PM Subject: [PHP-WIN] Configuration prob

[PHP-WIN] Using the Mail function without an SMTP?

2006-02-19 Thread Daniel Anderson
Is there a way I can use the Mail(); function without having to have an SMTP server? PHPBB doesn't use it, I tried browsing the source code to see how they did it... but they compressed their PHP files, so it is extremely difficult to read. Does anyone know know how I may do the same please? M

[PHP-WIN] Page-style data display system

2006-01-14 Thread Daniel Anderson
Okay, I have a database table to which contains posts from people. I want to retrieve these and post them in a linear format (as I currently have), but...! I want to have pages, each page has 50 rows from the database at a time. If I have 102 results, I want it to be separated into three pages.

[PHP-WIN] Urgent: How do I disallow a php/html file to act as a folder?

2004-12-05 Thread Daniel Anderson
I recently noticed that for some reason, if I type the filename as a folder (B("http://localhost/folder/") it runs the nearest file called that. (B (BI have several .php on a server, which can run without the extention. (B("http://localhost/folder/file"), but if I typed (B("http://localhost

[PHP-WIN] How can I organise my data from a total amount into tens?

2004-09-16 Thread Daniel Anderson
How can I organise my data from a total amount into tens? (B (BSo, say I have a total amount of something like: 50 (B (BI want to organise this so it organises each into 10's (B (Blike this: (B (BPAGE 1 (01 - 10) | PAGE 2 (11 - 20) | PAGE 3 (21 - 30) | PAGE 4 (31 - 40) | PAGE 5 (B(41-50)

Re: [PHP-WIN] Re: HELP - varible not passing from form

2004-08-26 Thread Daniel Anderson
The action tag does not work when you have the GET method on. To retrieve information from the form you should use POST. Well at least that's how it has worked for me anyway ;P - Original Message - From: "aRZed" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, August 23, 2004 10:

[PHP-WIN] Is there a way of...

2004-06-18 Thread Daniel Anderson
Is there a way of getting 24 Bit Colour PNGs to be transparent when you use the: CreateFromPNG(); function? I read through the PHP Manual, one Comment in the transparency page said that True Colour images are transparent only if they are Black (R: 0,G: 0, B: 0), I tried that but it has no effec

Re: [PHP-WIN] php script error

2004-06-18 Thread Daniel Anderson
Edit your PHP.ini file, and find the line: output_buffering set it to ON so it is like this: output_buffering = On This will allow you to output the information in any location of the document, and could resolve your problem. :) If you don't want to allow this then check that your script is w

[PHP-WIN] Which is more ideal for updating each row at a time in a MySQL database?

2004-05-31 Thread Daniel Anderson
Hi, can anyone recommend which of these is better for loading and updating one row at a time in a MySQL database? for() foreach() while() if...then() other...? What I am trying to do is make a PHP code open a table in a MySQL database, then it loads the information needed like Column 1 and Co

[PHP-WIN] How do you delete a cookie on the spot?

2004-05-30 Thread Daniel Anderson
Hi, can anyone tell me how to clear a cookie when the line comes up? Because the following: setcookie("name",""); does work yes, but not well enough. I need it to remove that cookie there and then. For example: You go through a login process to access a page, it sets a cookie with username and p

[PHP-WIN] Can someone tell me how to set an image transparent?

2004-05-23 Thread Daniel Anderson
Hi can someone please tell me how to make the colour attribute of an image transparent. The PHP Documentation is all well and good, but not one person on it is talking sense. http://www.php.net/manual/en/function.imagecolortransparent.php Thanks, Dan

[PHP-WIN] How do you filter out certain IP values?

2004-05-22 Thread Daniel Anderson
Hi, can anyone tell me how to filter out some IP values? For example: 80.2.*.30 Many thanks, Dan

[PHP-WIN] How do you do....

2004-05-18 Thread Daniel Anderson
Hi,   1: can anyone tell me how to do a session ID in the URL?   so you could have something like:   www.someserver.com/figures.php?what=about&sid=123d8asf87yf9013987rfr   How do I get it to do that sort of thing?   2: Can you change the font face in the Create Image thingy, so instead

[PHP-WIN] How do you get the image function to work?

2004-04-29 Thread Daniel Anderson
Hi, can anyone tell me how I can get the Image Create function for PHP to work properly? I have viewed the English manual at www.php.net and the comments posted don't really help to get this thing working, the GD Image Library says it is not for PHP. Can anyone help? Anything will be greatly a

[PHP-WIN] Arrays

2004-04-12 Thread Daniel Anderson
Hi, can anyone walk me through arrays please. I am new to PHP and arrays appear to come in many forms and I need help getting arrays working properly. Anything will be a great help, thanks, Dan