Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Questions about the random numbers script

  1. #1
    Join Date
    Mar 2006
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Talking Questions about the random numbers script

    Heres a question about something I have seen alot when registering for the first time on a new site.

    How hard is it to write? If I have the pictures of the numbers on file could this file be substituted in it ?

    thanks,
    John

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,127
    Thanks
    44
    Thanked 3,228 Times in 3,189 Posts
    Blog Entries
    12

    Default

    Probably. But, what are you talking about exactly? Where is this script?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Do you mean the bot check scripts that say "type the numbers shown in the image below?" If so, this isn't Javascript; it would have to be done with a server-side language with graphics-manipulation support.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    Mar 2006
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Talking

    When you register for a new site and it ask you to enter a number combination or a letter number combination exactly as it is. The numbers or letters are the varibles and they can change randomly from time to time. Its an assignment for my jscript class and I was wanting to get some ideas about it before attemping it.

    thanks,
    John

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Yes, I know what you're talking about. But your professor, apparently, doesn't. Doing this in Javascript would defeat the point. It tends to be a script on the server that generates an image containing the numbers or letters.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #6
    Join Date
    Mar 2006
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question

    Now I am really confused she gave us the site files to write the script into and the pictures / graphics if its not javascript then what are we working with or trying to write?

    thanks
    John

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,127
    Thanks
    44
    Thanked 3,228 Times in 3,189 Posts
    Blog Entries
    12

    Default

    If you have no script as a jumping off point (even a random number generator would do) and no layout that you want the script to power, you are not only up a creek with no paddle, you don't even have a creek.

    My suggestion would be to find some kind of random number generator or array shuffling routine and to set up a layout that at least looks like what you want even if it doesn't yet do what you want. Then take your best shot at making it work.

    If you need help at that point, that's what we are here for. Designing your project from scratch with just a vague idea of what it is about is not something we generally go in for around here.

    Twey's observations that this sort of thing would be best done server side sound right on to me except that, as an exercise in javascript, for a class, using javascript for this would seem acceptable. It would not be good for preventing robots from signing up repeatedly to spam a real website or to host valid users who happen to have javascript either disabled or unavailable.

    If the assignment was to use javascript, I'd go for it. For extra credit you might want to research why javascript is not the best method for this and perhaps even devise a PHP or asp version. But, knowing teachers and students in general, if the assignment is javascript, use javascript.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #8
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    JS is a bad idea 'cause the bots could just read the JS that verifies it... like giving a class a test with a copy of the key attached...
    Use if you must, though.

    To add to the ideas above--
    start with a set of like 10 images. Then you don't have to worry about generating images... JS can't do that. Those 10 images would then have codes or something, and matching "correct" text entries.... it would fool the bots because, unless someone checked your site out a bunch, they'd just assume it to be random... not that you only have 10 choices.
    But... random isn't too hard... just making the images and corresponding keys... that's kinda hard.


    You don't have to answer this here, but I'm just kinda wondering. Are you doing well in your class? I mean... shouldn't the teacher be teaching this stuff? If you're not doing so well, then it makes more sense (about the teacher)... but... yeah.
    I don't mean to sound like I'm accusing you of something... just wondering... I mean, if I were to take a class, I'd hope that I wouldn't have to go outside the class to get ideas for these things... hope that the teacher would be a valuable resource.
    //off topic...

  9. #9
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I don't mean to sound like I'm accusing you of something... just wondering... I mean, if I were to take a class, I'd hope that I wouldn't have to go outside the class to get ideas for these things... hope that the teacher would be a valuable resource.
    People are more likely to remember things they have to take time to find out themselves. This is why tests and little assignments like this are so frequently used in educational institutions.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  10. #10
    Join Date
    Mar 2006
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have messed with javascript before this class mainly with jims menu 5.7 I am not an expert there still things I need to learn. To me debugging can be fun .

    thanks,
    John

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
  •