User Name
Password

Go Back   Planetarion Forums > Non Planetarion Discussions > Programming and Discussion
Register FAQ Members List Calendar Arcade Today's Posts

Reply
Thread Tools Display Modes
Unread 9 Apr 2003, 06:59   #1
XeroX
Registered User
 
Join Date: Feb 2001
Location: /dev/null
Posts: 78
XeroX is an unknown quantity at this point
PHP ticker

I recall reading a post here a while ago where someone pasted a PHP coded ticker - and i was wondering if someone could re-post that as im very interessed in seeing how this is built.
ta in advance
__________________
NPRDNWHG - Norwegian Punk Rockers Dating New Wave Hooker Girls

Common now honey - bring it on, bring it on
XeroX is offline   Reply With Quote
Unread 9 Apr 2003, 10:08   #2
Dave
Infallible
 
Join Date: Feb 2001
Location: Milton Keynes, UK
Posts: 604
Dave is an unknown quantity at this point
That was probably me, ages ago.

But tell me, why do you want it?
__________________
Free
Dave is offline   Reply With Quote
Unread 9 Apr 2003, 12:13   #3
Mong
Forever Delayed
 
Join Date: Sep 2000
Location: www.netgamers.org
Posts: 1,475
Mong is on a distinguished road
Is this in a text box, or the bottom of the window?

M.
__________________
Firefly Oper and General l4m3r - "I Do Stuff"

O2 Rip-off campaign

<vampy> plus i hate people ... i despise humanity as a whole

pablissimo "I'm still geting over the fact you just posted a pic of your own vomit"
Mong is offline   Reply With Quote
Unread 9 Apr 2003, 12:25   #4
Mong
Forever Delayed
 
Join Date: Sep 2000
Location: www.netgamers.org
Posts: 1,475
Mong is on a distinguished road
This works (I just grabbed the first Javascript scroller I could find)...

Code:
<?php

require ('common_db.php'); // DB Access

$filename = "text.txt"; // The name of the banner file

	$handle = fopen ($filename, "r");
	$contents = fread ($handle, filesize ($filename));
	fclose ($handle);

?> 

<HTML>
<HEAD>
	

<script language="JavaScript">
<!--
     /*****************************************************************
     * Java Script Copyright (c) 1996 3SI, Germany, http://eExpert.com
     * FUNCTION:        Ticker Display 
     * PARAMETERS:  None
     * RETURNS:         Display Message
     *****************************************************************/
     // global variables
     var id,pause=0,position=0;
     function banner() {
     // variables declaration
     var i,k, msg="<?php echo $contents; ?>";
     // increase msg
     k=(50/msg.length)+1;
     for(i=0;i<=k;i++) msg+=" "+msg;
     // show it to the window
     document.form.banner.value=msg.substring(position,position+76);
     // set new position
     if(position++==msg.length) position=0;
     // repeat at entered speed
     id=setTimeout("banner()",60); }
// -->
</script>
	
</HEAD>
<BODY onLoad="banner()">

	<FORM NAME="form">
	<INPUT TYPE="text" NAME="banner" VALUE="Nada..." SIZE="60">
	</FORM>

</BODY>
</HTML>
__________________
Firefly Oper and General l4m3r - "I Do Stuff"

O2 Rip-off campaign

<vampy> plus i hate people ... i despise humanity as a whole

pablissimo "I'm still geting over the fact you just posted a pic of your own vomit"
Mong is offline   Reply With Quote
Unread 9 Apr 2003, 15:49   #5
Jester
Pedantic hypocrite
 
Jester's Avatar
 
Join Date: Jan 2001
Location: Back and to the left
Posts: 1,488
Jester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond repute
Game ticker, Mong.

Jester
__________________
I always wanted to be a dancer, but I could never get the shit off my shoes
.......
Jester is offline   Reply With Quote
Unread 9 Apr 2003, 16:01   #6
Structural Integrity
Rawr rawr
 
Structural Integrity's Avatar
 
Join Date: Dec 2000
Location: Upside down
Posts: 5,300
Structural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriend
heh heh....
I have one in ASP....
Structural Integrity is offline   Reply With Quote
Unread 10 Apr 2003, 08:12   #7
XeroX
Registered User
 
Join Date: Feb 2001
Location: /dev/null
Posts: 78
XeroX is an unknown quantity at this point
Quote:
Originally posted by Dave
That was probably me, ages ago.

But tell me, why do you want it?
Because i've only done basic coding (dynamic news pages etc) where you extract stuff from DB's and i want to see some more advanced coding, would also be quite interessting to see a "big" dash of code instead of my usual 6-7 lines
__________________
NPRDNWHG - Norwegian Punk Rockers Dating New Wave Hooker Girls

Common now honey - bring it on, bring it on
XeroX is offline   Reply With Quote
Unread 10 Apr 2003, 12:39   #8
Dave
Infallible
 
Join Date: Feb 2001
Location: Milton Keynes, UK
Posts: 604
Dave is an unknown quantity at this point
I would PM you it, but its too big...heh.
__________________
Free
Dave is offline   Reply With Quote
Unread 12 Apr 2003, 00:08   #9
Rayden
Enforcer
 
