Re: [PHP] ip-to-country

2009-12-29 Thread Nitsan Bin-Nun
easy-peasy :) I have nothing to add to the discussion, my experience is only with Maxmind's free database, and it is definitely not accurate at Israel. On Tue, Dec 29, 2009 at 11:14 PM, George Langley wrote: >From my experience, I have had reported one incorrect country-level > IP from M

Re: [PHP] Re: Detecting The Encoding Of A Text File

2009-11-26 Thread Nitsan Bin-Nun
x27;t have much experience in encoding.. :( ) 2009/11/26 Nisse Engström > On Thu, 26 Nov 2009 06:55:31 +0200, Nitsan Bin-Nun wrote: > > > Hi, > > > > I have been trying for the last couple of hours to determine the > > encoding of a text file (.txt in windowz). > &

[PHP] Detecting The Encoding Of A Text File

2009-11-25 Thread Nitsan Bin-Nun
Hi, I have been trying for the last couple of hours to determine the encoding of a text file (.txt in windowz). I have this code: $contents = file_get_contents($config[' txt_dir'] . $file); $encoding = mb_detect_encoding($contents, "UTF-8,ISO-8859-1,WINDOWS-1252"); //,Windows-125

[PHP] Detecting The Encoding Of A Text File

2009-11-25 Thread Nitsan Bin-Nun
Hi, I have been trying for the last couple of hours to determine the encoding of a text file (.txt in windowz). I have this code: $contents = file_get_contents($config['txt_dir'] . $file); $encoding = mb_detect_encoding($contents, "UTF-8,ISO-8859-1,WINDOWS-1252"); //,Windows-1255

[PHP] Misusing The URLENCODE/DECODE() Functions

2009-09-22 Thread Nitsan Bin-Nun
Hi List I usually don't tend to post here but I have no time and no idea :( I'm using .htaccess and a php router file (based upon regex patterns) in order to create google-friendly URL's It works like a charm, but somehow it has decoding '+' signs and similar things into the appropriate characte

[PHP] שנה טובה!

2009-09-19 Thread Nitsan Bin-Nun
[image: http://blog.tapuz.co.il/sleightofhand/images/765254_81.jpg] *שנה טובה ומתוקה ממני, ניצן*

Re: [PHP] Re: Best way to test for form submission?

2009-08-28 Thread Nitsan Bin-Nun
"; On Fri, Aug 28, 2009 at 5:21 AM, Adam Jimerson wrote: > On 08/27/2009 11:09 PM, Adam Jimerson wrote: > > This question might give away the fact that I am a php noob, but I am > > looking for the best way to test for form submission in PHP. I know in > > Perl this can be done with > > > > if

Re: [PHP] to a css file requires .css ???

2009-08-16 Thread Nitsan Bin-Nun
Of course not, just send the corresponding mime type to the file extension .css Probably header('Content-Type: text/css'); Good luck ;) On Sun, Aug 16, 2009 at 11:37 PM, Daniel Kolbo wrote: > Hello, > > I realize this is more of an html question than a php, but I was hoping > someone here would

Re: [PHP] PHP: Writing to CD/DVD?

2009-07-23 Thread Nitsan Bin-Nun
That's what I was just about writting. If you use linux --> you can shot calls to the system and watch it's response! Then all you have to do is to install a cd burning software which have an ability to control it through the terminal! Good luck mate! On Fri, Jul 24, 2009 at 1:47 AM, Diogo Neve

Re: [PHP] Linking to images above the webspace

2009-07-17 Thread Nitsan Bin-Nun
Everyone should be careful with every stuff, you can also inject a LOAD_FILE('/etc/passwd') into a MYSQL query easily. On Fri, Jul 17, 2009 at 2:28 PM, Michelle Konzack < linux4miche...@tamay-dogan.net> wrote: > Am 2009-07-17 14:23:30, schrieb Nitsan Bin-Nun: > > Yo

Re: [PHP] Linking to images above the webspace

2009-07-17 Thread Nitsan Bin-Nun
You can create a PHP script which will serve files based on their location which will be transfered through a GET parameter. Just send the correct response headers which will be corresponded to the file's mime type, size, etc. Then use something like: Good luck! On Fri, Jul 17, 2009 at 2:19 PM

Re: [PHP] Re: Image Type BMP @ "Save Image As" Dialog on IE

2009-06-28 Thread Nitsan Bin-Nun
I have been working on it for a while but no luck. I personally don't have IE to test it but my customer have noticed it and brought it up to the table. If you have any ideas I would like to hear you out :) On Sun, Jun 28, 2009 at 5:28 PM, Martin Zvarík wrote: > Nitsan Bin-Nun

[PHP] Image Type BMP @ "Save Image As" Dialog on IE

2009-06-26 Thread Nitsan Bin-Nun
I have wrote a PHP script that serves JPEG images in smaller size, the resize is done using GD on-the-fly. I have noticed an interesting issue during the "save image as..." dialog on serveral internet explorer browsers, somehow, for some strange reason, the JPEG file is shown as BMP file. I don't

