Title: Adding UserAgent Fixed Image Download Issues
Last modified: November 20, 2018

---

# Adding UserAgent Fixed Image Download Issues

 *  Resolved [cliff_77](https://wordpress.org/support/users/cliff_77/)
 * (@cliff_77)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/adding-useragent-fixed-image-download-issues/)
 * I downloaded your plugin and it seemed to work absolutely perfectly for my needs,
   except that for some reason the thumbnail images weren’t being downloaded and
   set correctly (when I set “Post thumbnail” to “Generate from first image”).
 * I did some troubleshooting and realized that the RSS feeds server was returning
   a 403 error when the script tried to download the image, but the image worked
   fine when I looked at it in a browser. Adding a UserAgent to your script fixed
   the issue and now everything is working perfectly.
 * Might I suggest that you add the UserAgent into the script itself so I don’t 
   have to edit the plugin every time you update? Obviously, there may be reasons
   not to do it, but it helped me a lot.
 * The fix I made was to change:
 * `$content = @file_get_contents($url);`
 * on line 187 of cybersyn.php to:
 *     ```
       ini_set('user_agent','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36'); 
       $content = @file_get_contents($url);
       ```
   
 * Thanks again for the great plugin!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Contributor [cyberseo](https://wordpress.org/support/users/cyberseo/)
 * (@cyberseo)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/adding-useragent-fixed-image-download-issues/#post-10914065)
 * Thanks for your suggestion. I know about this issue. Some feeds do really block
   the scripts w/o user agent, that try to pull the RSS content. Course it could
   be easily fixed as you suggested above.
 * But tin this case the new problem will arise. Some feed sources like feedburner
   return the RSS feed content only if it was requested by a script which has no
   user agent. In case if user agent is set like ‘Mozilla/5.0…’, feedburner will
   return HTML page instead of the actual RSS feed.
 * The professional version of CyberSyn has an option which allows one to define
   the user agent for every single feed. Thus I recommend you to visit this URL,
   download **CyberSEO ver. 6** which is freeware, and use it instead of CyberSyn:
 * [http://www.cyberseo.net/cyberseo6-plugin-for-wordpress/](http://www.cyberseo.net/cyberseo6-plugin-for-wordpress/)
    -  This reply was modified 7 years, 6 months ago by [cyberseo](https://wordpress.org/support/users/cyberseo/).
 *  Thread Starter [cliff_77](https://wordpress.org/support/users/cliff_77/)
 * (@cliff_77)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/adding-useragent-fixed-image-download-issues/#post-10932154)
 * I figured it was probably more complicated than I thought it was. Thanks for 
   the suggestion and your hard work!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Adding UserAgent Fixed Image Download Issues’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/cybersyn_3e8cb8.svg)
 * [CyberSEO Lite - RSS, News Feeds, Video Feeds, Autoblogging, SEO and More!](https://wordpress.org/plugins/cybersyn/)
 * [Support Threads](https://wordpress.org/support/plugin/cybersyn/)
 * [Active Topics](https://wordpress.org/support/plugin/cybersyn/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cybersyn/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cybersyn/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [cliff_77](https://wordpress.org/support/users/cliff_77/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/adding-useragent-fixed-image-download-issues/#post-10932154)
 * Status: resolved