Join Date: Jan 2003
Location: /dev/chair
Posts: 55
Rayden is an unknown quantity at this point
put it on the web so everyone can see!
Rayden is offline   Reply With Quote
Unread 12 Apr 2003, 00:28   #10
Mit
Let battle commence
 
Mit's Avatar
 
Join Date: Feb 2002
Location: England
Posts: 732
Mit is a jewel in the roughMit is a jewel in the roughMit is a jewel in the rough
probably not the best place to ask, but they aren't hard to make. a more suitable language would probably be better (c++ etc)
__________________
Mit
http://tim.igoe.me.uk - Development Blog
Whats on TV now - UK TV Guide

<Mendosa> mit is a cute cudlly toy that will be in the shops by christmas
<mig-work> ur now my eternal fav pa god
<Squiz> i name thee, Sir Mit
<Zeus> u my friend are a true gamer I knew u were
Mit is offline   Reply With Quote
Unread 12 Apr 2003, 08:36   #11
Structural Integrity
Rawr rawr
 
Structural Integrity's Avatar
 
Join Date: Dec 2000
Location: Upside down
Posts: 5,300
Structural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriend
Quote:
Originally posted by Mit
probably not the best place to ask, but they aren't hard to make. a more suitable language would probably be better (c++ etc)
I partially agree.
I agree on the point that they are not THAT difficult to make. The most difficult thing is figuring out the right algorithm and actually making it FAST.

I'm not sure if a language like C++ would be more appropiate. Ofcourse it's faster, it's prolly more stable, but you have to have execution rights on your server. A scripted ticker is great for those quick games that you play with a few friends on your personal webspace.
For bigger projects C/C++ should be the language of your choice.
Structural Integrity is offline   Reply With Quote
Unread 29 Apr 2003, 07:57   #12
Rayden
Enforcer
 
Join Date: Jan 2003
Location: /dev/chair
Posts: 55
Rayden is an unknown quantity at this point
while speaking about it whats the PA ticker written in ? C ?

/me wants source code
Rayden is offline   Reply With Quote
Unread 29 Apr 2003, 08:23   #13
mbushell
Registered User
 
mbushell's Avatar
 
Join Date: Jul 2000
Location: :noitacoL
Posts: 1,200
mbushell spreads love and joy to the forum in the same way Jesus wouldmbushell spreads love and joy to the forum in the same way Jesus wouldmbushell spreads love and joy to the forum in the same way Jesus wouldmbushell spreads love and joy to the forum in the same way Jesus wouldmbushell spreads love and joy to the forum in the same way Jesus wouldmbushell spreads love and joy to the forum in the same way Jesus wouldmbushell spreads love and joy to the forum in the same way Jesus wouldmbushell spreads love and joy to the forum in the same way Jesus wouldmbushell spreads love and joy to the forum in the same way Jesus wouldmbushell spreads love and joy to the forum in the same way Jesus wouldmbushell spreads love and joy to the forum in the same way Jesus would
Just use a meta refresh jobby
mbushell is offline   Reply With Quote
Unread 29 Apr 2003, 08:24   #14
pablissimo
Henry Kelly
 
pablissimo's Avatar
 
Join Date: Apr 2000
Posts: 7,374
pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
http://7host.com have some kind of automated script execution thing, point it at an address, set the time interval and it'll run the page you point it to, even if it ain't on their servers.

Though I wouldn't pimp their web hosting, it''s not overly reliable.
__________________
You're now playing ketchup
pablissimo is offline   Reply With Quote
Unread 29 Apr 2003, 16:14   #15
Supernova9
m u p p e t
 
Join Date: May 2001
Location: Whenever Wherever
Posts: 477
Supernova9 is infamous around these parts
Quote:
Originally posted by Rayden
while speaking about it whats the PA ticker written in ? C ?

/me wants source code
Written in either C or C++. I think it's C++, as that's what the pages are all compiled in.
__________________
Supernova9 is offline   Reply With Quote
Unread 29 Apr 2003, 23:38   #16
JammyJim
Godfather
 
JammyJim's Avatar
 
Join Date: May 2000
Location: England
Posts: 5,185
JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JammyJim has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
Quote:
Originally posted by Structural Integrity
heh heh....
I have one in ASP....
can i take a look at it?
ive built my own but its not finished yet heh
__________________
Forum Administrator
Mail : [email protected] // IRC : #forums
__________________
It's not personal, it's just business.
JammyJim is offline   Reply With Quote
Unread 13 May 2003, 01:31   #17
the_angry_angel
Supreme Moron
 
Join Date: Sep 2001
Location: My Chair (BATH, UK)
Posts: 57
the_angry_angel is an unknown quantity at this point
Quote:
Originally posted by pablissimo
http://7host.com have some kind of automated script execution thing, point it at an address, set the time interval and it'll run the page you point it to, even if it ain't on their servers.