Re: [PHP] Progressbar

2009-06-24 Thread Nitsan Bin-Nun
You can use either perl uploading with ajax or flash uploader. For the perl - google 'uber uploader' For the flash - google 'flash uploader site:de' and get into the first it should pop up something with fancy I think.. Good luck mate! On Wed, Jun 24, 2009 at 8:20 AM, Tom Sparks wrote: > > have

Re: [PHP] mirroring website

2009-06-21 Thread Nitsan Bin-Nun
Create 2 different configuration files, load the appropriate one after checking whether $_ENV['dev'] is set to 1 or 0 then all you have to do is to set the environment variable 'dev' to 1 or 0 through .htaccess file. After setting this up all you have to do is to rewrite the files whenever you want

Re: [PHP] Users Online?

2009-06-21 Thread Nitsan Bin-Nun
Why all this mess for such a simple thing? All you need is to allocate the last activity timestamp with userid in the users table, add 'last_activity' column to the users table then update it with every page load at the administration panel. Then all you need to do in order to print out the curren

Re: [PHP] This Friday's OT Thread

2009-06-19 Thread Nitsan Bin-Nun
Collage? you better try highschool ;) Anyway tomorrow my sis has bat-mitzva ;) Good night folks! On Fri, Jun 19, 2009 at 8:42 PM, Daniel Brown wrote: >Hey, folks; > >It's been a while since we've launched a Friday OT thread, so here > ya' go. Feel free to post nonsense, babble, share

Re: [PHP] 3d image rotating

2009-06-14 Thread Nitsan Bin-Nun
As I have already mentioned, you can read the whole derivation of this 3d perspective engine and write it down using GD. It should not be such a big issue. Good luck! On Sun, Jun 14, 2009 at 3:07 PM, דניאל דנון wrote: > That not what I meant, but I found a solution with (sadly, wanted pure GD,

Re: [PHP] High ID (unique, auto increment) causes slow responses on PHP (MySQL)

2009-06-13 Thread Nitsan Bin-Nun
Just use SERIAL id and you will be good ;) (that's an alias for something like BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY) It shouldn't bother you as long as it works. On Sat, Jun 13, 2009 at 9:16 PM, דניאל דנון wrote: > I've built a certain system where every time new user enters it

Re: [PHP] 3d image rotating

2009-06-13 Thread Nitsan Bin-Nun
He treats the image as width, height and 1 pixel of depth. It should not be a problem as long as you finished Kita Yud Bet with 5 points of math (trigo & vectors) ;) Good luck! On Sat, Jun 13, 2009 at 1:44 PM, Ashley Sheridan wrote: > On Fri, 2009-06-12 at 11:55 +0300, דניאל דנון wrote: > > Hel

Re: [PHP] phpMyAdmin, localhost, mysql overhead

2009-06-12 Thread Nitsan Bin-Nun
De: nit...@binnun.co.il [mailto:nit...@binnun.co.il] Em nome de Nitsan > Bin-Nun > Enviada em: sexta-feira, 12 de junho de 2009 14:33 > Para: Jônatas Zechim > Cc: php-general@lists.php.net > Assunto: Re: [PHP] phpMyAdmin, localhost, mysql overhead > > > > I haven

Re: [PHP] phpMyAdmin, localhost, mysql overhead

2009-06-12 Thread Nitsan Bin-Nun
I haven't read all your mail, I'm sorry for it in advance, but I think that you should know that "overheard" is just a blasting phrase for something which was made up by phpmyadmin. Basically, when you run a lot of DELETE or UPDATE queries on a table an "overhead" is created, generally speaking th

Re: [PHP] Re: Same Page, Fundamentally Different Behavior OR is Firefox broken?

2009-06-11 Thread Nitsan Bin-Nun
As Manuel said, have you tried to send no-cache headers and tags? -- Nitsan On Fri, Jun 12, 2009 at 8:04 AM, Manuel C. wrote: > Matt Neimeyer a écrit : > > I'm at a complete loss... So I'm hoping someone can point me in the >> right direction to even start looking. >> >> We have an applicatio

Re: [PHP] Preventing XSS Attacks

2009-06-10 Thread Nitsan Bin-Nun
Usually I would support you on this one. In chemistry you always keep your stock "pure" and make any observations or mixtures in clean and other glasses in order to keep it pure. When it comes to printing an output or hosting it in a variables and then printing it out it is just a matter of taste.

Re: [PHP] Preventing XSS Attacks

2009-06-10 Thread Nitsan Bin-Nun
That would do the job. If you are already digging into it, take a look at XSRF/CSRF which are both can be very harmful, especially for ecommerce websites. On Wed, Jun 10, 2009 at 8:08 PM, Ashley Sheridan wrote: > On Wed, 2009-06-10 at 19:03 +0100, Ashley Sheridan wrote: >> On Wed, 2009-06-10 at 2

Re: [PHP] Re: Cross site scripting

2009-06-09 Thread Nitsan Bin-Nun
XSS or Cross Site Scripting is the ability to inject malicious javascript or HTML to the $_POST or $_GET variables, and at the bottom line - to get them printed and output-ed to the client through the HTML code of the page. In order to avoid such security issues all you have to do is to sanitise t

Re: [PHP] Any conflict with $_POST when 2 users concurrently submitting the same form using POST method?

2009-06-09 Thread Nitsan Bin-Nun
Hell no! Why would they be overwritten? An HTTP request is sent from user A, the interpreter is "compiling" the PHP script with the received HTTP request variables and send back the HTTP response to user A, during this time the same thing happens with user B. I can't think of any possible reason

Re: [PHP] how to get rid of that annoying |

2009-06-08 Thread Nitsan Bin-Nun
Your code is worse than spaghetti. (and spaghetti usually looks good..) I would suggest you to wire it up again even befores figuring out the appended | in it ;) -- Nitsan On Mon, Jun 8, 2009 at 8:56 PM, PJ wrote: > I know this a silly question, but I can't figure out if it's even > possibl

Re: [PHP] alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma'

2009-06-08 Thread Nitsan Bin-Nun
I wrote that function in a couple of minutes, haven't dedicated much time to think of the efficiency of it, you are definitely right but I'm pretty much sure that for 10 segments URLs you won't feel the difference. If you want I can benchmark it. Thanks for the heads up. -- Nitsan On Mon, Jun 8,

Re: [PHP] Converting MP3 to FLV On-The-Fly

2009-06-07 Thread Nitsan Bin-Nun
." screen, which still can take some time and be a bad > user experience) in my experience hasn't been ideal and won't scale > very well. > > On Sun, Jun 7, 2009 at 11:04 AM, Nitsan Bin-Nun > wrote: > > I thought of using FFMPEG but I have a bit of experience with

Re: [PHP] Converting MP3 to FLV On-The-Fly

2009-06-07 Thread Nitsan Bin-Nun
I thought of using FFMPEG but I have a bit of experience with it. Any links or more specific directions would be great. On Sun, Jun 7, 2009 at 7:48 PM, wrote: > > Hi Lista > > > > I'm trying to figure how I can turn MP3 files into FLV files on the fly > > using PHP. > > I'm having a server and I

[PHP] Converting MP3 to FLV On-The-Fly

2009-06-07 Thread Nitsan Bin-Nun
Hi Lista I'm trying to figure how I can turn MP3 files into FLV files on the fly using PHP. I'm having a server and I can install 3rd party software in order to accomplish this conversion. I have never dealt before with music file comression or anything similar so I don't know what I should look

Re: [PHP] alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma'

2009-06-07 Thread Nitsan Bin-Nun
/ eof > -- Nitsan On Sun, Jun 7, 2009 at 3:17 PM, דניאל דנון wrote: > $v['alpha']['beta']['gamma'] = 'delta'; > > (or) > > array( > "alpha" => array("beta" => array("gamma" => "delta")))

Re: [PHP] Outputting File To The Browser Failed And Kill Apache

2009-06-07 Thread Nitsan Bin-Nun
, Tom Worster wrote: > On 6/6/09 7:28 AM, "Nitsan Bin-Nun" wrote: > > > The files are one directory up from the www root, because that I don't > want > > straight access to them, only by validation which will be done in this > php > > file. > > &g

Re: [PHP] alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma'

2009-06-07 Thread Nitsan Bin-Nun
... > > On Sun, Jun 7, 2009 at 2:53 PM, Nitsan Bin-Nun wrote: > > Don't forget to send a copy to the list ;) > > > > Regarding your function, I'm writing it right now, it would probably have > > some issues but I think that it would work: > > > >

Re: [PHP] alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma'

2009-06-07 Thread Nitsan Bin-Nun
> $var = somefunction($var); > > print_r($var); // array("alpha" => array("beta" => "gamma")) > > > On Sun, Jun 7, 2009 at 2:33 PM, Nitsan Bin-Nun wrote: > > I think that he is talking about uri rewriting :O > > > > On Sun

Re: [PHP] alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma'

2009-06-07 Thread Nitsan Bin-Nun
I think that he is talking about uri rewriting :O On Sun, Jun 7, 2009 at 2:04 PM, Angus Mann wrote: > ??? Huh ??? > > > - Original Message - From: "דניאל דנון" > To: "PHP General List" > Sent: Sunday, June 07, 2009 8:11 PM > Subject: [PHP] alpha/beta/gamma TO $var['alpha']['beta'] = '

Re: [PHP] Outputting File To The Browser Failed And Kill Apache

2009-06-05 Thread Nitsan Bin-Nun
r apache user is exceeding system limitations? > > For further detail have a look at > > http://www.ss64.com/bash/ulimit.html > > Greetings from Germany > > Marc > > > > Nitsan Bin-Nun wrote: > >> Hi List, >> >> I'm using the following code to o

[PHP] Outputting File To The Browser Failed And Kill Apache

2009-06-05 Thread Nitsan Bin-Nun
Hi List, I'm using the following code to output a file to the browser. Each file size is in the range of 5-10MB, all of them are MP3. header("Pragma: public"); > header("Expires: 0"); > header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); > header("Cache-Control: public"); > heade

Re: [PHP] formatting - design question

2009-06-04 Thread Nitsan Bin-Nun
>From my experience I tend to use a difference ID for the body tag, for instance and then format it in my CSS using ID reference: #homepage .classname { color: blue; } This way you can use a default format for all the pages and create minor (or major) changes in the theme in no time :) I w

Re: [PHP] How To Limit FIle Uploader Against Hijackers?

2009-05-31 Thread Nitsan Bin-Nun
That's what I thought, I just wanted to make sure I'm on the right path :) Thank you On 5/31/09, Michael A. Peters wrote: > > Nitsan Bin-Nun wrote: > >> What do you mean by session variables? >> I should register a new session and pass it along with the file to

Re: [PHP] How To Limit FIle Uploader Against Hijackers?

2009-05-30 Thread Nitsan Bin-Nun
What do you mean by session variables? I should register a new session and pass it along with the file to the PHP wrapper? On Sat, May 30, 2009 at 10:02 PM, Michael A. Peters wrote: > Nitsan Bin-Nun wrote: > >> >> >> On Sat, May 30, 2009 at 7:02 PM

Re: [PHP] How To Limit FIle Uploader Against Hijackers?

2009-05-30 Thread Nitsan Bin-Nun
On Sat, May 30, 2009 at 7:02 PM, Ashley Sheridan wrote: > On Sat, 2009-05-30 at 17:54 +0200, Nitsan Bin-Nun wrote: > > That's the verification that my layer does. I'm not sure whether that's > > enough or not. > > > > On Sat, May 30, 2009 at 4:43 PM, Mi

Re: [PHP] How To Limit FIle Uploader Against Hijackers?

2009-05-30 Thread Nitsan Bin-Nun
That's the verification that my layer does. I'm not sure whether that's enough or not. On Sat, May 30, 2009 at 4:43 PM, Michael A. Peters wrote: > Nitsan Bin-Nun wrote: > > On Sat, May 30, 2009 at 3:26 PM, Michael A. Peters > mpet...@mac.com>> wro

Re: [PHP] How To Limit FIle Uploader Against Hijackers?

2009-05-30 Thread Nitsan Bin-Nun
On Sat, May 30, 2009 at 3:26 PM, Michael A. Peters wrote: > Nitsan Bin-Nun wrote: > >> Hi >> >> I have wrote a file uploader in PHP, and I don't want people to hijack it >> (get direct links, download whenever they want, etc). >> >> Currently I

Re: [PHP] Pointer for csv files

2009-05-30 Thread Nitsan Bin-Nun
http://il.php.net/manual/en/function.file.php http://il.php.net/manual/en/function.str-getcsv.php http://il.php.net/fgetcsv You can go through the lines and start buffering them when you get to 400, and stop the buffer and continue; the loop when you reach line 1400. On Sat, May 30, 2009 at 12:56

[PHP] How To Limit FIle Uploader Against Hijackers?

2009-05-30 Thread Nitsan Bin-Nun
Hi I have wrote a file uploader in PHP, and I don't want people to hijack it (get direct links, download whenever they want, etc). Currently I have placed the uploaded files one directory up from the www root, and I'm hosting the files mime type in order to serve them on the fly. I'm trying to t

Re: [PHP] Hebrew Directory Names

2009-05-29 Thread Nitsan Bin-Nun
Your point is right but these code point does not exist in the subject string so this isn't the issue here. I'm really stuck at this one :S Thank you again for trying to help! On Fri, May 29, 2009 at 2:40 PM, Tom Worster wrote: > On 5/28/09 2:06 PM, "Nitsan Bin-Nun" wr

Re: [PHP] Hebrew Directory Names

