Re: [PHP] Re: what's the difference in the following code?

2008-10-19 Thread Andrew Ballard
On Sun, Oct 19, 2008 at 11:12 PM, Robert Cummings <[EMAIL PROTECTED]> wrote: > On Sun, 2008-10-19 at 23:02 -0400, Andrew Ballard wrote: >> On Sat, Oct 18, 2008 at 2:34 PM, Robert Cummings <[EMAIL PROTECTED]> wrote: >> > >> > On Sat, 2008-10-18 at 08:44 -0700, Yeti wrote: >> > > I would understand i

Re: [PHP] Re: what's the difference in the following code?

2008-10-19 Thread Robert Cummings
On Sun, 2008-10-19 at 23:02 -0400, Andrew Ballard wrote: > On Sat, Oct 18, 2008 at 2:34 PM, Robert Cummings <[EMAIL PROTECTED]> wrote: > > > > On Sat, 2008-10-18 at 08:44 -0700, Yeti wrote: > > > I would understand it if it was like this .. > > > > > > > > $search = isset($_GET['search']) ? $_GET[

Re: [PHP] Re: what's the difference in the following code?

2008-10-19 Thread Andrew Ballard
On Sat, Oct 18, 2008 at 2:34 PM, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Sat, 2008-10-18 at 08:44 -0700, Yeti wrote: > > I would understand it if it was like this .. > > > > > $search = isset($_GET['search']) ? $_GET['search'] : ''; > > # versus > > if (isset($_GET['search'])) { $search

Re: [PHP] Information on Cookies

2008-10-19 Thread Ashley Sheridan
On Sun, 2008-10-19 at 19:12 -0500, Micah Gersten wrote: > Don't use cookies, use sessions. > > Thank you, > Micah Gersten > onShore Networks > Internal Developer > http://www.onshore.com > > > > Ben Stones wrote: > > I've read a few videos on cookie security and it makes sense that people can >

Re: [PHP] Information on Cookies

2008-10-19 Thread Micah Gersten
Don't use cookies, use sessions. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Ben Stones wrote: > I've read a few videos on cookie security and it makes sense that people can > modify cookie values which is a problem I'm trying to figure out to *try* > and

Re: [PHP] Best way to recieve image from url?

2008-10-19 Thread Micah Gersten
If you're using file_get_contents, why aren't you using file_put_contents? Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Nitsan Bin-Nun wrote: > Hi, > I have this function: > > > function saveImageFromUrl($image_url, $image_save) > { > $cont

Re: [PHP] Best way to recieve image from url?

2008-10-19 Thread Daniel Brown
On Sun, Oct 19, 2008 at 6:46 PM, Nitsan Bin-Nun <[EMAIL PROTECTED]> wrote: > > As you can see it fetches the images contents and write them to new image on > my local directory. > Is this is the best way to do this? (I don't have curl) Do you have GET or wget on your server, with exec() privil

Re: [PHP] Best way to recieve image from url?

2008-10-19 Thread Børge Holen
On Oct 20, 2008, at 12:46 AM, Nitsan Bin-Nun wrote: Hi, I have this function: function saveImageFromUrl($image_url, $image_save) { $contents = file_get_contents($image_url); $fp = fopen($image_save, 'w'); fwrite($fp, $contents); fclose($fp); } As you can

[PHP] Best way to recieve image from url?

2008-10-19 Thread Nitsan Bin-Nun
Hi, I have this function: function saveImageFromUrl($image_url, $image_save) { $contents = file_get_contents($image_url); $fp = fopen($image_save, 'w'); fwrite($fp, $contents); fclose($fp); } As you can see it fetches the images contents and write the

Re: [PHP] Securing AJAX requests with PHP?

2008-10-19 Thread Bastien Koert
On Sat, Oct 18, 2008 at 11:28 AM, Jay Moore <[EMAIL PROTECTED]> wrote: > Yeti wrote: > >> Ok, but how safe are tokens? >> Thinking of man in the middle attacks they do not make much sense, do >> they? >> > > That's what I was thinking too. If I'm deleting an entry from a database > with AJAX, I

Re: [PHP] Randomiser

2008-10-19 Thread Reese
Chris wrote: That works, but shuffle() is cleaner and then you can echo things out with a foreach() expression. http://www.php.net/manual/en/function.shuffle.php If you're doing a shuffle inside a loop, it's going to be even slower. Might not be an issue for the OP but after your array gets

Re: [PHP] Randomiser

2008-10-19 Thread Chris
Reese wrote: Andrew Barnett wrote: I ended up using an example from the PHP website. Just extended the array to the number of lines I needed. That works, but shuffle() is cleaner and then you can echo things out with a foreach() expression. http://www.php.net/manual/en/function.shuffle.php

Re: [PHP] logic for grabbing what we need from user-input addresses for AVS?

2008-10-19 Thread Ashley Sheridan
On Sun, 2008-10-19 at 11:26 -0400, Robert Cummings wrote: > On Sun, 2008-10-19 at 10:03 +0100, Ashley Sheridan wrote: > > On Sun, 2008-10-19 at 01:10 -0400, Robert Cummings wrote: > > > On Sat, 2008-10-18 at 22:56 -0600, Govinda wrote: > > > > Hi all > > > > > > > > This is not exactly PHP, but a

Re: [PHP] Re: searching by tags....

2008-10-19 Thread Ashley Sheridan
On Sun, 2008-10-19 at 16:34 +0200, Martin Zvarík wrote: > Ryan S napsal(a): > > Hey, > > > > this the first time I am actually working with "tags" but it seems quite > > popular and am adding it on a clients requests. > > > > By tags I mean something like wordpress' implementation of it, for exa

Re: [PHP] Re: Form Loop

2008-10-19 Thread Ashley Sheridan
On Sun, 2008-10-19 at 09:31 -0500, Shawn McKenzie wrote: > Rick Pasotto wrote: > > On Sat, Oct 18, 2008 at 08:07:26PM -0500, Shawn McKenzie wrote: > >> Terry J Daichendt wrote: > >>> I'm trying to create a form with a loop. I need to append a value to a > >>> field name each time through the loop.

Re: [PHP] Randomiser

2008-10-19 Thread Reese
Andrew Barnett wrote: I ended up using an example from the PHP website. Just extended the array to the number of lines I needed. That works, but shuffle() is cleaner and then you can echo things out with a foreach() expression. http://www.php.net/manual/en/function.shuffle.php Reese -- P

Re: [PHP] Randomiser

2008-10-19 Thread Chris
Andrew Barnett wrote: I ended up using an example from the PHP website. You're randomizing the whole array which when it gets large, will be noticeable. If you're using zero based arrays (like above - 'Neo' is item '0', 'Morpheus' is item '1'), I'd suggest something like this: $input = a

Re: [PHP] logic for grabbing what we need from user-input addresses for AVS?

2008-10-19 Thread Robert Cummings
On Sun, 2008-10-19 at 10:03 +0100, Ashley Sheridan wrote: > On Sun, 2008-10-19 at 01:10 -0400, Robert Cummings wrote: > > On Sat, 2008-10-18 at 22:56 -0600, Govinda wrote: > > > Hi all > > > > > > This is not exactly PHP, but an issue that we have to work out in code > > > (whatever we use) - >

Re: [PHP] logic for grabbing what we need from user-input addresses for AVS?

2008-10-19 Thread Govinda
On Oct 18, 2008, at 11:10 PM, Robert Cummings wrote: On Sat, 2008-10-18 at 22:56 -0600, Govinda wrote: To cut down on fraudulent orders, our cc processor (whatever we call them), to enable "Address Verification System (AVS)", ... The docs make this clear that they want: "The numeric port

[PHP] Re: searching by tags....

2008-10-19 Thread Martin Zvarík
Ryan S napsal(a): Hey, this the first time I am actually working with "tags" but it seems quite popular and am adding it on a clients requests. By tags I mean something like wordpress' implementation of it, for example when an author writes an article on babies the tags might be baby,babies,

Re: [PHP] Re: Form Loop

2008-10-19 Thread Shawn McKenzie
Rick Pasotto wrote: > On Sat, Oct 18, 2008 at 08:07:26PM -0500, Shawn McKenzie wrote: >> Terry J Daichendt wrote: >>> I'm trying to create a form with a loop. I need to append a value to a >>> field name each time through the loop. For Instance: >>> >>> while ($row = mysql_fetch_assoc($result)) { >

Re: [PHP] Form Loop

2008-10-19 Thread Bastien Koert
> >> >> the name value quantity needs the value of x appended to it. quantity_1, >> quantity_2 etc. >> > I recommend using array notation instead of appending $x to the element > name. If you are using POST, when the form is submitted the values are > available in the $_POST['quantity'] array. You

Re: [PHP] how to start using a version control system (subversion)?

2008-10-19 Thread Richard Heyes
> ... The subversion manual is the best place to learn about it. Section 2 tells you about setting up a repository. http://svnbook.red-bean.com/ -- Richard Heyes HTML5 Graphing for FF, Chrome, Opera and Safari: http://www.rgraph.org -- PHP General Mailing List (http://www.php.net/) To unsubs

Re: [PHP] Convert video to FLV like youtube

2008-10-19 Thread Rene Veerman
I use ffmpeg (unix commandline) to do the video converting.. ffmpeg needs to be properly re-compiled with mp3 support (for audio in the flv files); theres tutorials on google on how to do that. Are you on shared hosting? Most wont allow any kind of video conversion on shared hosting. I had t

[PHP] how to start using a version control system (subversion)?

2008-10-19 Thread Rene Veerman
Apologies for posting a monthly/yearly recurring theme here.. If someone can add links to previous discussions relating to the same, that could help too. I'd like to use subversion on a home unix server of mine to keep track of my projects. I dont even know what i need for a good intergration

Re: [PHP] paging at which level

2008-10-19 Thread Richard Heyes
> I'm still a little wet behind the ears, nih?! "Not Invented Here" -- Richard Heyes HTML5 Graphing for FF, Chrome, Opera and Safari: http://www.rgraph.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] paging at which level

2008-10-19 Thread Ashley Sheridan
On Sun, 2008-10-19 at 10:23 +0100, Richard Heyes wrote: > > I've not used a library to achieve paging > > NIH syndrome? ;-) > I'm still a little wet behind the ears, nih?! Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] paging at which level

2008-10-19 Thread Richard Heyes
> I've not used a library to achieve paging NIH syndrome? ;-) -- Richard Heyes HTML5 Graphing for FF, Chrome, Opera and Safari: http://www.rgraph.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] logic for grabbing what we need from user-input addresses for AVS?

2008-10-19 Thread Ashley Sheridan
On Sun, 2008-10-19 at 01:10 -0400, Robert Cummings wrote: > On Sat, 2008-10-18 at 22:56 -0600, Govinda wrote: > > Hi all > > > > This is not exactly PHP, but an issue that we have to work out in code > > (whatever we use) - > > I am working on a shopping cart site which will have orders from any

Re: [PHP] Form Loop

2008-10-19 Thread Ashley Sheridan
On Sun, 2008-10-19 at 14:10 +0530, Sudheer wrote: > > I'm trying to create a form with a loop. I need to append a value to a > > field name each time through the loop. For Instance: > > > > while ($row = mysql_fetch_assoc($result)) { > > $x=1; > > echo "";echo " > name='quantity_' siz

Re: [PHP] Form Loop

2008-10-19 Thread Sudheer
I'm trying to create a form with a loop. I need to append a value to a field name each time through the loop. For Instance: while ($row = mysql_fetch_assoc($result)) { $x=1; echo "";echo "name='quantity_' size='2' value='$row[qty]' />"; ?> echo ""; $x++; } the name va