1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

I need some PHP code to create accounts on ..

Discussion in 'PHP & Perl' started by sw1344, Jan 18, 2011.

  1. sw1344

    sw1344 Newbie

    Joined:
    Nov 14, 2010
    Messages:
    22
    Likes Received:
    11
    Hi all,

    I need some PHP code (code fragment that actually works) to create 1 or More accounts on StatusNet installations.

    The script needs to fill out the registration form such as

    Code:
    ht tp :/ /  posts . be / main / register
    
    Sorry can't post urls at this stage!
    [code]
    
    I'm not that worried about the email verificaction at this stage.
    
    Can anyone help?
    
    SW
     
  2. locknload007

    locknload007 Regular Member

    Joined:
    Apr 14, 2010
    Messages:
    491
    Likes Received:
    71
    try imacro
     
  3. locknload007

    locknload007 Regular Member

    Joined:
    Apr 14, 2010
    Messages:
    491
    Likes Received:
    71
    Code:
    VERSION BUILD=7000908 RECORDER=FX
    SET !ERRORIGNORE YES
    CMDLINE !DATASOURCE accounts.csv
    SET !DATASOURCE_COLUMNS 8
    SET !LOOP 1
    SET !DATASOURCE_LINE {{!LOOP}}
    TAB T=1
    URL GOTO=http://posts.be/main/register
    TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:[URL]http://posts.be/main/register[/URL] ATTR=ID:nickname CONTENT={{!COL1}}
    SET !ENCRYPTION NO
    TAG POS=1 TYPE=INPUT:PASSWORD FORM=ACTION:[URL]http://posts.be/main/register[/URL] ATTR=ID:password CONTENT={{!COL2}}
    SET !ENCRYPTION NO
    TAG POS=1 TYPE=INPUT:PASSWORD FORM=ACTION:[URL]http://posts.be/main/register[/URL] ATTR=ID:confirm CONTENT={{!COL3}}
    TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:[URL]http://posts.be/main/register[/URL] ATTR=ID:email CONTENT={{!COL4}}
    TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:[URL]http://posts.be/main/register[/URL] ATTR=ID:fullname CONTENT={{!COL5}}
    TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:[URL]http://posts.be/main/register[/URL] ATTR=ID:homepage CONTENT={{!COL6}}
    TAG POS=1 TYPE=TEXTAREA FORM=ACTION:[URL]http://posts.be/main/register[/URL] ATTR=ID:bio CONTENT={{!COL7}}
    TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:[URL]http://posts.be/main/register[/URL] ATTR=ID:location CONTENT={{!COL8}}
    TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ACTION:[URL]http://posts.be/main/register[/URL] ATTR=ID:license CONTENT=YES
    TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:form_register ATTR=ID:submit
    You then create the text file with

    Nickname, Password, Confirm, Email, Full name, Homepage, Bio, Location
     
  4. tpaolo

    tpaolo Regular Member

    Joined:
    May 28, 2009
    Messages:
    333
    Likes Received:
    45
    you can do it with free roboform version, I think...
     
  5. sw1344

    sw1344 Newbie

    Joined:
    Nov 14, 2010
    Messages:
    22
    Likes Received:
    11
    Thanks for the idea of using iMacro.

    I'll try that out and see if it will do what I want..

    Take care and thanks again.
     
  6. rjaus

    rjaus Newbie

    Joined:
    Apr 23, 2010
    Messages:
    35
    Likes Received:
    5
    If you want to use PHP you should read up on cURL. Its a library that allows you to mimic the http commands of a browser.

    Its very good for posting forms and creating login/registration scripts.

    If you need a hand let me know.