Re: [PHP] Stripping!!!

2001-01-11 Thread Robin Vickery
"S" == "K Simon" [EMAIL PROTECTED] writes: Thx, but could anybody give me an example? It shouldnt be too hard?! If you feel you have to do it in php then this should work. You'd save a lot of effort if you used the unix 'cut' command though. cut -d ' ' -f 1 inputfile.txt outputfile.txt

Re: [PHP] stripping the keywords from a search engine... again...

2001-01-19 Thread Robin Vickery
"BC" == Brian Clark [EMAIL PROTECTED] writes: Hello Dallas, (DK == "Dallas Kropka") [EMAIL PROTECTED] writes: DK Posted earlier but got no response so here it is again... I gave you a quick explanation of one way to do it earlier, but I know of no tutorials off the top of my

Re: [PHP] Pricing for PHP programming???

2001-02-01 Thread Robin Vickery
an't draw for toffee) -- Robin Vickery. BlueCarrots, 14th Floor, 20 Eastbourne Terrace, London, W2 6LE -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: [PHP] contracting consulting (was [PHP] Pricing for PHP programming???)

2001-02-02 Thread Robin Vickery
earnt various fun, but not particularly commercial languages at Uni. Picked up Perl while working in a Sysadmin role, then PHP/FI when roped into developing a website. I converted to PHP3 with some relief as soon as it came out and now most of my work is in P

Re: [PHP] PHP/FI what FI?

2001-02-02 Thread Robin Vickery
P3 and now PHP4. PHP/FI had a few quirks... the syntax for function definitions for example: function functionname $param1 $param2 ( statement1; statement2; ... ); PHP3 was a definite improvement. -- Robin Vickery. BlueCarrots, 14th

Re: [PHP] Replace everything except of...

2001-03-13 Thread Robin Vickery
"MT" == Martin Thoma [EMAIL PROTECTED] writes: Hello ! How can I use eregi_replace to replace every "BR" with "", except when it's "BBR" ?? You need a lookbehind assertion... $string = preg_replace( '/(?!b)br/i', '', $stri

[PHP] Re: Regex help

2001-08-22 Thread Robin Vickery
[EMAIL PROTECTED] (Stefen Lars) writes: In the Apache config file, we have the following directive: SetEnvIfNoCase Referer ^http://www.oursite.com/; local_ref=1 FilesMatch .(gif|jpg) Order Allow,Deny Allow from env=local_ref /FilesMatch We use this to prevent people from

[PHP] Re: Regular Expressions - A relatively simple search...

2001-09-07 Thread Robin Vickery
[EMAIL PROTECTED] (Mike Gifford) writes: Hello, I'm trying to replace a couple of lines of code: $dotpos = 1 - (strlen($userfile_name) - strpos($userfile_name, '.')); $extension = substr($userfile_name, $dotpos); with a simpler regular expression: $extension =

Re: [PHP] Re: How to pass variables to php functions from url's?

2001-09-07 Thread Robin Vickery
[EMAIL PROTECTED] (Martin Lindhe) writes: Hi Martin, Take a look at the Apache mod_rewrite docs. http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html Thanks alot! I made a similar solution which works RewriteEngine on RewriteRule ^/x/(.*)

[PHP] Re: preg_replace_callback()

2001-09-10 Thread Robin Vickery
[EMAIL PROTECTED] (Richard Lynch) writes: A callback is when you execute a function, and you provide to it a name of *another* function, which it will call on some data in the middle of its task. It's a very handy way to provide extreme flexibility in functional languages. For example:

Re: [PHP] PHP Redirect in the middle of code?

2001-09-10 Thread Robin Vickery
[EMAIL PROTECTED] (George Pitcher) writes: Andrew, I am in a similar position witha Lasso site, which I am considering php-ing. I need to do conditional redirects. George P, Edinburgh - Original Message - From: Andrew Penniman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent:

[PHP] Re: problem in the small code

2001-09-11 Thread Robin Vickery
[EMAIL PROTECTED] (Balaji Ankem) writes: What is the problem with following code.. $sql1=DELETE from tinventory where inv_tag='$inv_tag'; no closing doublequote. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: [PHP] shows up in IE but not Netscape

2001-02-09 Thread Robin Vickery
? Mainly because your closing 'table' tag is missing its slash. The duplicated 'head' and 'body' tags probably aren't helping either. -robin -- Robin Vickery. BlueCarrots, 14th Floor, 20 Eastbourne Terrace, London, W2 6LE -- PHP General Ma

Re: [PHP] ereg_replace

2001-02-14 Thread Robin Vickery
of text' ), $string ); print $string . "br\n"; ? The output would be: this is my string. this is your bit of text. -- Robin Vickery. BlueCarrots, 14th Floor, 20 Eastbourne Terrace, London, W