2009-05-28 Thread Nitsan Bin-Nun
On Thu, May 28, 2009 at 8:37 PM, Tom Worster wrote: > On 5/28/09 2:06 PM, "Nitsan Bin-Nun" wrote: > > > i have tried this: > > > > >> > >> $default_locale = setlocale(LC_ALL, 'en_US.UTF-8'); > >> ini_set('default_

Re: [PHP] Hebrew Directory Names

2009-05-28 Thread Nitsan Bin-Nun
i have tried this: > $default_locale = setlocale(LC_ALL, 'en_US.UTF-8'); > ini_set('default_charset', 'UTF-8' ); > > > $_GET['folder'] = > preg_replace("/([\xE0-\xFA])/e","chr(215).chr(ord(\${1})-80)",$_GET['folder']); > > $dirname = $config['walls_dir'].$_GET['folder']."/".$_GET['filename']; > >

[PHP] Hebrew Directory Names

2009-05-28 Thread Nitsan Bin-Nun
Hi I have wrote a files-based php system which not requires any kind of database to work, it is based upon files and directories. I'm using scandir() to fetch the file names of a directory, when the files and the directories are in English everything works like a charm, the problems starting when

Re: [PHP] I need ideas for things to code

2009-04-27 Thread Nitsan Bin-Nun
IMO all you need is a cellphone with some normal calendar features. I do also tend to use Google Calendar from time to time to text me whenever something shows up on the board. Google Apps is also very useful for email managing, etc. HTH, Nitsan On Mon, Apr 27, 2009 at 10:29 PM, Govinda wrote:

Re: [PHP] Change color of anything in double/single quotes

2009-04-26 Thread Nitsan Bin-Nun
That's what I was just about saying, in addition try to add the HTML entities to the regular expression as well: $string = preg_replace('/(?:& #34;|")(.*?)(?:& #34;|")/', '"\\1"', $string); Also if you don't to get caught by the HTML validator you better surround the color name with double quotes

Re: [PHP] how to determine if a mysql query returns an empty set?

2009-04-23 Thread Nitsan Bin-Nun
mysql_num_rows() maybe? if not I probably haven't understood your question. On Thu, Apr 23, 2009 at 8:12 PM, Adam Williams wrote: > Is there a way to determine if a mysql query returns an empty set? I am > selecting 10 results at a time with a limit statement and need to know when > i've ran out

[PHP] Creating A Chat?

2009-04-20 Thread Nitsan Bin-Nun
Hi Guys, I have created few chats in the past, but I'm trying to create a new one which saves on HTTP requests and do not become an overkill to the server as more users get in. The chat is a one on one, I'm trying to achieve this: * A user sends a message * The message is not saved/save temporari

Re: [PHP] Need Your Help :) I'm Just About Creating File Uploading Service

2009-04-16 Thread Nitsan Bin-Nun
10:58 PM, Michael A. Peters wrote: > Nitsan Bin-Nun wrote: > >> Neh, we don't have plenty of these in Israel, don't count it in as an >> issue. >> >> Serving the files won't be an overkill for my harddrive / cpu usage / >> anything else? >>

Re: [PHP] Need Your Help :) I'm Just About Creating File Uploading Service

2009-04-16 Thread Nitsan Bin-Nun
Neh, we don't have plenty of these in Israel, don't count it in as an issue. Serving the files won't be an overkill for my harddrive / cpu usage / anything else? There is a better way to serve the files with/without PHP and keeping them outsite of the HTTP root? Thanks in Advance, Nitsan On Thu

Re: [PHP] Need Your Help :) I'm Just About Creating File Uploading Service

2009-04-16 Thread Nitsan Bin-Nun
You are definitely right, but there is one thing that you didn't knew and I'm sure that you didn't take into account - usually the files on the server will be DVD rip's that are typically 700MB~ in size, every second movie that people will download will contain some interrupted pieces, although tha

Re: [PHP] Need Your Help :) I'm Just About Creating File Uploading Service

2009-04-16 Thread Nitsan Bin-Nun
My bad, I'm sending a copy to the list. On Thu, Apr 16, 2009 at 9:37 PM, Nitsan Bin-Nun wrote: > Actually I don't much care for that, IMO 700MB~ is way too big for HTTP, I > thought of giving away FTP links for download, but I have thought of the > following: > * Firs

Re: [PHP] Need Your Help :) I'm Just About Creating File Uploading Service

2009-04-16 Thread Nitsan Bin-Nun
What is Amazon SSS?? On Thu, Apr 16, 2009 at 8:59 PM, Leonard Burton wrote: > Why not use something like Amazon SSS and not worry about a lot of the > details? > > On Thu, Apr 16, 2009 at 2:29 PM, Nitsan Bin-Nun > wrote: > > Hi List, > > > > I have been thinkin

[PHP] Need Your Help :) I'm Just About Creating File Uploading Service

2009-04-16 Thread Nitsan Bin-Nun
Hi List, I have been thinking for a while about setting up my own rapidshare.comclone, Few days back I went really serious with this and came up with some ideas. This is where I need your help, my partner and I have been thinking about the system that the website should run on. We came to conclus

Re: [PHP] alt() - unknown function?

2009-04-16 Thread Nitsan Bin-Nun
alt sounds like alternator ;) On Wed, Apr 15, 2009 at 10:00 PM, Paul M Foster wrote: > On Wed, Apr 15, 2009 at 03:23:19PM +0100, Tom Calpin wrote: > > > Hi all, > > > > I've just started looking at the code of an e-commerce site we are taking > > over the development of, that another company has

Re: [PHP] multi-dimensional arrays

