I tried the example with my access keys, but there seem to be several errors. Some things I had to fix:
[1] You didn't urlencode the "question", which results in a bug if it includes whitespaces.
[2](and following) You forgot the brackets () around the ternary if-then-else operator. Therefore these fields are missing in the request..
I tried the example with my access keys, but there seem to be several errors. Some things I had to fix: [1] You didn't urlencode the "question", which results in a bug if it includes whitespaces. [2](and following) You forgot the brackets () around the ternary if-then-else operator. Therefore these fields are missing in the request..
Now at least the basic example works..
[1] https://github.com/jackbot/PHP-Mechanical-Turk/blob/master/MechanicalTurk.class.php#L59 [2] https://github.com/jackbot/PHP-Mechanical-Turk/blob/master/MechanicalTurk.class.php#L55
Now the createHit function looks like this:
` public function createHit($question, $params = null) {
`