• Resolved cliff_77

    (@cliff_77)


    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

    (@cyberseo)

    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:

    https://www.cyberseo.net/cyberseo6-plugin-for-wordpress/

    • This reply was modified 6 years, 4 months ago by cyberseo.
    Thread Starter cliff_77

    (@cliff_77)

    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.