Results 1 to 4 of 4

[AHK] Get a Fake Name Generator Identity

This is a discussion on [AHK] Get a Fake Name Generator Identity within the Source Code Samples forums, part of the Programming category; This code snippet downloads an identity from Fake Name Generator and even parses it all for you so that you ...

  1. #1
    nick761 is offline 3.14159265358979323846264
    Join Date
    May 2008
    Location
    United States
    Posts
    1,056

    Default [AHK] Get a Fake Name Generator Identity

    This code snippet downloads an identity from Fake Name Generator and even parses it all for you so that you can immediately use the data. It only takes a few seconds to implement and works really well. You can remove unnecessary fields if you don't want to use them. It's already URLEncoded - the street, for example, is 123+Name+Street. The RegEx is pretty advanced if you don't know how it works and I'd be happy to explain exactly how this script works to anyone. Please give credit if you use because it did take a while to get fully working.

    Code:
    ; Fetch the fake name generator page
    UrlDownloadToFile, http://www.fakenamegenerator.com/, fng.htm
    FileRead, fng, fng.htm
    FileDelete, fng.htm
    
    ; Parse out the vCard URL that has all the important info
    regex := "(?<=/vcard.php\?identity=).?(?="">)"
    RegExMatch(fng, regex, info)
    
    ; Separate the data into separate strings
    StringReplace, info, info, --, /, All ; Workaround to allow AHK to use more than one character as a delimiter in a parse loop
    Loop, Parse, info, /
    {
      if A_Index = 1
        firstName = %A_LoopField%
      if A_Index = 2
        lastName = %A_LoopField%
      if A_Index = 3
        street = %A_LoopField%
      if A_Index = 4
        zipCode = %A_LoopField%
      if A_Index = 5
        state = %A_LoopField%
      if A_Index = 6
        city = %A_LoopField%
      if A_Index = 7
        phone = %A_LoopField%
      if A_Index = 8
        birthDay = %A_LoopField%
      if A_Index = 9
        birthMonth = %A_LoopField%
      if A_Index = 10
        birthYear = %A_LoopField%
      if A_Index = 11
        email = %A_LoopField%
    }
    
    ; Here's en example that shows you all the data
    MsgBox, Hello, %firstName% %lastName%. Do you still live at %street% in %city%, %state% %zipCode%? Is your phone number %phone% and your birth date %birthMonth%-%birthDay%-%birthYear%? Good day.
    Last edited by nick761; 12-29-2009 at 03:21 PM.
    Test out an early version of my SonyRewards bot! Check it out
    GSN Oodles Answer Database - The original GSN answer database, now with over ten thousand answers.
    gPrize - A fast, lightweight, and customizable Oodles prize checker.

  2.   Alt These ads help cover server costs and such.


  3. #2
    Lyov's Avatar
    Lyov is offline <3
    Join Date
    Aug 2009
    Posts
    624

    Default

    thank you so much for this
    I get this...:
    Last edited by Lyov; 12-30-2009 at 11:09 PM.

  4. #3
    nick761 is offline 3.14159265358979323846264
    Join Date
    May 2008
    Location
    United States
    Posts
    1,056

    Default

    Aww, FNG is now encoding the data in the vCard URL. Looks like I'll have to add a lot more parsing to the script.
    Test out an early version of my SonyRewards bot! Check it out
    GSN Oodles Answer Database - The original GSN answer database, now with over ten thousand answers.
    gPrize - A fast, lightweight, and customizable Oodles prize checker.

  5. #4
    zSteelo is offline Junior Member
    Join Date
    Jul 2009
    Posts
    190

    Default

    You should just download like 5000 identities in the bulk order place. A lot easier, CSV, doesn't slow net, etc.
    Rawr.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Facebook Bots | Admin Forum