dwest100 0 Posted March 23 Share Posted March 23 (edited) Hi, I have this curl string required by an email verification vendor I use. Inside my php file I wish to run it. Apparently there is a problem with the syntax as I’m getting the following error in the browser: ”Parse error: syntax error, unexpected '--' (T_DEC) in /var/www/html/wp-content/plugins/dw_functionality_plugin/dw_functionality_plugin.phpon line 398 Here is the code string: < curl --request POST\ --url 'https://api.neverbounce.com/v4/single/check?key={' . api_key . '}&email={' . email . '}; > any help much appreciated! Edited March 23 by dwest100 Quote Link to post Share on other sites
gw1500se 63 Posted March 23 Share Posted March 23 I have no idea what that is. Use the PHP cURL library. Quote Link to post Share on other sites
NotionCommotion 32 Posted March 23 Share Posted March 23 2 hours ago, dwest100 said: Hi, I have this curl string required by an email verification vendor I use. Inside my php file I wish to run it. Apparently there is a problem with the syntax as I’m getting the following error in the browser: ”Parse error: syntax error, unexpected '--' (T_DEC) in /var/www/html/wp-content/plugins/dw_functionality_plugin/dw_functionality_plugin.phpon line 398 Here is the code string: < curl --request POST\ --url 'https://api.neverbounce.com/v4/single/check?key={' . api_key . '}&email={' . email . '}; > any help much appreciated! If you are truly trying to send ?key={' . api_key . '}&email={' . email . '}, that is your error, and you really want to send ?key=yourApiKey&email=theemail@bla.com; Quote Link to post Share on other sites
maxxd 103 Posted March 24 Share Posted March 24 It looks like you're trying to combine cURL CLI and cURL php. They aren't interchangeable or compatible. Follow the link gw1500se gave you, then consider NotionCommon's advice. Quote Link to post Share on other sites
dwest100 0 Posted March 28 Author Share Posted March 28 Thanks much! Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.