2009-04-13 Thread Nitsan Bin-Nun
Just wondering, there is callback version of preg_match_all() ? if so you could have done it in one line I think.. On Mon, Apr 13, 2009 at 9:52 PM, Andres Gonzalez wrote: > I was having the same problem. The second way was what I was looking for. > > Thank you so much for your help--I did not kno

Re: [PHP] multi-dimensional arrays

2009-04-13 Thread Nitsan Bin-Nun
$string = "xxx xx x xx xxx xxx xx x xx xxx"; $t = explode("\n", $string); foreach ($t as $k => $v) $t[$k] = explode(" ", $v); var_dump($t); On Mon, Apr 13, 2009 at 8:55 PM, Andres Gonzalez wrote: > Hi, > > I am learning PHP and have a simple question. > I have a inpu

Re: [PHP] what to use instead of foreach

2009-04-13 Thread Nitsan Bin-Nun
var_dump(implode("", $array) . ""); On Mon, Apr 13, 2009 at 7:07 PM, PJ wrote: > Hi Leon & thanks. > It sure is complicated. Jim Lucas example did the trick very nicely (in > my other post - > "extract varying data from array with different formatting" but here I > am learning about other ways &

Re: [PHP] Regex

2009-03-26 Thread Nitsan Bin-Nun
an error: Warning: preg_replace(): Compilation > failed: nothing to repeat at offset 17 > > > > > > > > > > Thanks, > > > > Jesse Hazen > ------ > > *From:* nit...@binnun.co.il [mailto:nit...@binnun.co.il] *On Behalf

Re: [PHP] Regex

2009-03-26 Thread Nitsan Bin-Nun
; > > Jesse Hazen > > _ > > arvato digital services llc > > A Bertelsmann Company > > 29011 Commerce Center Dr. > > Valencia, CA 91355 > > > > http://arvatodigitalservices.com > > > > jesse.ha...@arvatousa.com > > Tel

Re: [PHP] Regex

2009-03-26 Thread Nitsan Bin-Nun
To filter out everything which is not A-Z, a-z and 0-9 try this regex: $str = preg_replace("#[^a-zA-Z0-9]+#is", "", $str); On Thu, Mar 26, 2009 at 10:23 PM, wrote: > Hi, > > > > Brand new to regex. So I have a cli which runs a regex on users input, > to make sure that only 0-9 and A-Z are accep

Re: [PHP] Frameworks Which Have A "Bake" Function?

2009-03-22 Thread Nitsan Bin-Nun
into Doctorine &|| Propel, they both will take a db structure -> > models. Symfony might be worth looking at, you can tell it to create a basic > view/controller for them as well. > > Graham > > On Mar 22, 2009, at 11:52 AM, Nitsan Bin-Nun wrote: > > Hi Guys, >> >&g

[PHP] Frameworks Which Have A "Bake" Function?

2009-03-22 Thread Nitsan Bin-Nun
Hi Guys, I have been using cakephp for a while as a development framework. I'm also thinking for a while to use another framework and leave cakephp alone (too much babbling.. it takes too much time until you get to the code itself..), now I have decided to move on and here comes my question. Do

Re: [PHP] So called "PHP Expert"

2009-03-20 Thread Nitsan Bin-Nun
Hi Daniel, Please keep these things out of the list. I'm sure that you want to have programming related stuff going on this list instead of discussions about telling someone lessons in life. We all do want the same, we want to have php related questions and discussions (also some funny and humor d

Re: [PHP] Re: GeoIP?

2009-03-15 Thread Nitsan Bin-Nun
Hi Michelle, Try to use sqlite instead of any other database. It will be better I guess. Regards, Nitsan On Sun, Mar 15, 2009 at 9:08 PM, zerof wrote: > Michelle Konzack escreveu: > >> Hello Nitsan, >> >> Am 2009-03-15 15:39:26, schrieb Nitsan Bin-Nun: >> >

Re: [PHP] GeoIP?

2009-03-15 Thread Nitsan Bin-Nun
Take a look at this: http://www.maxmind.com/app/geolitecountry Use indexes, I think the checkup won't take long. HTH, Nitsan On Sun, Mar 15, 2009 at 3:06 PM, tedd wrote: > At 1:52 PM +0100 3/15/09, Michelle Konzack wrote: > >> Hello, >> >> I am in creation of a WaveLAN service in Germany and

Re: [PHP] Long Execution Time - Safe Mode

2009-03-08 Thread Nitsan Bin-Nun
I don't know if it will work but it definitely worth's a shoot.. try to create a recursive call from your php page to the same php page, then in each call make let's say umm 10 edits, using this method you will probably be able to bypass the server's limitations, but I had never tested it so I can'

Re: [PHP] Database Abstraction Class

2009-03-07 Thread Nitsan Bin-Nun
I'm personally using CI DB abstraction layer, also used zend_db, they both good but as Eric said, I think PDO is a better option. On Sat, Mar 7, 2009 at 7:34 PM, Eric Butera wrote: > On Sat, Mar 7, 2009 at 8:04 AM, Michael A. Peters wrote: > > In some earlier thread (I really don't want to dig

Re: [PHP] Unexplained Issue Using Regex

2009-03-07 Thread Nitsan Bin-Nun
without any cost. Visit : > www.ubuntu.com > -- > > > On Sat, Mar 7, 2009 at 3:46 PM, Nitsan Bin-Nun wrote: > >> There is no reason to share the code because it happens with almost ALL >> the regex&#

Re: [PHP] Unexplained Issue Using Regex

2009-03-07 Thread Nitsan Bin-Nun
There is no reason to share the code because it happens with almost ALL the regex's I'm using :( But I worked this out using Todd's solution. Thank you all for trying to help. On Sat, Mar 7, 2009 at 11:06 AM, 9el wrote: > > On Sat, Mar 7, 2009 at 2:37 PM, Jochem Maas w

Re: [PHP] Unexplained Issue Using Regex

2009-03-06 Thread Nitsan Bin-Nun
Got it, thank you Todd. I usually tend to use string based functions instead of regex, but sometimes regex is a better option. On Sat, Mar 7, 2009 at 12:16 AM, haliphax wrote: > On Fri, Mar 6, 2009 at 4:01 PM, Nitsan Bin-Nun > wrote: > > On Fri, Mar 6, 2009 at 11:53 PM, hal

Re: [PHP] Unexplained Issue Using Regex

2009-03-06 Thread Nitsan Bin-Nun
I'm not a regex expert and I'm sure there a way better solutions to this problem. On Fri, Mar 6, 2009 at 11:53 PM, haliphax wrote: > On Fri, Mar 6, 2009 at 3:44 PM, Nitsan Bin-Nun > wrote: > > I'm not looking for other ideas, the main thing here is that I have ab

Re: [PHP] Unexplained Issue Using Regex

2009-03-06 Thread Nitsan Bin-Nun
ve any ideas regarding my issue and not going in another way this would be very appreciated. Thank you again for trying to help. On Fri, Mar 6, 2009 at 11:40 PM, Jim Lucas wrote: > Nitsan Bin-Nun wrote: > > Hi lista, > > > > I have been trying to figure this out for the l

Re: [PHP] Unexplained Issue Using Regex

2009-03-06 Thread Nitsan Bin-Nun
ng, '/')+1, > strlen($string))."\n"; > echo $replaceWithThis.substr(strrchr($string, '/'), 1, > strlen(strrchr($string, '/'))); > > > ?> > > OUTPUT: > > C:\>php test.php > http://www.zshare.net/video/541070871c7a8d9c > H

