Welcome to TalkGraphics.com
Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: code generator

  1. #1

    Default code generator

    Hi guys i need help!
    i need something like a code generator, basicly each time someone opens or reopens a certain page, on my website, they see a differnt code like , 00022984
    next would be 0002223, so each time you open it, its a differnt number??? any tips on how to do that?? thank you

  2. #2
    Join Date
    Jun 2010
    Posts
    695

    Default Re: code generator

    Like a hit counter?

  3. #3

    Default Re: code generator

    almost, but i want that eachtime someone views the page.. no matter if its same pc or not.. that it changes.. even if they view with a mobile device , blackberry,iphone which ever, i changes the amount. or well code

  4. #4
    Join Date
    Apr 2010
    Location
    Kildare, Ireland
    Posts
    906

    Default Re: code generator

    That's basically what a hitcounter does, I use statcounter and you can choose to display page load count or visitor count if you want to. You could also use php to display a unique number - simple way without saving data would be to use the time() function, so it would basically display a different number every second based on the time. Or you could use javascript too I suppose, maybe pull the time from the visitors machine. It depends on what the purpose is and if you want to reference the number to something or it's just for display purposes.
    XT-CMS - a self-hosted CMS for Xara Designers - Xara + CMS Demo with blog & ecommerce shopping cart system.

  5. #5
    Join Date
    Sep 2000
    Location
    Bracknell, UK
    Posts
    8,659

    Default Re: code generator

    Here's a clue you can adapt:

    http://www.programmersheaven.com/mb/...in-a-text-box/

    My guess is it's a 'Deal code' to make the visitor feel special.

  6. #6

    Default Re: code generator

    I like the idea of the time, but only problem is that after 60, it will repeat itself? so would defeat the purpose.
    I do need it for a "deal" type thing, but in this case i need every visitor to have a different number so that they can claim the "deal" with different print out numbers at the real store in real life.
    Visitor "page view" number might work? meaning it would NEVER be the same, since each time load it, its an extra view, but how would i add that? what code?

  7. #7

    Default Re: code generator

    Open the attached .web file and preview.
    Press F5 to refresh to generate a new unique string.
    Attached Files Attached Files

  8. #8

    Default Re: code generator

    Ahhh i opened that by mistake while it was auto saving! now xara crashed! and my "saved" copy of it on my pc doesnt want to read?? help??

  9. #9

    Default Re: code generator

    iv done so much to the site since i saved a copy last on an external! is there any way to save this?? still have all the html files atleast etc???

  10. #10

    Default Re: code generator

    whew! nvm! found where xara saves "backups" Thank you lord!

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •