Bugfix my worpdress shortcode plugin [5$ Paypal]

So, I’m making a WordPress shortcode that crawls an API. I’m having problems with the PHP (I don’t know PHP and I’m just stitching bits together). but in essence, the plugin is done but I’m getting the error: (Courtesy of https://phpcodechecker.com/ ). I’m putting a 5$ Bounty to PayPal on to whoever can get this working.

PHP Syntax Check: Parse error: syntax error, unexpected ‘’ (T_ENCAPSED_AND_WHITESPACE), expecting ‘-’ or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in your code on line 17.

Below I have made a Pastebin of it which can be found here. Reply to me with you checking it over with the fix and I’ll send you the money via Paypal. Thank you, everyone!

You missed a proper escape of the $_SERVER[‘REMOTE_ADDR’] section.

Also the ending ‘?>’ is not needed, and could possibly create a whitespace issue in the future.

Let me know if this isn’t what you were looking for.

Sponsor our Newsletter | Privacy Policy | Terms of Service