The HTTP request sent by wp_remote_get()
is different from the one that a browser sends. E.g the user-agent
is different (see documentation). Some websites respond differently based on this.
The second argument of wp_remote_get()
allows one to alter the request.
Websites might also respond differently depending on the IP or the number of requests received (usually by limiting or banning certain patterns).
By the way, I tested the page you mentioned and it works for me:
wp_remote_get("http://www.aljazeera.net/news/international/2016/8/24/%D9%82%D8%AA%D9%84%D9%89-%D9%88%D8%AF%D9%85%D8%A7%D8%B1-%D8%A8%D8%B2%D9%84%D8%B2%D8%A7%D9%84-%D9%8A%D8%B6%D8%B1%D8%A8-%D9%88%D8%B3%D8%B7-%D8%A5%D9%8A%D8%B7%D8%A7%D9%84%D9%8A%D8%A7");
Related Posts:
- Cannot access non-wordpress subdirectories as wordpress overrides them with a 404 error
- Error 404 Page Not Found When Updating a Post or Page
- : Failed to load resource
- Only on 404 page, get notice: trying to get property of non-object on nonce
- Is there a way to avoid 404 pages in WordPress?
- Homepage Not Found Error [closed]
- wp_remote_get sslv3 alert handshake failure
- @file_get_contents and wp_remote_get
- Blog automatically redirected to error page
- Site Address (URL) – causing error 404
- 404 Not found error after update to WordPress 5.0
- styles/default.css in markup, where does it come from? [closed]
- Getting 404 error on homepage only
- When trying to access home page, WordPress appends /wordpress to domain name which gives 404 error
- 404 Not Found Error showing when I run wordpress
- Header already sent, error shows core files
- : this page isn’t working. is unable to handle the request. Http error 500
- How to fix this CORS error?
- Logging out gives 404 error
- Any idea on how to fix this error when forcing SSL on a certain page?
- Random HTTP 500 error in WordPress
- Showing errors with $wpdb update
- Change login error messages
- WP_DEBUG is not set, but I’m still getting warnings
- How to disable the fatal error (WSOD) protection?
- How to eliminate weird 404 errors in wp-admin?
- Unable to locate WordPress Content directory (wp-content)
- Could not create directory /wp-content/upgrade/
- Getting the warning: Missing argument 2 for manage_posts_custom_column()?
- Setting 404 page in Nginx
- What log files does a WordPress installation write to?
- How to display admin error notice if settings saved succesfully?
- HTTPS leads to Sorry, you are not allowed to access this page
- How to fix “There has been a critical error on your website. Please check your site admin email inbox for instructions”?
- Notice: Undefined index: host in /var/www/html/wp-includes/canonical.php on line 445
- What is the best way to monitor PHP functions/executions?
- Notice: Use of undefined constant SCRIPT_DEBUG
- Notice: Constant WP_POST_REVISIONS already defined
- Uncaught ReferenceError:switchEditors is not defined
- How to stop certain warning logging in error.log?
- WordPress Redirecting to wp-admin/install.php
- Debug mode shows Strict Standards
- How to use WP_Error $data argument?
- Is it possible to disable caching of an option when using w3 total cache?
- Why on Earth am I getting “undefined_index” errors?
- Showing error “Function create_function() is deprecated”
- HTTP request on localhost failing
- strange characters in wordpress website displayed for visitors [closed]
- Debugging ‘Object of class WP_Query could not be converted to int’ error
- How to fix ob_end_flush() error?
- How to fix strange 500 Error after Editing Menu?
- When does remove_filter not work?
- error_log over 70GB. How to stop this? [closed]
- $wpdb->insert Database Error Duplicate Entry Error Logging
- Unwanted redirect in admin area
- Update wordpress fail – There has been a critical error on your website
- This webpage is not available ERR_NAME_NOT_RESOLVED
- Displaying oEmbed errors?
- Getting headers already sent error from plugin
- “Apache HTTP Service has stopped working” with WP Query in WordPress 2.9.2
- Error 310 too many redirects after switching domains
- How do I set up Debugging?
- Why am I sometimes getting a 404 error when I try to update a page with Elementor?
- Error Logs to Diagnose Error 500 in LAMP
- Add image only in first post
- Error messages when adding code to function.php or trying to delete inactive plugin files
- http error when uploading media files
- “Notice: Undefined index:” error when adding new content?
- 418 header status, I’m a teapot [closed]
- Showing “ Notice: Undefined variable:” and “ Notice: Trying to get property of non-object”
- Publishing Time – WordPress Plain White Screen with No Error
- Object of class WP_Error could not be converted to string
- New WordPress Error Message – Not seen this before
- Does wordpress have an error log?
- WP_DISABLE_FATAL_ERROR_HANDLER vs WP_DEBUG ? What to use and when to use to see errors?
- Handling duplicates with wp_insert_term()
- Recommend a guide to catching plugin errors, please?
- HTTP Error when uploading mp4 video file
- How to handle core code throwing notice on valid input?
- Getting Warnings & Notices from Fresh WordPress 3.1.2 install
- Call to undefined function get_header() in index.php
- How can I create a custom page for this error?
- List Category Posts plugin upgrade fails with fatal error
- Sodium compat error
- Fatal error: require(): Failed opening required ‘WP_DIRwp-blog-header.php’
- What do these “Failed to import” errors mean and how do I fix it?
- How to get a Custom 500 Error Page to show?
- Dashboard Whitescreen of Death?
- add_sub_menu page() to be replaced by add_theme_page()
- Why Better WP security plugin returns 418 I’m a Teapot “error”?
- Getting soft 404 errors (200 status) when caching plugins are enabled
- Trying to get property of non-object in wp-includes/capabilities.php
- How to use add_settings_error in register_setting callback
- How can I find the cause of theme crashing Apache in Xampplite?
- How to return HTTP 404 when no search results found?
- Allowed Memory Size Error in WordPress
- Application passwords not working on localhost?
- PHP Notice error (when on 404 page)
- using wp_remote_get to retrieve own url on local host
- tb_show is not defined in advance custom field