Can you drop this in and let us know what $content
looks like?
<?php
$c = curl_init();
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_URL, "A WORKING API");
$content = curl_exec($c);
curl_close($c);
echo '<pre>';
print_r($content);
echo '</pre>';
I am curious if this is a WordPress issue or just a CORS issue with the call being made from a different host.
Related Posts:
- How can I make my custom shortcode work in a Custom HTML Widget?
- How to trigger $_GET request within admin plugin page?
- How can I get WordPress to save comments in markdown format?
- wp_remote_get() returns 403 while file_get_contents() does not
- How to translate to spanish wordpress hardcoded content/files?
- Showing how many times is plugin activated or deactivated
- Form tries to download a file on submit
- How to create a “Most Popular” & “Latest” TAB in WordPress
- Accessing Correct Database to Create REST API Endpoint
- REST API – filters not working inside plugin class
- What are the differences between WPINC and ABSPATH?
- dealing with large HTML output via plugin code
- 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?
- Customizing subject in comment notification e-mails
- category_name not working (not showing up in sql query debug)
- Using require_once in a Plugin?
- Output in XHTML or HTML 5 for plugins?
- 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
- Editor not displaying dynamically after clicking on the button
- 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?
- 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
- Deleting images through upload folder, but not deleting from media library
- WordPress Admin sub-level menu issue
- WordPress PHP error getting posts from another wordpress blog
- Change pricing in Woocommerce based on Category and Product [closed]
- register_activation_hook doesn’t fire at all
- Plugin communication between sites that use it?
- Passing ajax variable to more than one wordpress plugin function
- My ajax request don´t work and return 0
- WordPress environment not loading properly
- Problem with conditional woocommerce custom checkout field
- How to remove a css class for any wordpress page
- Populate select option with JSON file
- hide load more button if there are no posts left to display
- WordPress not displaying information on post sent from custom admin form
- insert multiple entries in database using a loop issue
- Displaying friend’s posts only
- Adding link on title its in description but not in title see screenshots attached
- Theme editor removes backslashes
- How to limit each front-end user to view just his own uploaded files on Amazon S3?
- Creating a user ‘add custom field’ section
- How can I insert a record into a custom table from my custom form in my custom admin page?
- Autoloading a PHP class – working outside, but not inside WordPress plugin
- Plugin Hook: Get posts
- Saving an array to get_options
- Saving plugin data returns “You do not have sufficient permissions to access this page.”
- Plugin Breaking WordPress Login
- How to get site homepage from plugin?
- How to add a handler for a button in plugin?
- Can anyone tell me why I can’t edit a plugin when it is installed without having to re-install?
- Doing action based on input from options menu
- Undefined variable _POST
- Extend WordPress REST API with Scheme Pro Plugin
- Help me with my first very basic plugin
- Load my plugin before cache
- How use Dynamic hyperlink on each wordpress post?
- Unable to show 4 products in a row
- How to fix ‘Call to undefined function do_settings()’ error?
- What is the source outline for a basic word press plugin?
- My wordpress website admin panel loads very slow, what can i do about that? [closed]
- Submit posts in two different post types with the same form
- wordpress select multiple options and illegal string offset ‘timeslot’ [closed]
- how to search through plugin in wordpress cimy-user-extra-fields?
- How to create post comparison in wordpress
- What can I do to customize a widget provided with this plugin? from where have I to start?
- wordpress illegal string offset ‘parameter’ error
- wordpress Ajax success doesn’t return the value
- How can I send api calls from my plugin?
- How to add custom html to the Media > Attachment Details modal?
- Displaying Category Feature image on loop
- Function not being called on form submit, only blank admin-post.php page
- Need help with wordpress audio preload
- wp_handle_upload – specified file failed upload test
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- Option value not getting updated until page refresh in WordPress
- Limit entry to a WordPress page
- Is it possible to create post in wordpress using postman?
- How to override plugin function in code snippets WordPress
- How to make a Template page to show the information of different things Shop and Product page?
- How to fix template and image buffering issues on website [closed]
- How to trigger plugin migration code when plugin updates?
- How to Save Category and Delete Category in same Function