inferno885 Posted July 30, 2015 Share Posted July 30, 2015 (edited) I want to code a script, that will automatically add a feed from my website to feedburner, here is the steps that needs to happen. step one: login to google step two: add a feed post fields = sourceUrl step three: enter in feed details post fields, name, mappedUri curl basic syntax, this is the way I think I am going to have to code this. $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_POST, 1); // Edit: prior variable $postFields should be $postfields; curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); $result = curl_exec($ch); Edited July 30, 2015 by inferno885 Quote Link to comment https://forums.phpfreaks.com/topic/297550-i-need-help-with-feedburner-script/ Share on other sites More sharing options...
QuickOldCar Posted July 30, 2015 Share Posted July 30, 2015 Make your own feed for your site. Quote Link to comment https://forums.phpfreaks.com/topic/297550-i-need-help-with-feedburner-script/#findComment-1517748 Share on other sites More sharing options...
inferno885 Posted July 30, 2015 Author Share Posted July 30, 2015 Make your own feed for your site. not sure what you mean, the app I am working on needs to do it programmatically, there is a similar web app that has this functionality so I know it can be done. Quote Link to comment https://forums.phpfreaks.com/topic/297550-i-need-help-with-feedburner-script/#findComment-1517778 Share on other sites More sharing options...
QuickOldCar Posted July 30, 2015 Share Posted July 30, 2015 I see, you want to allow a user or yourself to post their channel and they collect on your site? Let me say in a nutshell that lots changed since the api version 2 was deprecated, most everything youtube wants you to access through api version 3. Youtube no longer supports the old feeds as of April 2015 https://docs.google.com/presentation/d/1ZBCl6MGc4-JZYVbaq0z-CB8Uxh3nzgkOmMOVkM5eCdQ/edit?pli=1#slide=id.g9ca1da998_0_4 Feedburner will throw errors on many feeds. Here is a good example. https://www.youtube.com/user/JimmyKimmelLive https://www.youtube.com/feeds/videos.xml?channel_id=JimmyKimmelLive It's actually this that can find in the source of the page. https://www.youtube.com/feeds/videos.xml?channel_id=UCa6vGFO9ty8v5KZJXQxdhaw <link rel="alternate" type="application/rss+xml" title="RSS" href="https://www.youtube.com/feeds/videos.xml?channel_id=UCa6vGFO9ty8v5KZJXQxdhaw"> There is still a few ways can go about it. If the channel is a vanity url, have to visit the page and discover the actual url, the feed url is in the source of the page. Something like simplepie can discover the new url and get this content. Alternately you can extract user,video or playlist id's and visit them directly with following types of urls I have below. Parse it with dom, simplexml is the best bet, although you can scrape the page other methods like curl/file_get_contents, preg_match user channel feed: https://www.youtube.com/feeds/videos.xml?channel_id=UC-rYhqY2vWalkWSPGhYFZHA playlist feed: https://www.youtube.com/feeds/videos.xml?playlist_id=PLs4hTtftqnlDb1HQ1cbYkwyVTB5X3p7v5 Quote Link to comment https://forums.phpfreaks.com/topic/297550-i-need-help-with-feedburner-script/#findComment-1517789 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.