Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 17 15:34
    rgasch closed #131
  • Sep 15 10:06
    boyardnicolas commented #138
  • Aug 19 17:51
    CLAassistant commented #140
  • Jun 15 11:16
  • Jun 15 11:07
    CLAassistant commented #159
  • Jun 15 11:07
    siwymilek opened #159
  • Jun 02 23:28
    Travis Kong/unirest-php (master) errored (255)
  • Jun 02 23:16
    Travis Kong/unirest-php (master) errored (254)
  • Jun 02 22:27

    curiositycasualty on master

    (compare)

  • Jun 02 22:24

    curiositycasualty on master

    (compare)

  • Jan 17 17:06
  • Jan 17 17:04
    Travis ennorehling/unirest-php (master) errored (1)
  • Jan 17 17:01
    CLAassistant commented #158
  • Jan 17 17:01
    ennorehling opened #158
  • Jan 17 16:39
    ennorehling commented #156
  • Jan 17 16:37
    ennorehling commented #156
  • Jan 17 16:37
    ennorehling commented #156
  • Jan 17 16:33
    ennorehling commented #156
  • Jan 07 11:59
    JamieSlome opened #157
  • Dec 22 2021 09:04
    EdgarWahn edited #156
flole123
@flole123
yes

<?php
require_once 'unirest-php-master/src/Unirest.php';

$response = Unirest\Request::post("https://community-sentiment.p.mashape.com/text/",
array(
"X-Mashape-Key" => "key",
"Accept" => "application/json"
),
array(
"txt" => "Today is a good day"
)
);
echo json_encode($response);

?>

orliesaurus
@orliesaurus
edit the key pls :P
flole123
@flole123
wups. now verone has my key haha
orliesaurus
@orliesaurus
u can edit it
flole123
@flole123
i'll change it :P
orliesaurus
@orliesaurus
theres only me and you online
lol ^^
flole123
@flole123
haha okay. now it's editet
orliesaurus
@orliesaurus
k now i try again
flole123
@flole123
I don’t see any difference, unfortunately :(
orliesaurus
@orliesaurus
ok it works for me
here's my code
flole123
@flole123
hm
orliesaurus
@orliesaurus
<?php
require_once 'Unirest.php';
$response = Unirest\Request::post("https://community-sentiment.p.mashape.com/text/",
  array(
    "X-Mashape-Key" => "MY-BEAUTIFUL-KEY",
    "Accept" => "application/json"
  ),
  array(
    "txt" => "great value in its price range!"
  )
);

var_dump($response);

?>
flole123
@flole123
there’s no difference right ?
let me copy paste
object(Unirest\Response)#1 (4) { ["code"]=> int(401) ["raw_body"]=> bool(false) ["body"]=> NULL ["headers"]=> array(1) { ["{"message""]=> string(84) ""Missing Mashape application key. Go to https:\/\/www.mashape.com to get your key."}" } }
maybe my AMshape settinhgs are wrong
orliesaurus
@orliesaurus
ok
use this key
This message was deleted
or regenerate one of your own
flole123
@flole123
I’ve used yours and still get the error.
I’ve also regenerated my keys several times without success
orliesaurus
@orliesaurus
\o/
thats super strange
mmmmmh
can you confirm having the latest mashape unirest php library ?
(just going through the basics)
flole123
@flole123
I downloaded it today...
orliesaurus
@orliesaurus
ok
flole123
@flole123
probably i did sth wrong with the integration.
orliesaurus
@orliesaurus
did u copy paste my code exactly yes?
flole123
@flole123
yes :D
also with your key
orliesaurus
@orliesaurus
did you also did the require_once line to point to the right file?
again just checking everything
im sure you did
but sometimes the most obvious things
is where we forget
flole123
@flole123
yeah.
orliesaurus
@orliesaurus
r u on mac,linux or windoze
flole123
@flole123
mac
wait a second.
I’ll send you the structure on the server
can I send an image?
orliesaurus
@orliesaurus
yes if theres private data u cn send it as a private message
orliesaurus
@orliesaurus
problem half solved!
orliesaurus
@orliesaurus
good luck flo :)