Re: [PHP] currency conversion

2001-02-15 Thread Robin Vickery
foreach ($return as $line) { if( preg_match($regex, $line, $match) ) break; } if (!isset($match)) return false; return $amount * $match[1]; } } $money = new currency; print $money-convert( 10, "GBP", "AUD" ); ? -- Robin Vickery...

Re: [PHP] ereg_replace

2001-02-15 Thread Robin Vickery
"VB" == "Brian V Bonini" [EMAIL PROTECTED] writes: Ah right, strings not words, I feel like a dummy now... ;-) -Original Message- From: John Vanderbeck [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 15, 2001 10:57 AM To: [EMAIL PROTECTED]; Robin Vickery

Re: [PHP] ereg_replace

2001-02-15 Thread Robin Vickery
t preg_replace( '/\b/', '-', 'this is a string' ) . "br\n"; It will output: -this- -is- -a- -string- As it replaces all the word boundaries with a hyphen. So the regular expression /\bis\b/ will match only the word 'is' and not 'this' or 'isotope' or 'biscuit'.

Re: [PHP] True || False ?

2001-02-16 Thread Robin Vickery
r examples you were implicitly converting from a boolean type to an integer or a string. Try this: print gettype(true) . "br\n"; print gettype(0 + true) . "br\n"; print gettype('' . true) . "br\n"; -robin -- Robin Vickery...

Re: [PHP] create array of random unique integers?

2001-02-18 Thread Robin Vickery
ay = range( $start, $finish ); // it really irritates me the way PHP's sort functions mess around // with the original array rather than returning a sorted array so // I can assign it to where I want it. shuffle( $rand_array ); return $rand_array; } print_r( rand_array(1, 10) ); ?

Re: [PHP] Exec issue

2001-02-18 Thread Robin Vickery
th problem, especially if you can run 'ls'. Try giving the full path to 'find'. -robin -- Robin Vickery. BlueCarrots, 14th Floor, 20 Eastbourne Terrace, London, W2 6LE -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-ma

Re: [PHP] summing unkown values

2001-02-20 Thread Robin Vickery
"GROUP BY issues.course_name"; The result would be a single entry for each course with the total time. hope this helps -robin -- Robin Vickery. BlueCarrots, 14th Floor, 20 Eastbourne Terrace, London, W2 6LE --

Re: [PHP] I'm confused about Regular Expressions.

2001-02-22 Thread Robin Vickery
ImageSize() on the uploaded file, before you move it and look at the [2] element of what is returned. This will give you the actual type of file from inspecting its contents rather than just trusting the extension that was typed. Or look at the mime type held in $HTTP_POST_FILES['

Re: [PHP] Limitations of preg_replace?

2007-10-25 Thread Robin Vickery
On 25/10/2007, Werner Schneider [EMAIL PROTECTED] wrote: Hi. Are there any limitations of preg_replace and is there a way to change them (for example with ini_set)? I got a php 4.4.7 on a linux-webhoster which crashes without error-message on this script: ?php $txt = ;

Re: [PHP] REGEX: grouping of alternative patterns

2007-10-30 Thread Robin Vickery
On 30/10/2007, Stijn Verholen [EMAIL PROTECTED] wrote: Hey list, I'm having problems with grouped alternative patterns. The regex I would like to use, is the following:

Re: [PHP] moving over to php 5

2007-10-30 Thread Robin Vickery
On 30/10/2007, Per Jessen [EMAIL PROTECTED] wrote: Larry Garfield wrote: On Monday 29 October 2007, Per Jessen wrote: Cristian Vrabie wrote: Hmm 117,223 hosts with php4 only support. Did you actually checked how many have php5 support? Many more. There are 178.112 hosters that have

Re: [PHP] while-do +array

2007-10-31 Thread Robin Vickery
On 31/10/2007, Steven Macintyre [EMAIL PROTECTED] wrote: Hiya, I have the following code ... which only seems to result in one item ... which is incorrect ... can anyone spot my problem? if ($armbase != ) { $options = explode(,, $armbase); $text .=

Re: [PHP] Not Null?

2007-10-31 Thread Robin Vickery
On 31/10/2007, Steve Marquez [EMAIL PROTECTED] wrote: Greetings, I have a script that looks for the variable to be NULL and then execute. Is there a way for the script to look for anything or something in the variable and then execute? Ex: If (Œ$a¹ == Œ ANYTHING¹) { oh dear, krazee

Re: [PHP] How to replace define in a require file with mysql?

2007-11-05 Thread Robin Vickery
On 05/11/2007, Zoltán Németh [EMAIL PROTECTED] wrote: 2007. 11. 5, hétfő keltezéssel 06.10-kor Ronald Wiplinger ezt írta: Jim Lucas wrote: Ronald Wiplinger wrote: I have a file linked with require into my program with statements like: define(_ADDRESS,Address); define(_CITY,City);

Re: [PHP] stftime differences on Windows/Linux platforms

2007-11-06 Thread Robin Vickery
On 06/11/2007, Neil Saunders [EMAIL PROTECTED] wrote: Hi All, I'm experiencing some differences in in the return values of strftime on Windows Linux platforms on PHP 5.2.1. I've knocked up a test case to demonstrate the bug: ?php $UNIX_TIME = mktime(0,0,0,5,31,2008); echo Time Made for

Re: [PHP] stftime differences on Windows/Linux platforms

2007-11-06 Thread Robin Vickery
On 06/11/2007, Neil Saunders [EMAIL PROTECTED] wrote: Hi Robin, Thanks for your reply. The times are exactly synchronized. I'm looking at the date section in the output of phpinfo(), and get the following: Development Default timezoneEurope/London Production: Default timezone

Re: [PHP] enhanced_list_box, 2 tables from a database

2007-11-07 Thread Robin Vickery
On 07/11/2007, kNish [EMAIL PROTECTED] wrote: Hi, A newbie question. I have more than one table to access from a database. When I use the code as below, it gives no response on the web page. What may I do to run more than one table from the same database into the script. Firstly, turn

Re: [PHP] Re: Help with preg_replace

2007-11-08 Thread Robin Vickery
On 08/11/2007, Jochem Maas [EMAIL PROTECTED] wrote: Al wrote: Delimiters needed. Can use about anything not already in your pattern. / is very commonly used; but I like # or % generally; but, you can't use % because your pattern has it. $html = preg_replace(#%ResID#,$bookid,$html);

Re: [PHP] Need a hint how to track an error

2007-11-13 Thread Robin Vickery
On 12/11/2007, Ronald Wiplinger [EMAIL PROTECTED] wrote: Chris wrote: Ronald Wiplinger wrote: My php program is working with Firefox, but not with Internet Explorer. Nothing to do with php, your problem is javascript. Is there a tool to find the problem? For IE, try

Re: [PHP] Tree-like structure in PHP?

2007-11-16 Thread Robin Vickery
On 16/11/2007, Paul van Haren [EMAIL PROTECTED] wrote: I'm trying to use arrays to implement a sort of data tree. For the code to work, it is essential that the nodes can be edited after they have become part of the tree. That would require that the array elements are pushed by reference

Re: [PHP] Should I put pictures into a database?

2007-11-29 Thread Robin Vickery
On 28/11/2007, AmirBehzad Eslami [EMAIL PROTECTED] wrote: On Wednesday 21 November 2007 03:14:43 Ronald Wiplinger wrote: I have an application, where I use pictures. The size of the picture is about 90kB and to speed up the preview, I made a thumbnail of each picture which is about 2.5 to

Re: [PHP] Generating Random Numbers with Normal Distribution

2007-12-11 Thread Robin Vickery
On 10/12/2007, Nathan Nobbe [EMAIL PROTECTED] wrote: On Dec 10, 2007 5:29 PM, Robert Cummings [EMAIL PROTECTED] wrote: On Mon, 2007-12-10 at 14:22 -0600, Jay Blanchard wrote: [snip] Can you say for certain nature is truly random? Just because the seed may have occurred 13.7 billion

Re: [PHP] Generating Random Numbers with Normal Distribution

2007-12-12 Thread Robin Vickery
On 12/12/2007, Daniel Brown [EMAIL PROTECTED] wrote: On Dec 12, 2007 9:00 AM, tedd [EMAIL PROTECTED] wrote: At 3:04 PM -0500 12/10/07, Daniel Brown wrote: Unfortunately, because computers are logical, there's no such thing (at least as of yet) as a truly random number being generated

Re: [PHP] Opinion about the using $GLOBALS directly

2007-12-19 Thread Robin Vickery
On 19/12/2007, js [EMAIL PROTECTED] wrote: Hi Jochem, Sorry, I missed static. So, getDB() would works like singleton, right? I agree that's better method to manage dbh. The technique is called memoization (http://en.wikipedia.org/wiki/Memoization). -robin -- PHP General Mailing List

Re: [PHP] fail on preg_match_all

2008-02-21 Thread Robin Vickery
On 21/02/2008, Nathan Rixham [EMAIL PROTECTED] wrote: The regex looks incorrect to me in a few places: -\d+] {1,4} for example. That's ok, albeit confusing: * The ']' is a literal ']' not the closing bracket of a character class. * The {1,4} applies to the space character. -robin -- PHP

Re: [PHP] Copying specific fields from table to table

2008-02-25 Thread Robin Vickery
On 25/02/2008, Rob Gould [EMAIL PROTECTED] wrote: I've got 2 tables. One table which contains a series of barcodes assigned to product id #'s, and another table with JUST product id #'s. I need to somehow transfer all the barcodes from the first table into the second table, but only where

Re: [PHP] reverse string without strrev();

2008-02-28 Thread Robin Vickery
On 28/02/2008, Robert Cummings [EMAIL PROTECTED] wrote: On Thu, 2008-02-28 at 12:39 +, Nathan Rixham wrote: Aschwin Wesselius wrote: Stut wrote: Just because it works doesn't mean it's right. -Stut What I meant was that I tested the script and it worked,

Re: [PHP] local v remote

2007-05-31 Thread Robin Vickery
On 31/05/07, blueboy [EMAIL PROTECTED] wrote: On my localhost this works fine $result= mysql_query(SELECT date_format(date, '%d/%m/%Y') as date, title, id, display FROM NEWS); 1. check return values, $result should not be false unless there's a problem. 2. if $result is false, check

Re: [PHP] checking the aspect ratio of an images

2007-06-06 Thread Robin Vickery
On 06/06/07, blueboy [EMAIL PROTECTED] wrote: I want to force users to insert landscape rather portrait images. I don't want to be too pedantic about it but they do need to have an approximate 4x3 aspect ratio. This is my code so far. $max_height = 500; // This is in pixels $max_width = 500;

Re: [PHP] Parse domain from URL

2007-06-07 Thread Robin Vickery
On 06/06/07, Brad Fuller [EMAIL PROTECTED] wrote: Daniel Brown wrote: On 6/6/07, Brad Fuller [EMAIL PROTECTED] wrote: I need to strip out a domain name from a URL, and ignore subdomains (like www) I can use parse_url to get the hostname. And my first thought was to take the last 2

Re: [PHP] Going from simple to super CAPTCHA

2007-06-12 Thread Robin Vickery
On 10/06/07, Dave M G [EMAIL PROTECTED] wrote: PHP General List, With a little help from the web, and help from this list, I have a simple CAPTCHA image that works within the content system I'm building. But it's *really* simple. Basically white text on a black background, with a couple of

Re: [PHP] Going from simple to super CAPTCHA

2007-06-13 Thread Robin Vickery
On 12/06/07, Richard Lynch [EMAIL PROTECTED] wrote: On Tue, June 12, 2007 9:33 am, Tijnema wrote: I meant reverse order :P That would be pretty broken. There's no guarantee that browsers will present the inputs in any order at all, even though they all seem (so far) to follow the convention

Re: [PHP] Going from simple to super CAPTCHA

2007-06-14 Thread Robin Vickery
On 13/06/07, Richard Lynch [EMAIL PROTECTED] wrote: On Wed, June 13, 2007 3:36 am, Robin Vickery wrote: On 12/06/07, Richard Lynch [EMAIL PROTECTED] wrote: On Tue, June 12, 2007 9:33 am, Tijnema wrote: I meant reverse order :P That would be pretty broken. There's no guarantee

Re: Re[6]: [PHP] Need a more elegant way of bitwise ORing values

2007-06-17 Thread Robin Vickery
On 13/06/07, Richard Davey [EMAIL PROTECTED] wrote: Hi Robert, Wednesday, June 13, 2007, 3:15:39 PM, you wrote: It's terribly verbose and inefficient... ?php $filter['flags'] = 0; if( $allow_fraction ) { $filter['flags'] |= FILTER_FLAG_ALLOW_FRACTION; } if( $allow_thousand ) {

Re: [PHP] Comparing string to array

2007-06-19 Thread Robin Vickery
On 19/06/07, Richard Davey [EMAIL PROTECTED] wrote: $userparam = test['sam'][]; // How to check if $userparam exists in the $_POST array // and get all the values from it? full_key_exists(test['sam'][], $_POST) // returns true if key is set full_find_key(test['sam'][], $_POST)

Re: Re[2]: [PHP] Comparing string to array

2007-06-20 Thread Robin Vickery
On 19/06/07, Richard Davey [EMAIL PROTECTED] wrote: Hi Robin, Tuesday, June 19, 2007, 8:28:50 PM, you wrote: On 19/06/07, Richard Davey [EMAIL PROTECTED] wrote: $userparam = test['sam'][]; // How to check if $userparam exists in the $_POST array // and get all the values

Re: [PHP] Counting Capital Letters

2007-06-21 Thread Robin Vickery
On 21/06/07, Richard Davey [EMAIL PROTECTED] wrote: Hi, I've written a short regexp which will *count* how many capital letters are in a given string (the woefully simple: '/[A-Z]/') Although it's an English language web site, I'm curious how you'd count capital letters that span beyond just

Re: [PHP] Byte conversion

2007-06-25 Thread Robin Vickery
On 25/06/07, Eric Butera [EMAIL PROTECTED] wrote: I've been trying to figure out a way to do this all day and I'm afraid I might need a bit of help. Basically I am trying to port over something from Java to PHP and I'm stuck on one particular piece of code: if ((ba[i + 0] == (byte)0xa7) (ba[i

Re: [PHP] Disadvantages of output buffering

2007-06-26 Thread Robin Vickery
On 26/06/07, Robert Cummings [EMAIL PROTECTED] wrote: On Tue, 2007-06-26 at 14:09 +0100, Stut wrote: Robert Cummings wrote: On Tue, 2007-06-26 at 14:33 +0200, Emil Edeholt wrote: Hi! My php project would get a much cleaner code if I could set cookies anywhere in the code. So I thought

Re: [PHP] Array Question

2007-07-11 Thread Robin Vickery
On 11/07/07, kvigor [EMAIL PROTECTED] wrote: Is there a php function similar to in_array that can detect if a partial value is in an array value or not: e.g. $var1 = big horse;$var2 = small yellow;$var3 = red hydrant; $theArray = array(big blue horse, small yellow bird, giant red

Re: [PHP] Array Question

2007-07-11 Thread Robin Vickery
On 11/07/07, Robert Cummings [EMAIL PROTECTED] wrote: On Wed, 2007-07-11 at 09:46 +0100, Robin Vickery wrote: On 11/07/07, kvigor [EMAIL PROTECTED] wrote: Is there a php function similar to in_array that can detect if a partial value is in an array value or not: e.g. $var1 = big

Re: [PHP] Problem iterating over an array with foreach and a reference variable

2007-07-25 Thread Robin Vickery
On 24/07/07, Chris Mika [EMAIL PROTECTED] wrote: I don't know if I'm doing something wrong or if this is a bug. Very simply: I created an array with values 1-5. I use a foreach loop to iterate over it to add 1 to the values. It correctly iterates over the array except for the last value. Code:

Re: [PHP] Array difficulty

2007-07-31 Thread Robin Vickery
On 31/07/07, Carlton Whitehead [EMAIL PROTECTED] wrote: Hi all, I have an array like this: $chance = array(lowercase = 27, uppercase = 62, integer = 46); The values for each of the keys are randomly generated. I want to find the key name of the one which has the highest value. Currently,

Re: [PHP] Array difficulty

2007-07-31 Thread Robin Vickery
On 31/07/07, Alister Bulman [EMAIL PROTECTED] wrote: On 31/07/07, Carlton Whitehead [EMAIL PROTECTED] wrote: Couldn't you just do arsort($chance); $lastItem = chance[( count( $chance ) - 1 )]; I tried that earlier, but the problem is: count( $chance ) - 1 ); returns an integer, so I

Re: [PHP] Unexpected values in an associative array[Solved]

2007-07-31 Thread Robin Vickery
On 31/07/07, Ken Tozier [EMAIL PROTECTED] wrote: Turns out that objects returned from SQL queries contain two parts for every field, one with a string key and one with an index key. Adding an is_numeric test on the keys allows you to filter out the numeric keys if you want to. For example: Or

Re: [PHP] Validating Email Conditional

2007-08-01 Thread Robin Vickery
On 01/08/07, CK [EMAIL PROTECTED] wrote: Hi, My script is working, [...] $regexp = ^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-] +)*(\.[a-z]{2,4})$; If your script is using that regular expression to validate email addresses then your script is most definitely not working.

