User Tag List

Results 1 to 9 of 9

Thread: Moosock and PHP: Anyone got POST (not get!) work?

  1. #1
    Clicker Fusion 2.5Fusion 2.5+ DLC

    Join Date
    Jun 2006
    Posts
    903
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Moosock and PHP: Anyone got POST (not get!) work?

    Hi,
    After long long time I want to use MooSock and POST command, but I cannot get it working.
    In the tutorials there is POST but actually its GET
    Like here:
    - Send text line POST +http://www.flava.viperhosting.net/addname.php?name= + Edittext$( Name ) + HTTP/1.0

    Its simple GET (parameter is added after the address), not POST..
    So Im curious how to get POST working. I need to use POST since get is limited to 255 chars.
    Thanks!

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Moosock and PHP: Anyone got POST (not get!) work?

    Hello.
    PHP Code:
    "POST http://www.flava.viperhosting.net/addname.php HTTP/1.0
    (misc. headers here, like Content-Length...)
    name="
    +Edittext$( Name 
    So basically

    POST address protocol
    Misc. headers, Host, Content-Length...
    parameters

  3. #3
    Clicker Fusion 2.5Fusion 2.5+ DLC

    Join Date
    Jun 2006
    Posts
    903
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Moosock and PHP: Anyone got POST (not get!) work?

    This is another problem - is there any way how in MMF2 get byte lenght of string?

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Moosock and PHP: Anyone got POST (not get!) work?

    Yes, there is, Len("String"). (One byte = one character, btw)

  5. #5
    Clicker Fusion 2.5Fusion 2.5+ DLC

    Join Date
    Jun 2006
    Posts
    903
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Moosock and PHP: Anyone got POST (not get!) work?

    Thanks.
    Hmm strange, it retrieves OK but the data are not passed to script (with GET it worked).

    Here is the code /after connect/:

    "POST http://www.chmatakov.cz/test.php HTTP/1.0"
    "Content-Length:"+Str$(Len(Edittext$( "BlahBox" )))
    ""
    Edittext$( "BlahBox" ))

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Moosock and PHP: Anyone got POST (not get!) work?

    What's the content of BlahBox? It mustn't begin with a "?".

  7. #7
    Clicker Fusion 2.5Fusion 2.5+ DLC

    Join Date
    Jun 2006
    Posts
    903
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Moosock and PHP: Anyone got POST (not get!) work?

    Im trying with numbers, so thats not that problem :/

    The PHP code is simple:

    <?php
    $data=array();

    foreach($_GET as $key=>$value) $data[]='[GET] '.$key.' = '.$value;
    foreach($_POST as $key=>$value) $data[]='[POST] '.$key.' = '.$value;

    if(!count($data)) $data[]='nothing sent';

    file_put_contents('./data.txt',implode("\n",$data));
    chmod('./data.txt',0777);
    ?>

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Moosock and PHP: Anyone got POST (not get!) work?

    I don't know, sorry. You should try to google for HTTP's POST method.

  9. #9
    Clicker Fusion 2.5Fusion 2.5+ DLC

    Join Date
    Jun 2006
    Posts
    903
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Moosock and PHP: Anyone got POST (not get!) work?

    Never mind, thank you anyway

Similar Threads

  1. About MooSock
    By Locaz00 in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 13th February 2008, 04:51 PM
  2. moosock.mfx-bug
    By mmf2 in forum File Archive
    Replies: 0
    Last Post: 8th November 2007, 11:10 AM
  3. bug with MOOSock and HTTP POST
    By neat_Kliker2 in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 12th May 2007, 11:31 AM
  4. Moosock and php
    By droberson in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 28th April 2007, 01:53 PM

Posting Permissions

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