[PHP] Unexplained Issue Using Regex

2009-03-06 Thread Nitsan Bin-Nun
Hi lista, I have been trying to figure this out for the last couple of hours but I'm lack of luck. Take a look at these regex's, the string that was inputed into the preg_replace (using Uis modificators) and the results: (the lists have correspondence to each other) ORIGINAL STRING http://w

Re: [PHP] upload progress (was www.soongy.com)

2009-03-02 Thread Nitsan Bin-Nun
I have just been wondering for the 20 zillion time why does people always stick together "20" and "zillion"? you can't just use "zillion times"? is that not enough for you? On Mon, Mar 2, 2009 at 10:26 PM, Michael A. Peters wrote: > mike wrote: > >> On Mon, Mar 2, 2009 at 7:45 AM, Boyd, Todd M.

Re: [PHP] www.soongy.com

2009-03-01 Thread Nitsan Bin-Nun
There is no need to go that far, try to google a bit about swfupload. In short, this is a flash & javascript component that give's you the ability to maintain the upload, get the current speed, get the current amount of uploaded data, etc. It is very simple and works like a charm on a dedi server.

Re: [PHP] Browser timeout

2009-02-27 Thread Nitsan Bin-Nun
Hi Daniel, Can you supply more information regarding this script? what it does? Regards, Nitsan דרך אגב נחמד לראות פה עוד ישראלים שבת שלום

Re: [PHP] Heredoc inside eval?

2009-02-14 Thread Nitsan Bin-Nun
I haven't figured from your sayings if my solutions worked? I haven't tested them so I thought you would check them out ;) Nitsan On Sat, Feb 14, 2009 at 6:59 PM, Michael N. Madsen wrote: > Sorry for not including a a code example of the template. > > > .. >{$content} > > This template

Re: [PHP] Heredoc inside eval?

2009-02-14 Thread Nitsan Bin-Nun
For instance you have: The simplest way to eval() it is to use: eval("?>" . $string_of_html_and_php . " On Sat, Feb 14, 2009 at 3:58 PM, Michael wrote: > I have a html template with php variables. I then run it through eval(). > All that works fine. Problem is that when I add simple html attrib

Re: [PHP] Boolean Assignment Operator

2009-02-02 Thread Nitsan Bin-Nun
It actually will return FATAL ERROR or something like that since you didn't echo'ed variables or string ;) On Mon, Feb 2, 2009 at 3:03 PM, Edmund Hertle wrote: > 2009/2/2 Gavin Hodge > > > Hi, > > > > I'm fairly new to PHP, having migrated from the Java / C# world. > > > > I wrote some code sim