Re: [PHP] Validating Email Conditional

2007-08-02 Thread Robin Vickery
On 02/08/07, CK [EMAIL PROTECTED] wrote: Hi, Would you point out why? As I've tested a range of email address, and have not found one rejected that is formatted correctly. ok, here's a few perfectly valid email addresses off the top of my head. The first one's especially annoying as I use it

Re: [PHP] How can I get a list of object vars?

2007-08-02 Thread Robin Vickery
On 02/08/07, js [EMAIL PROTECTED] wrote: Hi list. I'm trying to write a ORM in PHP. I want the ORM to have metadata mapping, which have a list of properties name and the value, without using any external file. (I like simple one, not want messy XML) I'm thinking PHP's reflective

Re: [PHP] Validating Email Conditional

2007-08-03 Thread Robin Vickery
. The best advice for validating email addresses is don't do it with a regexp. Send an email to the address with a link in it for them to confirm their registration. On Aug 1, 2007, at 11:08 PM, Robin Vickery wrote: On 02/08/07, CK [EMAIL PROTECTED] wrote: Hi, Would you point out why

Re: [PHP] Case insensitive ksort

2007-09-18 Thread Robin Vickery
On 18/09/2007, Christoph Boget [EMAIL PROTECTED] wrote: I looked in the docs but didn't see anything regarding case insensitivity and I fear the functionality doesn't exist. I'm just hoping I'm looking in the wrong place. Is there a way to get ksort to work without regard to case? When I