Though I wouldn't pimp their web hosting, it''s not overly reliable.
sounds like crontabs.
__________________
the_angry_angel
- "back and kicking bottom or what?"
- "ah the nali warcow...the cow was a passive creature that just stood there and mooed. so we shot at it."
the_angry_angel is offline   Reply With Quote
Unread 13 May 2003, 10:23   #18
pablissimo
Henry Kelly
 
pablissimo's Avatar
 
Join Date: Apr 2000
Posts: 7,374
pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
Basically.

Except they're windows machines.

And all it's doing is 'running a URL', doesn't matter if its local or not. Though i never saw the need for it for anything I've done so haven't signed up.
__________________
You're now playing ketchup
pablissimo is offline   Reply With Quote
Unread 13 May 2003, 15:35   #19
Structural Integrity
Rawr rawr
 
Structural Integrity's Avatar
 
Join Date: Dec 2000
Location: Upside down
Posts: 5,300
Structural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriend
Quote:
Originally posted by JammyJim
can i take a look at it?
ive built my own but its not finished yet heh
http://www.geocities.com/structual/dp
or
http://www.geocities.com/structual/DP0-0.zip

It's ancient and I never really finished it (I have a habbit of not finishing projects)
Structural Integrity is offline   Reply With Quote
Unread 13 May 2003, 15:51   #20
BesigedB
Darling
 
BesigedB's Avatar
 
Join Date: Dec 2000
Location: Edinburgh
Posts: 890
BesigedB is a glorious beacon of lightBesigedB is a glorious beacon of lightBesigedB is a glorious beacon of lightBesigedB is a glorious beacon of lightBesigedB is a glorious beacon of light
Quote:
Originally posted by pablissimo
http://7host.com have some kind of automated script execution thing, point it at an address, set the time interval and it'll run the page you point it to, even if it ain't on their servers.

Though I wouldn't pimp their web hosting, it''s not overly reliable.
any host with cpanel gives you cron.
__________________
..
BesigedB is offline   Reply With Quote
Unread 13 May 2003, 18:19   #21
pablissimo
Henry Kelly
 
pablissimo's Avatar
 
Join Date: Apr 2000
Posts: 7,374
pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
I've already pointed out it's a Windows host. I didn't know of an equivalent Windows function.
__________________
You're now playing ketchup
pablissimo is offline   Reply With Quote
Unread 14 May 2003, 00:19   #22
Raging.Retard
Street Tramp
 
Raging.Retard's Avatar
 
Join Date: Apr 2000
Location: Street Gutter
Posts: 341
Raging.Retard has a brilliant futureRaging.Retard has a brilliant futureRaging.Retard has a brilliant futureRaging.Retard has a brilliant futureRaging.Retard has a brilliant futureRaging.Retard has a brilliant futureRaging.Retard has a brilliant futureRaging.Retard has a brilliant futureRaging.Retard has a brilliant futureRaging.Retard has a brilliant futureRaging.Retard has a brilliant future
Quote:
Originally posted by pablissimo
I've already pointed out it's a Windows host. I didn't know of an equivalent Windows function.
Task Scheduler ?
__________________
Chimney Pots.
Raging.Retard is offline   Reply With Quote
Unread 14 May 2003, 03:05   #23
pablissimo
Henry Kelly
 
pablissimo's Avatar
 
Join Date: Apr 2000
Posts: 7,374
pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
OH NOEEEEeeeeessSSSSSSs!"
__________________
You're now playing ketchup
pablissimo is offline   Reply With Quote
Unread 14 May 2003, 12:03   #24
meglamaniac
Born Sinful
 
meglamaniac's Avatar
 
Join Date: Nov 2000
Location: Loughborough, UK
Posts: 4,059
meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
http://www.wincron.co.uk/

__________________
Worth dying for. Worth killing for. Worth going to hell for. Amen.
meglamaniac is offline   Reply With Quote
Unread 14 May 2003, 15:53   #25
pablissimo
Henry Kelly
 
pablissimo's Avatar
 
Join Date: Apr 2000
Posts: 7,374
pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.pablissimo has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
Fine.

There is nothing else on that particular host or any other Windows host I've been with that lets you schedule the execution of a webpage, not a process.

Goddamn pedants =/ This is not conducive for the recovery from a hangover, dammit
__________________
You're now playing ketchup
pablissimo is offline   Reply With Quote
Unread 16 May 2003, 12:36   #26
djcomplex
The Usualsuspects
 
Join Date: Jan 2001
Posts: 240
djcomplex will become famous soon enoughdjcomplex will become famous soon enough
google around for "deto pa"
djcomplex is offline   Reply With Quote
Unread 16 May 2003, 13:56   #27
Structural Integrity
Rawr rawr
 
Structural Integrity's Avatar
 
Join Date: Dec 2000
Location: Upside down
Posts: 5,300
Structural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriend
Assuming atleast one person logs in each hour, you can use the servers clock to execute the script.
If the servers clock has passed a whole hour and there has no tick been processed that hour then execute tick.

If there is no one who logs in an hour then you'll miss ticks. But that doesn't have to be such a bad thing.
Structural Integrity is offline   Reply With Quote
Reply



Forum Jump


All times are GMT +1. The time now is 13:43.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2018