Re: [PHP] frameworks

2009-01-30 Thread Nitsan Bin-Nun
e just got to manage ;) On Fri, Jan 30, 2009 at 9:26 PM, Skip Evans wrote: > Nitsan Bin-Nun wrote: > >> I usually uses CI, just because it is written in PHP4 and in about 50% of >> the servers in Israel there is no PHP5 :X >> > > I am just curious. Why is PHP 5 so r

Re: [PHP] frameworks

2009-01-30 Thread Nitsan Bin-Nun
e whole kit > and kaboodle > > Speed - CodeIgniter seems to be the winner for now > > Completeness - symfony has a full ORM layer > > Mix of the above - cakephp > > Each comes with its own learning curve from easy to steep... downloaded > several and play with them to work out what fits your needs > > > -- > > Bastien > > Cat, the other other white meat > -- ?> Nitsan Bin-Nun Web Applications Developer nit...@binnun.co.il 972-52-5722039

[PHP] PHP Enclosing Tags? Do You Close Your PHP Declarations?

2009-01-30 Thread Nitsan Bin-Nun
I was just wondering whether people enclosing their PHP tags declarations, I don't close these Nitsan Bin-Nun Web Applications Developer nit...@binnun.co.il 972-52-5722039

Re: [PHP] Database Tables Relation Issue

2009-01-30 Thread Nitsan Bin-Nun
ables :P On Fri, Jan 30, 2009 at 4:10 PM, Bastien Koert wrote: > > > On Fri, Jan 30, 2009 at 8:37 AM, Andrew Ballard wrote: > >> On Fri, Jan 30, 2009 at 3:38 AM, Nitsan Bin-Nun >> wrote: >> > Hi there, >> > >> > I'm working on something s

[PHP] Database Tables Relation Issue

2009-01-30 Thread Nitsan Bin-Nun
weeks it will have 10-20 unique visitors/DAY ;) -- ?> Nitsan Bin-Nun Web Applications Developer nit...@binnun.co.il 972-52-5722039

Re: [PHP] Kinda 0.T... php site and maintenance

2009-01-26 Thread Nitsan Bin-Nun
I have just quitted from my partial time job at the company. I did some personally sites like that for 2 banks here in Israel. When I do something like that I usually basing the whole thing on the known blogging platform WordPress, it has a massive power inside of it, the templating system is very

Re: [PHP] Dirty Button

2009-01-25 Thread Nitsan Bin-Nun
Since you are using JS why not just update the content straight away? (ajax/etc) On Sun, Jan 25, 2009 at 7:55 PM, tedd wrote: > Hi gang: > > I had a problem and solved it -- here's the write-up: > > http://www.webbytedd.com/b/update-select/index.php > > What do you think of the solution? > > Che

Re: [PHP] Military <-> Standard times

2009-01-21 Thread Nitsan Bin-Nun
Umm I don't think there is a better option, you probably can return the output straight: function standardToMilitary($t) { return strftime('%R', strtotime($t)); } function militaryToStandard($t) { return strftime('%r', strtotime($t)); } But it doesn't really matter. On Wed, Jan 21,

Re: [PHP] What's the best way to rotate, resize, and thumbnail?

2009-01-15 Thread Nitsan Bin-Nun
Umm I don't think there is any benchmark tests that will suit your case, it really depends on what you are going to do to the image. I suggest you to benchmark and measure these things, I also know codeigniter has a built-in image editing class, and as far as I remember you can choose in your confi

Re: [PHP] FirePHP -- pretty cool

2009-01-11 Thread Nitsan Bin-Nun
I'm using FireBug 24/7/365 and I also knew FirePHP before but I never tried it or had any experience with it that I can share. There are any other options and functions that FirePHP gives which not require you to involve changing your code? Nitsan On Sun, Jan 11, 2009 at 6:46 PM, Skip Evans wrot

Re: [PHP] Parsing out excel's .xls textboxes?

2008-11-13 Thread Nitsan Bin-Nun
It is binary file, saved from office 2003. There is no way of changing the office version (so I can save it as .xml of something) so I have to figure out how to parse these textboxes. Nitsan On 11/14/08, Ashley Sheridan <[EMAIL PROTECTED]> wrote: > > On Fri, 2008-11-14 at 00:45 +0200

[PHP] Parsing out excel's .xls textboxes?

2008-11-13 Thread Nitsan Bin-Nun
Hi, I have an excel parser I found out on the net a while ago. It does a really great job untill now. I need to parse out an excel file (.xls) with excel's textboxes in it, I want to fetch the textboxes content from the .xls somehow. I have no idea where to look out for this, I have even considere

  1   2   >