I have come across the strangest thing..I hope someone in here can help
me understand whats up.
i have a php image http://sigs.hopto.org/sigs/mysig/sig51.php
which looks like this
<?
$colort="000000000";
$sizet="20";
$fontt="arial.ttf";
$rightt="200";
$downt="50";
$rotatet="0";
$addliner='1 random 1
2 random 2
3 random 3
4 random 4';
$colorr="000000000";
$sizer="20";
$fontr="BNKGOTHL.TTF";
$rightr="20";
$downr="50";
$rotater="0";
$back1="frame_orange.png";
include("../thepic.php");
?>
and the pic.php is
<?
Header( "Content-type: image/png");
$time = strftime("%I:%M", time());
$liner = split("\n", $addliner );
$p = rand(0,(count($liner)-1));
$addliner = $liner[$p];
$image = imagecreatefrompng('backs/'.$back1);
$colorrr = substr($colorr,0,3);
$colorrg = substr($colorr,3,3);
$colorrb = substr($colorr,-3,3);
$colorr = ImageColorAllocate($image,$colorrr,$colorrg,$color rb);
$colortr = substr($colort,0,3);
$colortg = substr($colort,3,3);
$colortb = substr($colort,-3,3);
$colort = ImageColorAllocate($image,$colortr,$colortg,$color tb);
ImageTTFText ($image,$sizer, $rotater, $rightr, $downr,$colorr,
'fonts/'.$fontr,$addliner);
ImageTTFText ($image,$sizet, $rotatet, $rightt, $downt,
$colort,'fonts/'.$fontt,$time);
Imagepng($image);
ImageDestroy($image);
?>
someone please tell me why this image can be viewed fine on ie and work
perfect showing a random line each time you view it
but in Opera or Mozilla the time updates fine (so we know it's
refreshing) but the random line doesnt change much, if at all...)
go to the link above ...it doesnt make sense.... 12 2010
"jtc970" <me@hme.com> wrote in message
news:MP************************@netnews.comcast.ne t... I have come across the strangest thing..I hope someone in here can help me understand whats up.
i have a php image http://sigs.hopto.org/sigs/mysig/sig51.php which looks like this
(snip)
so, let me get this straight, it is chaning correct?
hmm, it should not be a browser problem, btw, it was on 1 or 4 for me for
quit a long time. (IE 6.026)
--
Mike Bradley http://www.gzentools.com -- free online php tools
In article <B_*****************@newssvr29.news.prodigy.com> , me@scantek.hotmail.com says... "jtc970" <me@hme.com> wrote in message news:MP************************@netnews.comcast.ne t... I have come across the strangest thing..I hope someone in here can help me understand whats up.
i have a php image http://sigs.hopto.org/sigs/mysig/sig51.php which looks like this
(snip)
so, let me get this straight, it is chaning correct?
hmm, it should not be a browser problem, btw, it was on 1 or 4 for me for quit a long time. (IE 6.026)
-- Mike Bradley http://www.gzentools.com -- free online php tools
the time changes in all browsers but the random line only changes in IE
not Mozilla or Opera.
"jtc970" <me@hme.com> wrote in message
news:MP************************@netnews.comcast.ne t... In article <B_*****************@newssvr29.news.prodigy.com> , me@scantek.hotmail.com says... "jtc970" <me@hme.com> wrote in message news:MP************************@netnews.comcast.ne t... I have come across the strangest thing..I hope someone in here can
help me understand whats up.
i have a php image http://sigs.hopto.org/sigs/mysig/sig51.php which looks like this
(snip)
so, let me get this straight, it is chaning correct?
hmm, it should not be a browser problem, btw, it was on 1 or 4 for me
for quit a long time. (IE 6.026)
-- Mike Bradley http://www.gzentools.com -- free online php tools the time changes in all browsers but the random line only changes in IE not Mozilla or Opera.
Maybe send a header that tells it not to cache the image?
On Sun, 01 Feb 2004 11:40:22 +0000, jn wrote: Maybe send a header that tells it not to cache the image?
That doesn't make sense if the time is changing. the time changing means
the image is changing means the cached image is being replaced.
It is a weird problem, no doubt.
--
-------------------------
| Jeffrey Silverman |
| jeffrey-AT-jhu-DOT-edu|
-------------------------
On Sun, 01 Feb 2004 06:11:52 +0000, jtc970 wrote: I have come across the strangest thing..I hope someone in here can help me understand whats up.
i have a php image http://sigs.hopto.org/sigs/mysig/sig51.php which looks like this
<? $colort="000000000"; $sizet="20"; $fontt="arial.ttf"; $rightt="200"; $downt="50"; $rotatet="0"; $addliner='1 random 1 2 random 2 3 random 3 4 random 4'; $colorr="000000000"; $sizer="20"; $fontr="BNKGOTHL.TTF"; $rightr="20"; $downr="50"; $rotater="0"; $back1="frame_orange.png"; include("../thepic.php"); ?>
and the pic.php is
<? Header( "Content-type: image/png"); $time = strftime("%I:%M", time());
$liner = split("\n", $addliner ); $p = rand(0,(count($liner)-1)); $addliner = $liner[$p];
$image = imagecreatefrompng('backs/'.$back1);
$colorrr = substr($colorr,0,3); $colorrg = substr($colorr,3,3); $colorrb = substr($colorr,-3,3); $colorr = ImageColorAllocate($image,$colorrr,$colorrg,$color rb);
$colortr = substr($colort,0,3); $colortg = substr($colort,3,3); $colortb = substr($colort,-3,3); $colort = ImageColorAllocate($image,$colortr,$colortg,$color tb);
ImageTTFText ($image,$sizer, $rotater, $rightr, $downr,$colorr, 'fonts/'.$fontr,$addliner); ImageTTFText ($image,$sizet, $rotatet, $rightt, $downt, $colort,'fonts/'.$fontt,$time); Imagepng($image); ImageDestroy($image); ?>
someone please tell me why this image can be viewed fine on ie and work perfect showing a random line each time you view it
but in Opera or Mozilla the time updates fine (so we know it's refreshing) but the random line doesnt change much, if at all...)
go to the link above ...it doesnt make sense....
I don't really know why the image changes only in IE, but I do have a
couple of coding-clean-up-and-simplifcation suggestions for you.
1) Why not put the "1 random 1" etc. text directly into an array instead
of splitting the string?
2) Be sure to initialize the random number generator!!! (Ooops... I just
checked on that and you don't need to do that unless you are using PHP
version eearlier than 4.2)
Well, that's about it. Putting the items directly in the array is the big
thing here.
Also, there is a PHP function called "shuffle()" which will randomize the
order of the array. You can then pop the first item off like so:
shuffle($liner);
$addliner = array_pop($liner);
Its just a bit cleaner, code-wise. But not necessarily better or faster
than the way you did it.
later...
--
-------------------------
| Jeffrey Silverman |
| jeffrey-AT-jhu-DOT-edu|
-------------------------
the lines originally get entered from a multiline textbox from a form so
I cant just enter them straight in.
I tried to shuffle() but the same thing happens
I hope someone comes and says
you idiot.....this is your prob..
In article <MP************************@netnews.comcast.net> , me@hme.com
says... the lines originally get entered from a multiline textbox from a form so I cant just enter them straight in. I tried to shuffle() but the same thing happens I hope someone comes and says you idiot.....this is your prob..
I added (which i shouldnt have to, having the latest php)
function make_seed() {
list($usec, $sec) = explode(' ', microtime());
return (float) $sec + ((float) $usec * 100000);
}
srand(make_seed());
and it works better but still not good
except in IE all is fine...
now that its working,somewhat, I still want to know WTF?!
On Sun, 01 Feb 2004 16:12:28 +0000, jtc970 wrote: In article <MP************************@netnews.comcast.net> , me@hme.com says... the lines originally get entered from a multiline textbox from a form so I cant just enter them straight in. I tried to shuffle() but the same thing happens I hope someone comes and says you idiot.....this is your prob.. I added (which i shouldnt have to, having the latest php)
function make_seed() { list($usec, $sec) = explode(' ', microtime()); return (float) $sec + ((float) $usec * 100000); } srand(make_seed());
and it works better but still not good except in IE all is fine... now that its working,somewhat, I still want to know WTF?!
Its funny, but an hour ago or so when I first tried it (I use Mozilla on
Linux) it was not changing except the time.
Now, it changes fine, and apparently randomly, as you wanted it to.
Not sure what the prob;lem was.
later...
--
-------------------------
| Jeffrey Silverman |
| jeffrey-AT-jhu-DOT-edu|
-------------------------
In article <pa****************************@jhu.edu>, je*****@jhu.edu
says... On Sun, 01 Feb 2004 16:12:28 +0000, jtc970 wrote:
In article <MP************************@netnews.comcast.net> , me@hme.com says... the lines originally get entered from a multiline textbox from a form so I cant just enter them straight in. I tried to shuffle() but the same thing happens I hope someone comes and says you idiot.....this is your prob.. I added (which i shouldnt have to, having the latest php)
function make_seed() { list($usec, $sec) = explode(' ', microtime()); return (float) $sec + ((float) $usec * 100000); } srand(make_seed());
and it works better but still not good except in IE all is fine... now that its working,somewhat, I still want to know WTF?!
Its funny, but an hour ago or so when I first tried it (I use Mozilla on Linux) it was not changing except the time.
Now, it changes fine, and apparently randomly, as you wanted it to.
Not sure what the prob;lem was.
later...
anyone who can figure this out?
jtc970 wrote: In article <pa****************************@jhu.edu>, je*****@jhu.edu says...
On Sun, 01 Feb 2004 16:12:28 +0000, jtc970 wrote:
In article <MP************************@netnews.comcast.net> , me@hme.com says...
the lines originally get entered from a multiline textbox from a form so I cant just enter them straight in. I tried to shuffle() but the same thing happens I hope someone comes and says you idiot.....this is your prob..
I added (which i shouldnt have to, having the latest php)
function make_seed() { list($usec, $sec) = explode(' ', microtime()); return (float) $sec + ((float) $usec * 100000); } srand(make_seed());
and it works better but still not good except in IE all is fine... now that its working,somewhat, I still want to know WTF?!
Its funny, but an hour ago or so when I first tried it (I use Mozilla on Linux) it was not changing except the time.
Now, it changes fine, and apparently randomly, as you wanted it to.
Not sure what the prob;lem was.
later...
anyone who can figure this out?
I'm getting "The image "http://sigs.hopto.org/sigs/mysig/sig51.php"
cannot be displayed, because it contains errors." with Mozilla 1.6.
IE 6.0 just doesn't display it.
I'm wondering if you aren't altering the version you have at that URL.
If that's the case, I'd like to point out that it's hard to test a
moving target. =)
- Dan
In article <l%*******************@newssvr25.news.prodigy.com> , th*******@MyEMailAddress.com says... jtc970 wrote:
I have come across the strangest thing..I hope someone in here can help me understand whats up.
i have a php image http://sigs.hopto.org/sigs/mysig/sig51.php which looks like this /snip
$fontr="BNKGOTHL.TTF";
http://sigs.hopto.org/sigs/mysig/fonts/BNKGOTHL.TTF = 404
The font you have designated for "$fontr" is not in the fonts directory. If you change $fontr to "arial.ttf", or copy BNKGOTHL.TTF into the fonts directory it'll work, I betcha.
- Dan http://blog.dantripp.com/
yes, i moved the font...sorry
but the original problem was that the rand line only worked in
IE...while the time worked in all browsers...
I had to srand a seed to get the random to work in mozilla or Opera
I have the latest php which says i dont have to do that. plus why would
it work in IE if I did ....
I'll change it back to the original posted code so u all can see it
working in IE and not anything else. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Fozya |
last post by:
Hi,
I have problems compiling some code that perfectly runs in VS.Net in
the G++. Here is what I got:
MyClass a;
MyClass b;
//assign values to a and b
.......
|
by: ambar.shome |
last post by:
Hi,
As you know there are few operators in C++ which cant be overloaded.
They are:
.., .*, ::, ?: , new , delete , sizeof , typeid , static_casr ,
dynamic_cast , const_cast ,...
|
by: Tony Lewis |
last post by:
I'm running IIS on a Windows 2k server and have just installed the .NET
framework 1.1 so I can deploy ASP.NET applications on my server through .NET
Studios. All my normal ASP applications run fine...
|
by: Crirus |
last post by:
Hi!
I havea control that display messages...
I added a timer to it
Every time a noew mesaage should be displayed I do the following:
Private sub ShowMsg(message as string)
Me.lblStatus.Text...
|
by: mike11d11 |
last post by:
I cant seem to filter down my dataset table by criteria in expression.
Can someone tell me why I still have the same amount of rows after I
use this filter select option.
Private Sub...
|
by: Beemer Biker |
last post by:
I am adding at bindtime an htmlbutton and an html dropdownlist. The idea is
to select the item in the list, hit the button and my callback code uses the
ID.selectedindex to act on the item that...
|
by: skybabyblues |
last post by:
ok i cant install my zune software on my computer and i know someone already posted something about it but it didn't answer my question. ive tried installing it from the internet and also with a disc...
|
by: VELA |
last post by:
I INSTALLED ORACLE 9i in lenovo3000 c100
in window xp home
there is a problem of connection database and the error is
"ORA 12560 TNS:protocol adaptor error"
if anyone have tha answer for the...
|
by: Sakalicek |
last post by:
Hello all,
I have serious problem and have no idea how to solve it, of course :)
I have Web Service which has master page. This side is the client side. On master page there are some submit...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: giovanniandrean |
last post by:
The energy model is structured as follows and uses excel sheets to give input data:
1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM)
Please note that the UK and Europe revert to winter time on...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
|
by: GKJR |
last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
| |