Dear visitors and members, with the staff having moved on to other life interests and as a result of changes in people's internet usage habits, the CodeWalrus community have migrated almost entirely to Discord, IRC and WalrusIRC and is now essentially a place where to hang out, chat about gaming, programming, music, anime, and chill. As a result, even though the CW forums will remain open for posting, for faster TI, Casio or HP calculator help and news we recommend using the bilingual TI-Planet forums instead.

We encourage everyone to join our Discord server now.

* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: Dynamically generated GIF scrolltext  (Read 3897 times)

0 Members and 1 Guest are viewing this topic.

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Forum Maintenance
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18969
  • Post Rating Ratio: +100/-5
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: Dynamically generated GIF scrolltext
« Reply #15 on: December 24, 2015, 07:39:43 am »
I assume it's because it's dynamically-generated? One other issue could be the file size, though, but in Darkest's case his avatar is under 300 KB.

Btw, try to not make your text too long if you ever use such avatar. Even 300 KB is a bit large for an avatar, especially on 3G, but it's tolerable. But smaller is better whenever possible. I wonder if adding the Walrii would make it larger?
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline c4ooo

  • Pedanticity prevents ambiguity
  • Super User
  • CW Contest II Winner
  • *
  • Join Date: Aug 2015
  • Location: 127.0.0.1
  • Posts: 1028
  • Post Rating Ratio: +13/-4
  • Advanced forumer
  • Gender: Male
Re: Dynamically generated GIF scrolltext
« Reply #16 on: December 25, 2015, 01:07:09 am »
I assume it's because it's dynamically-generated? One other issue could be the file size, though, but in Darkest's case his avatar is under 300 KB.
Yes but how does it know that? I would presume the browser just caches every thing except php files.
@DarkestEx

Offline DarkestEx

  • Super User
  • Join Date: Jan 2015
  • Location: Germany
  • Posts: 1327
  • Post Rating Ratio: +10/-2
    • @0xbmuessig
    • @muessigb
  • Gender: Male
Re: Dynamically generated GIF scrolltext
« Reply #17 on: December 25, 2015, 01:19:43 am »
I assume it's because it's dynamically-generated? One other issue could be the file size, though, but in Darkest's case his avatar is under 300 KB.
Yes but how does it know that? I would presume the browser just caches every thing except php files.
@DarkestEx
Well the PHP page generates the image every few hours or when its force refreshed.
The browser has no idea that the image is actually auto generated as the PHP makes it look just like a normal image. PHP files are (as long as the server works correctly) never sent to the actual visitor of the website or their browser. They get executed on the webserver.
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Hewlett-Packard 100LX, Hewlett-Packard 95LX, Original Commodore 64C, Tektronix AWG2021, IBM X60s, IBM X60t, Nintendo DS Lite, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, Palm m5

Offline c4ooo

  • Pedanticity prevents ambiguity
  • Super User
  • CW Contest II Winner
  • *
  • Join Date: Aug 2015
  • Location: 127.0.0.1
  • Posts: 1028
  • Post Rating Ratio: +13/-4
  • Advanced forumer
  • Gender: Male
Re: Dynamically generated GIF scrolltext
« Reply #18 on: January 01, 2016, 06:40:34 am »
sorry if i seem bothersome, but I still dont understand. Why wont the browser just chache the first image that was generated just like it would a static file? Or is the extension of that image literally .php?

Also, i was hoping your profile picture would go into negative numbers, but unfortunately it doesn't XD

Offline DarkestEx

  • Super User
  • Join Date: Jan 2015
  • Location: Germany
  • Posts: 1327
  • Post Rating Ratio: +10/-2
    • @0xbmuessig
    • @muessigb
  • Gender: Male
Re: Dynamically generated GIF scrolltext
« Reply #19 on: January 01, 2016, 12:32:00 pm »
sorry if i seem bothersome, but I still dont understand. Why wont the browser just chache the first image that was generated just like it would a static file? Or is the extension of that image literally .php?

Also, i was hoping your profile picture would go into negative numbers, but unfortunately it doesn't XD
Well browsers do cache images on their own, but as many people visit this page, every time my avatar is downloaded by the browser from the internet, it produces a big page load on my side. Every time the image is loaded from the web, the php script I wrote is called. It checks if there is new content or if the image is for any reason outdated. If not, the last generated image is sent. If the image needs to be refreshed, the last image is deleted and a new one is generated and saves to disk.

Haha, I used abs in the first place but after new year I changed it to new, static slogan.
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Hewlett-Packard 100LX, Hewlett-Packard 95LX, Original Commodore 64C, Tektronix AWG2021, IBM X60s, IBM X60t, Nintendo DS Lite, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, Palm m5

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Forum Maintenance
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18969
  • Post Rating Ratio: +100/-5
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: Dynamically generated GIF scrolltext
« Reply #20 on: January 01, 2016, 10:10:44 pm »
I always wondered how to make a php script or image on a web server force refresh every few minute or so or when it changed, because when I change the site logo or edit the theme, it can take months before users see the changes.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline DarkestEx

  • Super User
  • Join Date: Jan 2015
  • Location: Germany
  • Posts: 1327
  • Post Rating Ratio: +10/-2
    • @0xbmuessig
    • @muessigb
  • Gender: Male
Re: Dynamically generated GIF scrolltext
« Reply #21 on: January 02, 2016, 01:26:52 am »
I always wondered how to make a php script or image on a web server force refresh every few minute or so or when it changed, because when I change the site logo or edit the theme, it can take months before users see the changes.
Doing that is very simple. For CSS, there are a few easy solutions too.
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Hewlett-Packard 100LX, Hewlett-Packard 95LX, Original Commodore 64C, Tektronix AWG2021, IBM X60s, IBM X60t, Nintendo DS Lite, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, Palm m5

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games