Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   Programming & Scripting (http://www.greenguysboard.com/board/forumdisplay.php?f=15)
-   -   Link rotating with perl (http://www.greenguysboard.com/board/showthread.php?t=49184)

p3rlphr33k 2008-09-22 05:49 PM

Link rotating with perl
 
Im looking for a simple explanation on how to rotate links with perl. Any resources would be helpful. I really dont want to write one from scratch knowing that there are probably 1000 of these scripts out there.|shocking|
Thanks in advance!

Simon 2008-09-23 07:00 AM

My buddy 'Big G' says you can find some examples here.

:)

p3rlphr33k 2008-09-23 03:04 PM

That was the last place i would have looked... j/k
I have been searching around, but I guess I was just looking for a 'professional' opinion on whats good. I will continue my search with your friend, 'Big G'.
Thanks!

Simon 2008-09-23 04:03 PM

Some may be rotating with php here or maybe using OpenX (phpAdsNew) to handle ad links. Or have something built into their site scripts to rotate different kinds of links. Narrow it down a little on what kinds of links you want to rotate and someone may suggest a specific solution.

p3rlphr33k 2008-09-23 04:39 PM

Good point, Im looking for a program that will rotate daily with crontab, the entire link list on a per niche flat file DB, with perl if possible.

justbondage 2008-09-24 01:58 AM

Maybe I am over simplifying this but....

Have your crons only function to be to update the niche flat files with a number that appears at the top of them $currentnum or something - this will start at 0 and go to the amount of links you have in the file, once it gets to totalnumberoflinks-1 it should reset to 0.

Then all you need to do is read in that number, read in the links as an array, then output the scalar that lives at array[$currentnum].

This of course is assuming you want each link to get am equal amount of exposure.


All times are GMT -4. The time now is 03:53 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc