Why do you have curly brackets in there?
Maybe sanitize/process the query string with htmlspecialchars(
) first. The error is complaining about non-standard characters…which is what your curly brackets are doing.
Build the query string with the $ip value, convert with htmlspecialchars()
, then add the URL to the query string. Pass that variable to the wp_remote_get()
function.
Related Posts:
- REST-API: extend media-endpoint
- Create or Update thousands of woocommerce products via PHP
- How to modify WCMP Rest API response?
- Integrating boxtal PHP library into a custom WordPress Plugin
- is it possible to fetch data from a remote api while admin is writing a new post?
- Showing how many times is plugin activated or deactivated
- Can’t access 3rd party API, code works on local server but not on wordpress
- How can I send api calls from my plugin?
- Is it possible to create post in wordpress using postman?
- Accessing Correct Database to Create REST API Endpoint
- REST API – filters not working inside plugin class
- Error 400 Invalid “products[1].productId” Kinguin [closed]
- What are the differences between WPINC and ABSPATH?
- Problems with autoloading classes via sp_autoload_register / maybe interfering WP-specific autoloader
- How to remove duplicate sub-menu name for top level menu items in a plugin?
- How to build an API as a plugin
- Customizing subject in comment notification e-mails
- category_name not working (not showing up in sql query debug)
- Using require_once in a Plugin?
- How can I make my custom shortcode work in a Custom HTML Widget?
- How to Loop Plugin Option Field Set?
- Making plugin unique to not conflict with plugins with the same name
- How to find out if option exists but is empty?
- Update Multiple Post Meta for the Same Post In One call?
- How to pass JavaScript variable to PHP in wordpress widget?
- Unable to add admin notice on plugin activation
- How To Ignore a Filter On Applying Filter the Content In a Function
- Saving Plugin settings to the database
- How do I configure WordPress to talk to a Microsoft SQL Server database?
- WordPress widget / plugin….fields not appearing in my widget
- Add CSS animation as Preloader to WordPress
- Rename existing old uploaded images containing accented French characters (not during upload)
- How to list the Hooks and order of execution in current loading page? [duplicate]
- How to Create a Directory in a Plugin Folder?
- Multisite functions to communicate with individual site functions
- Errors while using ajax from external wordpress page
- shortcode doesn’t work
- Ajax call doesn’t work in frontend but it’s working in backend (when I’m logged in)
- Create plugin that works in background
- Checking for user role in a custom plugin
- send_headers don’t work on wordpress multisite
- Keep user’s privileges on accessing contents in JSON response
- jQuery function didn’t work in my plugin
- Sanitizing, Validating and Escaping in WordPress (Plugin)
- Escape when echoed
- Scope for PHP Variables Assigned in functions.php or a plugin
- Plugin exceeds memory limit
- Write to / remove from default .htaccess file from plugin?
- Update Option Error: Notice: Undefined index
- Plugin Development sqlite or WordPress’ database
- Best way to hook a custom url?
- How to cancel WordPress’ action/filter when using OOP with anonymous callback
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- How to trigger $_GET request within admin plugin page?
- How to generate video out of images via WordPress plugin
- How can I add an options page for my class based plugin?
- Sending WP posts to external API
- How can I get WordPress to save comments in markdown format?
- WooCommerce get_price returning wrong price when used via ajax
- How to ‘clone’ a wp plugin to make small changes
- Open Post Thumbnail in New Child Theme File in WordPress
- Where should I save an API key of my user when installing my plugin?
- Is Wrapping intval() Around esc_attr() Redundant for Escaping Input?
- Programatically download a plugin
- Redirecting to home page after login as custom role WordPress
- Add keywords meta to index.php page
- Custom form action to handle data inside a plugin
- Self deactivate plugins after an action occurs
- Pulling data from custom plugin settings using PHP shortcode and Javascript
- How to periodically scrape and cache strings from remote txt files. – My First Plugin
- WP Post Template – Templates in own folder
- Avoid class name collision when using third party libraries in plugins?
- wordpress plugin is not activating from widget
- How to access data in wordpress database externally using php
- Edit Yoast SEO breadcrumbs output [closed]
- How would I go about creating a user ranked post popularity page?
- Redirection of users away from wp-admin (but not administrators)
- Using a custom plugin to capture input data via Ajax and PHP
- code is working properly in Core PHP but writing coding in WordPress
- Creating a custom post type, adding custom meta fields, preventing all future editability of posts of this type
- wp_get_post_terms is difference obj model than the one in rest api response
- How to fetch products with the price in a page on woocommerce using a form or live search with php
- Image upload and download from front-end
- How to output CMB2 select options from repeated groups select elements?
- Access WordPress data from external PHP application.
- Creating a Callback URL for WordPress Woocommerce to update Order Status
- 306 MB of wp_options occupied by WordPress SEO Plugin, is that normal? [closed]
- Limit post creation by role
- What are the specifics of WordPress development I need to know? [closed]
- Ajax call returning 0
- How to deal with WordPress and Pocket API to automate content curation on my hosted wordpress blog? [closed]
- Set plugin-values when creating post via REST-API
- WP All Import – Execute Imports
- How to replace WordPress Media Upload Window with user’s device window?
- Conditional attributes and logic per product category
- how to do login using woocommerce rest api From android
- How to create a custom post type that contains another custom post type?
- Perform internal redirect in WordPress?
- How to prevent plugins from loading jQuery
- WordPress get_avatar function not correct working