If you have ever used Drupal Core's Dashboard module and decided to give access to it to multiple roles, you might have seen that if the user doesn't have access to a dashboard block, it won't be invisible but instead it will be shown with a value of (empty). The following functions tries and succeeds in fixing this exact problem.
The drupal_http_request() function supports connections using a proxy. You can configure a global proxy to use for all drupal_http_request() callbacks from the settings.php file of your website/installation by filling the following lines with the proper information:For those of you preferring a UI, then HTTP proxy module is for you.But what if you only want to use a proxy in some cases; like a custom module? In that case you will need the following function(modify accordingly):Now all you have to do is Call <?php _MYMODULE_change_proxy(); ?>.Do your drupal_http_request() calls.Call <?php _MYMODULE_change_proxy(TRUE); ?> to reset your previous settings.