Re: [PHP] Looking for help with a complex algorithm

2007-10-10 Thread Robin Vickery
On 09/10/2007, Jay Blanchard [EMAIL PROTECTED] wrote: Good afternoon gurus and guru-ettes! I am searching for an algorithm that will take a list of monetary values and determine which of these values totals a value supplied to the widget. 1. I supply a value to the application and give a

Re: [PHP] problem calling functions

2007-10-19 Thread Robin Vickery
On 19/10/2007, afan pasalic [EMAIL PROTECTED] wrote: hi I have a problem with calling functions: ?php function solution1($var1){ // some code } function solution2($var2){ // some code } function solution3($var3){ // some code } if ($function == 'solution1'

Re: [PHP] problem calling functions

2007-10-20 Thread Robin Vickery
On 19/10/2007, afan pasalic [EMAIL PROTECTED] wrote: Robin Vickery wrote: On 19/10/2007, afan pasalic [EMAIL PROTECTED] wrote: hi I have a problem with calling functions: ?php function solution1($var1){ // some code } function solution2($var2){ // some

Re: [PHP] AES client side

2006-07-31 Thread Robin Vickery
On 31/07/06, Jon Anderson [EMAIL PROTECTED] wrote: Jay Blanchard wrote: Yes, but that shouldn't matter. The algorithms for RSA, AES, etc, etc are all publicly available, why bother hiding their JavaScript implementations? Only the data would be encrypted. [/snip] So, you're suggesting that

Re: [PHP] SQL injection

2006-08-03 Thread Robin Vickery
On 02/08/06, Jochem Maas [EMAIL PROTECTED] wrote: Russell Jones wrote: In real life terms, if you walked into the store and saw that the cash register was slightly broken and slightly opened, and reached in and pulled out a dollar to show the cashier what was wrong, you would not get in

Re: [PHP] The difference between ereg and preg?

2006-08-04 Thread Robin Vickery
On 04/08/06, Dave M G [EMAIL PROTECTED] wrote: It seemed that the main difference was that preg_replace required forward slashes around the regular expression, like so: preg_replace(/!DOCTYPE(.*)ul/, , $htmlPage); It requires delimiters - slashes are conventional, but other characters can be

Re: [PHP] Best way to get PHP5

2006-08-10 Thread Robin Vickery
On 10/08/06, Chris W. Parker [EMAIL PROTECTED] wrote: Jonathan Duncan mailto:[EMAIL PROTECTED] on Wednesday, August 09, 2006 3:55 PM said: If you want to really learn Linux, try Gentoo. If you just want a very good and easy to use Linux, go with SuSE. To keep this related to the

Re: [PHP] array_sum($result)=100

2006-09-25 Thread Robin Vickery
On 24/09/06, Ahmad Al-Twaijiry [EMAIL PROTECTED] wrote: Hi everyone I have array of numbers and I want to get out of it a list of numbers that if I sum them it will be 100, here is my list (for example ) : $list = array(10,20,10,10,30,50,33,110,381,338,20,11,200,100); I want the result to be

Re: [PHP] Re: Re: Re: Frustrated trying to get help from your site

2006-10-04 Thread Robin Vickery
On 03/10/06, David Robley [EMAIL PROTECTED] wrote: Michelle Konzack wrote: Am 2006-09-27 17:39:25, schrieb David Robley: 88 tons!! Point us to an image of that please. Currently not availlable but it is an ex Pershing II Transporter from the US-Army manufactured by the german Enterprise

Re: [PHP] Re: How to recognise url in a block of text

2006-10-17 Thread Robin Vickery
On 17/10/06, Al [EMAIL PROTECTED] wrote: AYSERVE.NET wrote: Please, I need help on how to to recognise url in a block of text being retrieved from a database and present it as a link within that text. I will appreciate any help. Regards, Bunmi Show us some examples of URL substrings, with

Re: [PHP] Re: How to recognise url in a block of text

2006-10-18 Thread Robin Vickery
On 18/10/06, Ivo F.A.C. Fokkema [EMAIL PROTECTED] wrote: On Tue, 17 Oct 2006 17:26:42 +0100, Robin Vickery wrote: On 17/10/06, Al [EMAIL PROTECTED] wrote: AYSERVE.NET wrote: Please, I need help on how to to recognise url in a block of text being retrieved from a database and present

Re: [PHP] Re: How to recognise url in a block of text

2006-10-19 Thread Robin Vickery
On 18/10/06, AYSERVE.NET [EMAIL PROTECTED] wrote: Hello Guys, I thought I was home and dry when the program worked fine on my windows but when I ran from my Linus server, I keep getting a url like: http://www.website.com/pdf/ED1.pdf%A0 instead of http://www.website.com/pdf/ED1.pdf. I'd look at

Re: [PHP] regex

2006-10-19 Thread Robin Vickery
On 19/10/06, Bagus Nugroho [EMAIL PROTECTED] wrote: Hi All, If we have variable like : $var1 = 'abcde 12'; $var2 = 'abcdefghi 34'; $var3 = 'abc 20 def'; Then we want output like : $var1 = 'abcde'; $var2 = 'abcdefghi'; $var3 = 'abc def'; $re = '/^\s+|\d+\s*|\s*\d+\s*$/'; $var1 =

Re: [PHP] counting records in db

2006-10-30 Thread Robin Vickery
On 30/10/06, Ivo F.A.C. Fokkema [EMAIL PROTECTED] wrote: On Sun, 29 Oct 2006 23:40:47 -0600, Richard Lynch wrote: On Fri, October 27, 2006 4:53 pm, Børge Holen wrote: On Friday 27 October 2006 19:34, Richard Lynch wrote: And the header(Location: ...) requires a full URL. No it doesn't. but

Re: [PHP] counting records in db

2006-10-31 Thread Robin Vickery
On 30/10/06, Robert Cummings [EMAIL PROTECTED] wrote: On Mon, 2006-10-30 at 12:28 +0100, Robin Vickery wrote: On 30/10/06, Ivo F.A.C. Fokkema [EMAIL PROTECTED] wrote: On Sun, 29 Oct 2006 23:40:47 -0600, Richard Lynch wrote: On Fri, October 27, 2006 4:53 pm, Børge Holen wrote

Re: [PHP] why so slow?

2006-11-01 Thread Robin Vickery
On 01/11/06, Mel [EMAIL PROTECTED] wrote: Here is the code for a testing page: http://www.squareinch.net/ client_testing.php?art=btw_logo.jpg I am sure it is a mess since it is my first!!! [] include(http://www.squareinch.net/include/misc.inc;); Don't do that - publishing your

Re: [PHP] why so slow?

2006-11-01 Thread Robin Vickery
On 01/11/06, Mel [EMAIL PROTECTED] wrote: Thank you so much. Yes, I was afraid of putting my passwords... I can move the include file outside the directory, but what do you mean by include the file directly Please respond to the list What I meant was to do this:

Re: [PHP] list of countries

2006-11-08 Thread Robin Vickery
On 07/11/06, James Tu [EMAIL PROTECTED] wrote: Thanks everyone for the helpful links and suggestions! Any people here with access to a country list in Arabic or Chinese? http://www.foreignword.com/countries/Arabic.htm -robin -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Splitting a string

2006-11-15 Thread Robin Vickery
On 15/11/06, Aaron Koning [EMAIL PROTECTED] wrote: Assuming var1 and var2 only ever use the last four numbers (untested): $length = strlen($number); // get string length $var1 = substr($number,0,$length-4); // get number until only 4 numbers are left $var2 = substr($number,$length-4,2); // get

Re: [PHP] Detecting naughty sites

2006-11-29 Thread Robin Vickery
On 29/11/06, Travis Doherty [EMAIL PROTECTED] wrote: Tom Chubb wrote: On 28/11/06, Dave Goodchild [EMAIL PROTECTED] wrote: Hi all. I am building a web app and as part of it advertisers can upload their ad image and website URL to go with their ad. Is there a good way to detect whether

[PHP] Playing around with strings

2008-03-20 Thread Robin Vickery
Hiyah, Here's a trick you can use to evaluate expressions within strings. It may not be particularly useful, but I thought it was interesting. It exploits two things: 1. If you interpolate an array element within a string, the index of the element is evaluated as a php expression. 2. You can

Re: [PHP] why use {} around vraiable?

2008-03-20 Thread Robin Vickery
On 20/03/2008, Lamp Lists [EMAIL PROTECTED] wrote: hi, I saw several times that some people use this $parameters = array( 'param1' = {$_POST[param1]}, 'param2' = {$_POST[param2]} ); or $query = mysql_query(SELECT * FROM table1 WHERE id='{$session_id}'); I would use:

[PHP] Re: Playing around with strings

2008-03-20 Thread Robin Vickery
On 20/03/2008, Robin Vickery [EMAIL PROTECTED] wrote: Hiyah, Here's a trick you can use to evaluate expressions within strings. It may not be particularly useful, but I thought it was interesting. It exploits two things: 1. If you interpolate an array element within a string, the index

Re: [PHP] Possible using XPath?

2008-03-27 Thread Robin Vickery
On 27/03/2008, Christoph Boget [EMAIL PROTECTED] wrote: Let's say I have the following structure: ?xml version=1.0 encoding=UTF-8? root child id=c1 child id=gc1 child id=ggc1/ child id=ggc2/ /child

Re: [PHP] Possible using XPath?

2008-03-27 Thread Robin Vickery
On 27/03/2008, Christoph Boget [EMAIL PROTECTED] wrote: Is that possible? Or is this something I'd have to do programatically using the nodes returned by the XPath query? Basically, I'm just trying to get a fragment of the larger xml document... //[EMAIL

Re: [PHP] Re: Quick email address check

2008-03-28 Thread Robin Vickery
On 28/03/2008, Bastien Koert [EMAIL PROTECTED] wrote: On Thu, Mar 27, 2008 at 10:23 PM, Bill Guion [EMAIL PROTECTED] wrote: At 1:28 PM -0400 3/26/08, Al wrote: I'm scripting a simple registry where the user can input their name and email address. I'd like to do a quick

Re: [PHP] array_filter function

2008-03-28 Thread Robin Vickery
On 28/03/2008, Bagus Nugroho [EMAIL PROTECTED] wrote: Hello, If I have an array like this $dataArray = array(0=array('type'='da'), 1=array('type'='wb'), 2=array('type'='da'); How I can filtering to get only 'da' only, like this $newDataArray =

Re: [PHP] PHP GD library installing

2008-04-10 Thread Robin Vickery
On 10/04/2008, Thijs Lensselink [EMAIL PROTECTED] wrote: Quoting Luca Paolella [EMAIL PROTECTED]: How do I install/activate the GD library with my existing PHP version? I'm quite sure it isn't already, since I got this error: Fatal error: Call to undefined function imagecreate() in

Re: [PHP] PHP GD library installing

2008-04-10 Thread Robin Vickery
On 10/04/2008, Thijs Lensselink [EMAIL PROTECTED] wrote: Quoting Robin Vickery [EMAIL PROTECTED]: On 10/04/2008, Thijs Lensselink [EMAIL PROTECTED] wrote: Quoting Luca Paolella [EMAIL PROTECTED]: How do I install/activate the GD library with my existing PHP version? I'm

Re: [PHP] Evaluating math without eval()

2008-04-11 Thread Robin Vickery
On 10/04/2008, Jason Norwood-Young [EMAIL PROTECTED] wrote: On Thu, 2008-04-10 at 13:15 +0100, Richard Heyes wrote: First post to this list! I'm trying to figure out how to evaluate a string with a mathematical expression and get a result, but without using eval() as I'm accepting

Re: [PHP] What is the practical use of abstract and interface?

2008-04-16 Thread Robin Vickery
On 16/04/2008, Jay Blanchard [EMAIL PROTECTED] wrote: [snip] What about encapsulation? Interfaces have nothing to do with encapsulation for the smple reason that I can have encapsulation without using interfaces. Unique use of logic there. By similar reasoning; swimming trunks have

Re: [PHP] What is the practical use of abstract and interface?

2008-04-17 Thread Robin Vickery
On 16/04/2008, Tony Marston [EMAIL PROTECTED] wrote: -Original Message- From: Robin Vickery [mailto:[EMAIL PROTECTED] Sent: 16 April 2008 17:23 To: Jay Blanchard Cc: Tony Marston; php-general@lists.php.net Subject: Re: [PHP] What is the practical use of abstract

Re: Re[2]: [PHP] equivalent to perl shift function

2008-05-01 Thread Robin Vickery
2008/5/1 Richard Luckhurst [EMAIL PROTECTED]: Hi Chris, In perl ther is the concept of @_ which is the list of incoming parameter to a subroutine. It is possible to have something like my $sock = shift; As I understand this the first parameter of the @_ list would be shifted. I

Re: [PHP] check if any element of an array is not empty

2008-05-01 Thread Robin Vickery
2008/4/30 Nathan Nobbe [EMAIL PROTECTED]: On Wed, Apr 30, 2008 at 2:58 PM, Richard Heyes [EMAIL PROTECTED] wrote: but I was thinking if there is the function does that. array_filter(). Note this: If no callback is supplied, all entries of input equal to FALSE (see converting

Re: [PHP] Re: A Little Something.

2008-05-13 Thread Robin Vickery
2008/5/13 Stut [EMAIL PROTECTED]: On 13 May 2008, at 09:04, Peter Ford wrote: I think the onus is on the coders of Urchin to document how to avoid errors when Javascript is disabled, not the site developer who uses it. Just to repeat a point I made yesterday which was clearly either

Re: [PHP] Re: A Little Something.

2008-05-13 Thread Robin Vickery
2008/5/13 Stut [EMAIL PROTECTED]: On 13 May 2008, at 10:32, Robin Vickery wrote: 2008/5/13 Stut [EMAIL PROTECTED]: On 13 May 2008, at 09:04, Peter Ford wrote: I think the onus is on the coders of Urchin to document how to avoid errors when Javascript is disabled

  1   2   3   >