User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 18

Thread: MooSock and PHP problem...

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MooSock and PHP problem...

    Hello everybody,

    I have a ccn application that sends results of a test to a php script that's suppose to write down these results on a file on the server. For many computers, it works fine. But for many others, (mostly from my clients :cry: )it doesn't. Instead, the ccn application receive this kind of message:

    [color:#000099]"HTTP/1.1 400 Bad Request (Invalid Verb)"[/color]

    or

    [color:#000099]"Bad Request"
    "Your browser sent a request that this server could not understand. Invalid URl in request ?filename=rezu.csv&password=accesspw&donne e=results,1,1,2,2HTTP/1.0"[/color]

    I use a Get method:

    Send Text "GET " + "http://mysite.go" + "/this/donnees/myscript.php"
    Send Text"?filename="
    Send Text"rezu.csv"
    Send Text"&password="
    Send Text"ecpelpw"
    Send Text"&donnee="
    Send TextEdittext("edit")
    Send Text"HTTP/1.0..."

    Does somebody know what's going on?

    Many thanks in advance!

    Michel Bastien

  2. #2
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: MooSock and PHP problem...

    It looks like you're missing a space or two, specifically one between GET and http, so the server is seeing GEThttp and going "I don't know what a GEThttp command is" (aka, bad verb).

    Ok?

    EDIT: I think you might be missing a space between the url and HTTP/1.0 as well

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: MooSock and PHP problem...

    Missing a space: well, no. I made a mistake when I wrote down the lines here: there is a space between the GET and the http in the application.

    Also, if there was a problem with a space, it would not work at all, wouldn't it? But the MooSock communication always work with some computers and the server and never with some others!

  4. #4
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,825
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)

    Re: MooSock and PHP problem...

    Some servers are very picky on the headers your sending.
    It must completely conform to the http specs are they will reject them as spam/dos or some other attack.

  5. #5
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: MooSock and PHP problem...

    I would use "Send text line" rather than "Send text" - otherwise it looks like your lines are going to run into each other. The "HTTP1.0" is being stuck on to the end of your Results field.

    Send text line "GET [the entire URL]"
    Send text line "From: blah@nowhere.com"
    Send text line "User-Agent: HTTPTool/1.0" (or similar)
    Send text line ""
    Disconnect

  6. #6
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: MooSock and PHP problem...

    I said this because of your message from the server that said "?filename=rezu.csv&password=accesspw&donn ee=results,1,1,2,2HTTP/1.0", managing to miss the page name out of the url (suggests that you missed a space between get and the page name) and it's welded HTTP/1.0 to the end, suggesting that you missed a space there too.

    If you'd like to post your code (as in the actual file) I'm sure we could figure out what was wrong.

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: MooSock and PHP problem...

    Yes, I well examine the spaces in my command lines carefully.

    And I will try the Send text line commands too.

    I will send my code as in the actual file in a few moments.

    But can you take a look at the message from the server again: between values, I see "&" but my app's instructions just send the "&". Could it be that some computers are mistakingly interpreting my ampersand character?

    (And, btw, if you type an ampersand in, will it look like mine?)

  8. #8
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: MooSock and PHP problem...

    I did wonder about the & characters - I think it might be the error reporting bit of code interpreting them, though I'm not sure.

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: MooSock and PHP problem...

    There: you can take a look to my code:

    To my message in the File Forum

    About the ampersand: yes, I use a French-Canadian keyboard and it would not be the first time I have a problem with special characters like this and some MMF functions. (If somebody knows a way around...) And it would maybe explain why my app works on some computers (those with a French-Canadian keyboard setting) and not with others (those with an English setting)...

  10. #10
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: MooSock and PHP problem...

    Ok, it works for me, and I have a uk keyboard setting. I get "HTTP/1.1 200 OK". I tried it against my own web server and I get "HTTP/1.1 404" (not found) but that's right because I don't have your script on my server.

    It's worth remembering that you're not supposed to send the web address as part of the url, you should really send it is a header, like this:
    GET /page/?data HTTP/1.1
    Host: xyz.site.com

    also, you shouldn't actually send the http:// bit either. Perhaps the people it's failing for are behind a transparent proxy / router of some kind which is not liking your non-standard request?

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Moosock Transfer Files problem
    By Dagge in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 5th July 2010, 10:03 PM
  2. Using MooSock......
    By pinacoladaxb in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 13th May 2008, 08:45 PM
  3. Moosock and php
    By droberson in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 28th April 2007, 01:53 PM
  4. MooSock Connection Problem
    By Hezkore in forum File Archive
    Replies: 5
    Last Post: 5th April 2007, 07:08 PM
  5. MooSock & UDP
    By jdv in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 26th July 2006, 12:49 AM

Posting Permissions

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