I want A PHP script designed to
a) track the number of days since a given visitor's first visit to a website;
b) convert days and intervals into dates, such that “5 days now elapsed since initial visit on 1 January” becomes an html- formatted “January 6th” and “Day0 + 364” becomes “December 31st”.
c) display different prewritten texts based on the number of days elapsed.
So: When the visitor comes to the site for the first time, and within a certain number of days after that, he sees one or two paragraphs of html text. Within the next period, he sees some different paragraphs. Within the third pre-set period, he sees a third set of paragraphs, etc. The number and length of each period must be configurable via input fields in the admin's interface.
The script's parameters must be easily adjustable by the site admin through a simple html interface. Interface must permit rich html formatting of text dynamically generated by the script.
Below is some crude pseudo-code designed to give you an idea of what I want. Obviously, do it whatever way works best.
I wish to retain all rights to the script.
a) on first visit-- Day 0-- , DayCount is initialized and logged with cookie
--DayCount subsequently measures days elapsed between date of current visit and first visit
b) DayCount is compared to values in TextSchedule array
--each value in this array is a threshold at which text changes
--if DayCount=TextSchedule1 but <TextSchedule2, TextFragment1 renders
SITE ADMIN EXPERIENCE
Input Fields for
--number of texts ready for display
b) TextFragment array
--html-formatted texts to be displayed
--number of date ranges, each of which generates a different text
d) TextSchedule array
--lengths for successive date ranges
--arbitrary number that generates a date prior to first visit
--specifies number of values in TextFragment array
--sets number of input fields for TextFragments
--example: “4” produces four input fields:
----TextFragment0, TextFragment1, TextFragment2, TextFragment3
b) TextFragment array
--N = (TextQuantity – 1)
--array of arbitrary values
--each value is an html-formatted text fragment
TextFragment0, example hello
TextFragment1, example turtle
--specifies number of times calendar will change text displayed to visitor
--specifies number of values in TextSchedule array and therefore number of input fields for TextSchedule array
---example: “3”produces three TextSchedule input fields
c) TextSchedule array
--array of arbitary values
--each value represents number of days from the initial visit
--each value is a threshold at which a new TextFragment displays
--first value is 0; other values must be arbitrary
--example: given values 0, 30, 60, 90...
---on Day 0 through Day 29, the visitor sees the text fragment associated with TextFragment0
---if the visitor returns during the period from Day 30 until Day 60, TextFragment1 displays
---from Day 60-89 TextFragment2 displays
TextSchedule1, example: 30
TextSchedule2, example: 60
--arbitrary number of days prior to visitor's first visit
--used to dynamically display a date prior to the visitor's first visit, on Day 0
---given Day0 of January 14
---present date: January 16
---BackDate of “5”
---Display example: “Thanks for coming. Why didn't you come on January 9th?”
**All dates displayed, including BackDate, must be set so as to display within rich html formatting.
12 freelancers are bidding on average $87 for this job
I'm a freelance PHP/MySQL programmer from The Netherlands (build over 150 websites + do some open source programming). I am online via many (voice) chat programs.
I can do this must I warn you that in order to know the first time that one person enters your website a "cookie" must be used. So you must have cookies enabled in you browser or it will not work properly.