On 5/24/2013 3:04 AM, Last Hacker Always onpoint wrote:
I needed something like this echo(rand(1,30))
On 5/24/13, Last Hacker Always onpoint wrote:
okay thanks tamouse and others you think am not on point hmmm? I'll
show you i am.
On 5/24/13, tamouse mailing lists wrote:
On Thu, May 23, 201
Lola
On Friday, May 24, 2013, Ashley Sheridan wrote:
>
>
> Last Hacker Always onpoint > wrote:
>
> >I needed something like this echo(rand(1,30))
> >
> >On 5/24/13, Last Hacker Always onpoint >
> wrote:
> >> okay thanks tamouse and others you think am not on point hmmm? I'll
> >> show you i am.
>
Last Hacker Always onpoint wrote:
>I needed something like this echo(rand(1,30))
>
>On 5/24/13, Last Hacker Always onpoint wrote:
>> okay thanks tamouse and others you think am not on point hmmm? I'll
>> show you i am.
>>
>> On 5/24/13, tamouse mailing lists wrote:
>>> On Thu, May 23, 2013 at
I needed something like this echo(rand(1,30))
On 5/24/13, Last Hacker Always onpoint wrote:
> okay thanks tamouse and others you think am not on point hmmm? I'll
> show you i am.
>
> On 5/24/13, tamouse mailing lists wrote:
>> On Thu, May 23, 2013 at 3:51 PM, Last Hacker Always onpoint
>> wrote
okay thanks tamouse and others you think am not on point hmmm? I'll
show you i am.
On 5/24/13, tamouse mailing lists wrote:
> On Thu, May 23, 2013 at 3:51 PM, Last Hacker Always onpoint
> wrote:
>> Hey I need code for random number 1-30 for my site.
>
> function rand_from_1_to_30() {
> retur
On Thu, May 23, 2013 at 3:51 PM, Last Hacker Always onpoint
wrote:
> Hey I need code for random number 1-30 for my site.
function rand_from_1_to_30() {
return 4;
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
His gmail name should be "Last last last last Hacker hacker acker
not-cker Never On-point" :)
On Thu, May 23, 2013 at 4:51 PM, Last Hacker Always onpoint <
lasthack...@gmail.com> wrote:
> Hey I need code for random number 1-30 for my site.
>
> --
> PHP General Mailing List (http://www.php.net/)
On 13-05-23 04:51 PM, Last Hacker Always onpoint wrote:
Hey I need code for random number 1-30 for my site.
http://php.net/manual/en/function.rand.php
--
Stephen
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On May 23, 2013, at 4:54 PM, Daniel Brown wrote:
> On Thu, May 23, 2013 at 4:51 PM, Last Hacker Always onpoint
> wrote:
>> Hey I need code for random number 1-30 for my site.
>
>You need to know that you've been removed from the list (but you'd
> still have to be subscribed to be able to re
On Thu, May 23, 2013 at 4:51 PM, Last Hacker Always onpoint
wrote:
> Hey I need code for random number 1-30 for my site.
You need to know that you've been removed from the list (but you'd
still have to be subscribed to be able to read this).
--
Network Infrastructure Manager
http://www.php.
On 23 May 2013, at 21:51, Last Hacker Always onpoint
wrote:
> Hey I need code for random number 1-30 for my site.
Seriously? Did you try to find out how to do this yourself before asking here?
http://php.net/rand
And, more generally:
http://php.net/docs
-Stuart
--
Stuart Dallas
3ft9 L
Im pretty sure its not a script error cause it always works a second later
jg
On Feb 10, 2013, at 2:48 PM, Matijn Woudt wrote:
>
>
>
> On Sun, Feb 10, 2013 at 6:53 PM, Jim Giner
> wrote:
> On 2/10/2013 12:45 PM, Andy McKenzie wrote:
> On Sat, Feb 9, 2013 at 11:51 AM, Geoff Shang wrote:
>
On Sun, Feb 10, 2013 at 6:53 PM, Jim Giner wrote:
> On 2/10/2013 12:45 PM, Andy McKenzie wrote:
>
>> On Sat, Feb 9, 2013 at 11:51 AM, Geoff Shang
>> wrote:
>>
>>> On Sat, 9 Feb 2013, Jim Giner wrote:
>>>
>>> Lately, my web pages are giving me some problems. Once a day or so one
or
mor
On 2/10/2013 12:45 PM, Andy McKenzie wrote:
On Sat, Feb 9, 2013 at 11:51 AM, Geoff Shang wrote:
On Sat, 9 Feb 2013, Jim Giner wrote:
Lately, my web pages are giving me some problems. Once a day or so one or
more of my pages/scripts will give me a 404 error page saying my web page
has timed o
On Sat, Feb 9, 2013 at 11:51 AM, Geoff Shang wrote:
> On Sat, 9 Feb 2013, Jim Giner wrote:
>
>> Lately, my web pages are giving me some problems. Once a day or so one or
>> more of my pages/scripts will give me a 404 error page saying my web page
>> has timed out. Problem is that the page was ju
On 2/9/2013 11:58 AM, Mike Mackintosh wrote:
On Saturday, February 9, 2013 at 11:51 AM, Geoff Shang wrote:
On Sat, 9 Feb 2013, Jim Giner wrote:
Lately, my web pages are giving me some problems. Once a day or so one or
more of my pages/scripts will give me a 404 error page saying my web page
On Saturday, February 9, 2013 at 11:51 AM, Geoff Shang wrote:
> On Sat, 9 Feb 2013, Jim Giner wrote:
>
> > Lately, my web pages are giving me some problems. Once a day or so one or
> > more of my pages/scripts will give me a 404 error page saying my web page
> > has
> > timed out. Problem is
On Sat, 9 Feb 2013, Jim Giner wrote:
Lately, my web pages are giving me some problems. Once a day or so one or
more of my pages/scripts will give me a 404 error page saying my web page has
timed out. Problem is that the page was just displayed. I click on a link,
the page shows up, I click
On 2/9/2013 11:21 AM, Andy McKenzie wrote:
Smart money is that it's nothing to do with you; in my experience,
that's usually a network problem. It could be on your end (I'm seeing
that a lot more often now that I've moved to a new house, or it could
be a problem with the server's connection.
On Sat, Feb 9, 2013 at 10:41 AM, Jim Giner wrote:
> This is a tough one.
>
> Lately, my web pages are giving me some problems. Once a day or so one or
> more of my pages/scripts will give me a 404 error page saying my web page
> has timed out. Problem is that the page was just displayed. I clic
On Sun, Sep 20, 2009 at 11:33 AM, Ashley Sheridan
wrote:
> On Sun, 2009-09-20 at 11:30 -0400, Gary wrote:
>
>> A question was posted on another board that the poster wanted random flash
>> movies to display as the page is reloaded. I posted the script below and
>> said I thought it could be adapt
On Sun, 2009-09-20 at 11:30 -0400, Gary wrote:
> A question was posted on another board that the poster wanted random flash
> movies to display as the page is reloaded. I posted the script below and
> said I thought it could be adapted but that the echo would probably need to
> change. Can som
On Sun, Apr 12, 2009 at 1:32 AM, Gary wrote:
> I had been on that site before, but seems like it is a breeding ground for
> spam and links to "free" commercial sites. Ran into a few bad or broken
> links, several listings as different scripts only to take you to the same
> "best price hosting" c
I had been on that site before, but seems like it is a breeding ground for
spam and links to "free" commercial sites. Ran into a few bad or broken
links, several listings as different scripts only to take you to the same
"best price hosting" company with no scripts at all. Is this common, is
Thanks much for your quick reply, I'll take a look (and maybe even find one
that spell checks my posts first!).
Gary
"Phpster" wrote in message
news:146a4da4-0114-474c-92f8-b8d3a5ecc...@gmail.com...
>
>
> On Apr 11, 2009, at 10:12, "Gary" wrote:
>
>> Is there a way to have a php include call
On Apr 11, 2009, at 10:12, "Gary" wrote:
Is there a way to have a php include called ramdomly? For example,
I have
an area that I am using to show various quotes and I would like the
quotes
to be ramdom.
Thanks for your help
Gary
--
PHP General Mailing List (http://www.php.net/)
To
At 11:35 AM -0600 11/6/08, WEISD wrote:
http://www.weisd.com/store2/WINHD-9022.php
Not me -- I get a normal distribution.
Cheers,
tedd
Thanks Tedd, That is because it is using time now and not rand...
Just as point of notice.
When I ask a question and provide a url, I keep the url t
1. change the number to a string: $t = (string) time();
2. chop off the last char of the string: $char = substr($t, -1);
3. you're done...: include "footer$char.html";
Time wins certainly produces better results, at least for what I am
doing, than rand...
Thanks all for your input...
Stephen wrote:
> On Thu, 11/6/08, WEISD <[EMAIL PROTECTED]> wrote:
>
>
>>> That is strange. I get pretty balanced results on this
>>>
>> computer.
>>
>>> >>
>>> $histogram = array_fill(1, 10, 0);
>>>
>>> $iterations = 20;
>>>
>>> for ($i = 0; $i < $iterations; ++$i) {
>>>++$h
http://www.weisd.com/store2/WINHD-9022.php
Not me -- I get a normal distribution.
Cheers,
tedd
Thanks Tedd, That is because it is using time now and not rand...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
At 10:30 AM -0600 11/6/08, WEISD wrote:
You can see it in action here at the bottom of the page there is a
footer. Each footer is the same right now except I have numbered
them for testing.
As I refresh the page, I get footer10 almost always with an
occasional 2 or 4 here and there...
http
WEISD wrote:
>
>>
>> Computer functions to generate random numbers are not designed to do
>> what their name suggests.
>>
>> Software testing requires repeatability, and this includes random
>> number generation.
>>
>> Without knowing how PHP seeds the generator it is difficult to predict
>> what
WEISD wrote:
Computer functions to generate random numbers are not designed to do
what their name suggests.
Software testing requires repeatability, and this includes random
number generation.
Without knowing how PHP seeds the generator it is difficult to predict
what it will do.
I st
That is strange. I get pretty balanced results on this computer.
Andrew
Simple code,
You can see it in action here at the bottom of the page there is a footer.
Each footer is the same right now except I have numbered them for testing.
As I refresh the page, I get footer10 almost alwa
Computer functions to generate random numbers are not designed to do what
their name suggests.
Software testing requires repeatability, and this includes random number
generation.
Without knowing how PHP seeds the generator it is difficult to predict
what it will do.
I still think taki
WEISD wrote:
>
>> That is strange. I get pretty balanced results on this computer.
>>
>> >
>> $histogram = array_fill(1, 10, 0);
>>
>> $iterations = 20;
>>
>> for ($i = 0; $i < $iterations; ++$i) {
>>++$histogram[round(rand(1, 10))];
>> }
>>
>> print_r($histogram);
>>
>> ?>
>>
>> Andrew
>
>
On Thu, 11/6/08, WEISD <[EMAIL PROTECTED]> wrote:
> > That is strange. I get pretty balanced results on this
> computer.
> >
> > >
> > $histogram = array_fill(1, 10, 0);
> >
> > $iterations = 20;
> >
> > for ($i = 0; $i < $iterations; ++$i) {
> >++$histogram[round(rand(1, 10))];
> > }
> >
[snip]
You can see it in action here at the bottom of the page there is a
footer.
Each footer is the same right now except I have numbered them for
testing.
As I refresh the page, I get footer10 almost always with an occasional
2 or
4 here and there...
[/snip]
So there fore it is random, or
""Gary M. Josack"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Stephen wrote:
On a php web page I want to generate a random number between say 1 and
10 and then use that number to reference a particular file in
an include tag.
Is there an easy way to do this?
Get the tim
On Thu, Nov 6, 2008 at 10:53 AM, WEISD <[EMAIL PROTECTED]> wrote:
>
> ""Gary M. Josack"" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>>
>> Stephen wrote:
On a php web page I want to generate a random number between say 1 and
10 and then use that number to reference
On Thu, Nov 6, 2008 at 3:52 AM, Amisha_Sharma <[EMAIL PROTECTED]> wrote:
>
> Hi
>
> you can use PHP rand() function for selecting a random number between 1 to
> 100.
Amisha,
Welcome to the list, but please don't top post. For a list of all
the guidelines for the official PHP lists, inclu
Hi
you can use PHP rand() function for selecting a random number between 1 to
100.
http://www.senpai-it.com/dedicated_servers.php Senpai IT Solutions
Dedicated Server at low cost
WEISD wrote:
>
>
> On a php web page I want to generate a random number between say 1 and 10
> and then use t
On Wed, 2008-11-05 at 12:41 -0600, WEISD wrote:
> On a php web page I want to generate a random number between say 1 and 10
> and then use that number to reference a particular file in an include tag.
>
>
>
> Is there an easy way to do this?
>
> Thanks
>
include "manual.php";
lesson = new
Umm I must notify you, just in case you don't know this, that you have to be
aware of the fact that the humanity haven't found a way to get a random
number (yet. they are working on it while I'm writing this..) (;
On Wed, Nov 5, 2008 at 9:43 PM, Gary M. Josack <[EMAIL PROTECTED]> wrote:
> WEI
WEISD wrote:
Just starting out, thanks.
So,
I should have prefaced the question with, New to PHP...
""TG"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Here's how you generate a random number:
http://us.php.net/manual/en/function.rand.php
There are a number of things
Stephen wrote:
On a php web page I want to generate a random number
between say 1 and 10
and then use that number to reference a particular file in
an include tag.
Is there an easy way to do this?
Get the time and use the last digit converting 0 to 10.
Stephen
rand(1, 10);
--
P
Just starting out, thanks.
So,
I should have prefaced the question with, New to PHP...
""TG"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Here's how you generate a random number:
http://us.php.net/manual/en/function.rand.php
There are a number of things you can do wit
Here's how you generate a random number:
http://us.php.net/manual/en/function.rand.php
There are a number of things you can do with that to select a random file and
include it. Have an associative array where the random number matches an
array key and the value is the filename you want, is one
> On a php web page I want to generate a random number
> between say 1 and 10
> and then use that number to reference a particular file in
> an include tag.
>
>
>
> Is there an easy way to do this?
Get the time and use the last digit converting 0 to 10.
Stephen
--
PHP General Mailing List
Hi Larry,Paul,Zoltán
Thanks for your messages, adding ORDER BY RAND () worked just fine
:)
Eduardo
"Larry Garfield" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> On Wednesday 16 May 2007, Eduardo Vizcarra wrote:
>> Hi
>>
>> I would like to know if a SELECT SQL query list of
2007. 05. 17, csütörtök keltezéssel 00.45-kor Larry Garfield ezt írta:
> On Wednesday 16 May 2007, Eduardo Vizcarra wrote:
> > Hi
> >
> > I would like to know if a SELECT SQL query list of records can be unsorted.
> > SELECT statement retrieves a list of records from a certain table starting
> >
On Wednesday 16 May 2007, Eduardo Vizcarra wrote:
> Hi
>
> I would like to know if a SELECT SQL query list of records can be unsorted.
> SELECT statement retrieves a list of records from a certain table starting
> from record # 1 till record #N and when publishing the records, this is how
> it is p
At 5/16/2007 09:40 PM, Eduardo Vizcarra wrote:
I would like to know if a SELECT SQL query list of records can be unsorted.
SELECT statement retrieves a list of records from a certain table starting
from record # 1 till record #N and when publishing the records, this is how
it is presented, in a s
On Sat, 2007-03-24 at 08:24 -0400, Jim McIntyre wrote:
> IIRC, the OP wanted to generate a unique key precisely to keep from
> revealing the record ID to the end user... what about taking the
> auto_increment value (easy to generate, assured to be unique) adding its
> MD5 hash to another column in
IIRC, the OP wanted to generate a unique key precisely to keep from
revealing the record ID to the end user... what about taking the
auto_increment value (easy to generate, assured to be unique) adding its
MD5 hash to another column in the table, then using that as the
"published" ID?
The only dis
Use auto_increment.
It's not random, but you should never show it to the end user anyway,
so who cares?
Another option is to use http://php.net/uniqid and you can create a
UNIQUE INDEX on the column and simply check mysql_errno() to see if
it's 1023 (or is it 2023?) when you insert to see if you
2007. 03. 23, péntek keltezéssel 15.13-kor tedd ezt írta:
> At 9:15 AM +0100 3/23/07, Németh Zoltán wrote:
> >2007. 03. 22, csütörtök keltezéssel 12.58-kor tedd ezt írta:
> >> At 4:53 PM +0100 3/22/07, Németh Zoltán wrote:
> >> >2007. 03. 22, csütörtök keltezéssel 11.42-kor tedd ezt írta:
> >> >
At 9:15 AM +0100 3/23/07, Németh Zoltán wrote:
2007. 03. 22, csütörtök keltezéssel 12.58-kor tedd ezt írta:
At 4:53 PM +0100 3/22/07, Németh Zoltán wrote:
>2007. 03. 22, csütörtök keltezéssel 11.42-kor tedd ezt írta:
>
> > As for efficiency, that's probably not
even worth mentioning in thi
2007. 03. 23, péntek keltezéssel 08.13-kor Robert Cummings ezt írta:
> On Fri, 2007-03-23 at 09:15 +0100, Németh Zoltán wrote:
>
> > // method 2
> > $time = microtime(TRUE);
> > for ($i = 1; $i <= 5000; $i++) {
> > $done = FALSE;
> > while (!$done) {
> > $id = md5((microtime(TR
On Fri, 2007-03-23 at 09:15 +0100, Németh Zoltán wrote:
> // method 2
> $time = microtime(TRUE);
> for ($i = 1; $i <= 5000; $i++) {
> $done = FALSE;
> while (!$done) {
> $id = md5((microtime(TRUE) * (rand(1,1000) / 100)));
> $sql = "INSERT INTO idtest (id,cn
2007. 03. 22, csütörtök keltezéssel 12.58-kor tedd ezt írta:
> At 4:53 PM +0100 3/22/07, Németh Zoltán wrote:
> >2007. 03. 22, csütörtök keltezéssel 11.42-kor tedd ezt írta:
> >
> > > As for efficiency, that's probably not even worth mentioning in this
> > case.
> >
> >why not? you would use 2 sq
2007. 03. 22, csütörtök keltezéssel 12.58-kor tedd ezt írta:
> At 4:53 PM +0100 3/22/07, Németh Zoltán wrote:
> >2007. 03. 22, csütörtök keltezéssel 11.42-kor tedd ezt írta:
> >
> > > As for efficiency, that's probably not even worth mentioning in this
> > case.
> >
> >why not? you would use 2 sq
At 4:53 PM +0100 3/22/07, Németh Zoltán wrote:
2007. 03. 22, csütörtök keltezéssel 11.42-kor tedd ezt írta:
> As for efficiency, that's probably not even worth mentioning in this case.
why not? you would use 2 sql queries while I would use one most of the
time and 2 in case of already reserved
2007. 03. 22, csütörtök keltezéssel 11.42-kor tedd ezt írta:
> At 4:28 PM +0100 3/22/07, Németh Zoltán wrote:
> >2007. 03. 22, csütörtök keltezéssel 11.24-kor tedd ezt írta:
> >> At 11:18 AM -0600 3/21/07, [EMAIL PROTECTED] wrote:
> >> >Hello,
> >> >I want to add a random unique ID to a Mysql ta
At 4:28 PM +0100 3/22/07, Németh Zoltán wrote:
2007. 03. 22, csütörtök keltezéssel 11.24-kor tedd ezt írta:
At 11:18 AM -0600 3/21/07, [EMAIL PROTECTED] wrote:
>Hello,
>I want to add a random unique ID to a Mysql table. Collisions
>are unlikely but possible so to handle those cases I'd like
2007. 03. 22, csütörtök keltezéssel 11.24-kor tedd ezt írta:
> At 11:18 AM -0600 3/21/07, [EMAIL PROTECTED] wrote:
> >Hello,
> >I want to add a random unique ID to a Mysql table. Collisions
> >are unlikely but possible so to handle those cases I'd like to
> >regenerate the random ID until there is
At 11:18 AM -0600 3/21/07, [EMAIL PROTECTED] wrote:
Hello,
I want to add a random unique ID to a Mysql table. Collisions
are unlikely but possible so to handle those cases I'd like to
regenerate the random ID until there is no collision and only
then add my row. Any suggestions for a newbie as
function GenerateID ()
{
$len = 3;
$base='ABCDEFGHKLMNOPQRSTWXYZ';
$max=strlen($base)-1;
$activatecode='';
mt_srand((double)microtime()*100);
while (strlen($activatecode)<$len+1)$activatecode.=$base{mt_rand(0,$max)};
$len = 7;
$base='1234567890';
$max=strlen($base)-1;
mt_srand((double)microti
[EMAIL PROTECTED] wrote:
I want to add a random unique ID to a Mysql table. Collisions
are unlikely but possible so to handle those cases I'd like to
regenerate the random ID until there is no collision and only
then add my row. Any suggestions for a newbie as to the right
way to go about doing
On 12/22/06, Steven Macintyre <[EMAIL PROTECTED]> wrote:
Ok ... previous problem sorted ... now onto the next ...
The client wants the following;
A scroll bar with 3 random thumbs from each subdirectory in the /images/
folder
I was thinking ...
Going into each folder, getting files, pushing i
- Original Message -
From: "tedd" <[EMAIL PROTECTED]>
To: "Gustav Wiberg" <[EMAIL PROTECTED]>; "PHP General"
Sent: Monday, December 04, 2006 4:15 PM
Subject: Re: [PHP] Random pictures - not twice
At 11:20 PM +0100 12/3/06, Gustav Wiberg
At 11:20 PM +0100 12/3/06, Gustav Wiberg wrote:
Hi there!
I have created a script the generates random pictures...
-snip-
With this above script the same picture can be shown twice. Is there
any smart way of avoiding this without having to rely on
cookies/sessionids?
Random does mean it c
- Original Message -
From: <[EMAIL PROTECTED]>
To:
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, December 03, 2006 11:52 PM
Subject: Re: [PHP] Random pictures - not twice
Without using cookies or session information, you're going to go through
your picture list faster depe
Without using cookies or session information, you're going to go through your
picture list faster depending on how many users are accessing the random pic
page. If you don't make it user-specific, then it doesn't really matter if you
go through the images sequentially.. it may appear random on
You have an array of names and you want to choose a random name. is it?
try thinking some thing about arrays, keys numbers, key count, and such
Ross wrote:
>
>
> Hi,
>
> I want to randomise a string
>
> $myrandom = rand("ross", "andrea");
>
> echo $myrandom;
>
>
> I know this doesn't wo
On Tue, October 17, 2006 7:30 am, Ross wrote:
> I want to randomise a string
>
> $myrandom = rand("ross", "andrea");
>
> echo $myrandom;
>
> I know this doesn't work but is there a built in function to do this?
I'm not real clear on what "this" is...
Choose a string at random from an array?
$pos
On 10/17/06, Ross <[EMAIL PROTECTED]> wrote:
Hi,
I want to randomise a string
$myrandom = rand("ross", "andrea");
I suggest :
$array_name = array("rose","andrea");
$myrandom = array_rand($array_name);
echo $myrandom[0];
Brice.
I know this doesn't work but is there a built in function to
> I have an ini file that has:
> 1 = "words";
> 2 = "words1";
> 3 = "words3";
>
> I want to pull a rand value and print it out
> I'm trying to use parse_ini_file but its not working any help would
> be great.
> Thanks
You could read them all into an array then use array_rand() to pick one.
ht
On Fri, 2006-03-10 at 16:00 +1100, Chris wrote:
> If you can produce a small test case might be time for a bug report. It
> shouldn't give you "permission denied" errors.
>
Will work on it over the weekend. I am going to try something dead
simple with the session stuff and see what I can do with
Paul Scott wrote:
On Fri, 2006-03-10 at 10:26 +1100, Chris wrote:
If you leave your browser open for 20 mins or something and then try to
log in, does that replicate it?
Ah hah! The plot thickens!
It seems that I can:
1. Launch the app - thereby starting the initial session
2. Leave the
On Fri, 2006-03-10 at 10:26 +1100, Chris wrote:
> If you leave your browser open for 20 mins or something and then try to
> log in, does that replicate it?
>
Ah hah! The plot thickens!
It seems that I can:
1. Launch the app - thereby starting the initial session
2. Leave the session to time o
Paul Scott wrote:
On Thu, 2006-03-09 at 16:05 +1100, Chris wrote:
What's the whole error message (ie context)? Is it coming from cron or
randomly in your scripts?
From Xdebug...
Its random. I am just thinking though that what it *might* be is that
the initial session is timing out between
On Thu, 2006-03-09 at 16:05 +1100, Chris wrote:
> What's the whole error message (ie context)? Is it coming from cron or
> randomly in your scripts?
>From Xdebug...
Its random. I am just thinking though that what it *might* be is that
the initial session is timing out between the app launch and
Paul Scott wrote:
I am pretty much randomly getting the following error:
.. ps_files_cleanup_dir: opendir(/var/lib/php5) failed: Permission
denied (13) in ...
As far as I can see the session write directory has no problems with
permissions. The *really* strange thing is that it only fails a
"Mike" <[EMAIL PROTECTED]> wrote in message news:...
I'd just like to thank everyone who helped me our with this. I think it's
great that so many people would be so helpful and not expect anything in
return. This list is quite a storehouse of info and I'm learning just from
reading the posts s
I'd just like to thank everyone who helped me our with this. I think it's
great that so many people would be so helpful and not expect anything in
return. This list is quite a storehouse of info and I'm learning just from
reading the posts since I joined last week!
Again, thanks all.
-Mike
"
Silvio Porcellana [tradeOver] wrote:
>
>
> $file = "images.txt";
> $openFile = file($file);
> $num_images = 10;
> # don't need this is PHP > 4.2.0
> srand((float) microtime() * 1000);
> $random_keys = array_rand($openFile, $num_images);
> foreach ($ra
Jared Williams wrote:
> Hi,
> Just unset the ones you've picked
>
> #random images example
> #this is your file
> $file = "images.txt";
> #open the file
> $openFile = file($file);
> #generate a random number
> srand((double)microtime()*100);
> #get one of the entries in the file
> for
Hi,
Just unset the ones you've picked
";
unset($openFile[$r]);
}
?>
Jared
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Guarentees unique choices.
> -Original Message-
> From: Curt Zirzow [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 16, 2005 2:47 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] Random Images with no duplicates?
>
> On Thu, Dec 15, 2005 at 08:4
On Thu, Dec 15, 2005 at 08:45:33PM -0800, Mike Rondeau wrote:
> Hi,
>
> I'm still very green with PHP, but am working to fix that.
>
> I've searched high and low for an answer to this question and so far
> no solution has presented itself. I have a script to populate my web page
> with random ima
This should work, although if there are only 9 lines in the file, it will
run infintely (or until the page times out)... so put a check in for that.
$imagesNeeded = 10;
$imageArr = array();
// Create array with $imagesNeeded number of elements.
for($i=0;$i<$imagesNeeded;$i++) {
// choose image
On Wed, Nov 16, 2005 at 05:19:52PM +1300, Jasper Bryant-Greene wrote:
> John Taylor-Johnston wrote:
> >My question is simnple. I want to randomly select a row in a mysql
> >table. I have a primary id.
> >
> > >$server = "localhost";
> >$user = "foo";
> >$pass = "foo";
> >$db="foo_db";
> >$table="f
John Taylor-Johnston wrote:
My question is simnple. I want to randomly select a row in a mysql
table. I have a primary id.
$news = mysql_query($sql) or die(print "color=red>".mysql_error()."");
while ($mydata = mysql_fetch_object($news))
{
??
}
?>
If your table isn't too big, it's
Check the MySQL manual for how to order randomly.
They might have a way to do it.
However...
If there are a fairly number of consistent plans in each company, you
might be better off with something that just chooses N companies at
random, enough to fill a page, and that's it.
One wrinkle is thi
Ryan A wrote:
Hey,
I have been screwing around with this code for around a day and am hitting a
wall, any
help would be appreciated.
Basically, I am working on a site that queries the DB for companies and the
plans the company
is offering, the DB is quite big (a few thousand records in each of the
I think I need to give more details. The data loss happens somewhere
between the form post button press and the data being inserted into the
DB. It is a simple sql insert statement on a table with auto increment
keys. The price should be entered as a floating point number and that
is what my
2wsxdr5 wrote:
> With out posting any code I was wondering if anyone here has been
> experiencing this kind of problem. I have a standard web from that PHP
> code then reads and saves the data into a MySQL DB. The problem is some
> of my users have had data lost somewhere in this process. The we
2wsxdr5 wrote:
With out posting any code I was wondering if anyone here has been
experiencing this kind of problem. I have a standard web from that
PHP code then reads and saves the data into a MySQL DB. The problem
is some of my users have had data lost somewhere in this process. The
web si
Could be a problem of multiple update modules for the same table. When I've
encountered this problem in the past it's been one of two causes.
1. In the process of maintaining the table one routine that has no price
information, retrieves the row and notices that the something needs to be
changed
1 - 100 of 224 matches
Mail list logo