s0crates9 Posted April 3, 2007 Share Posted April 3, 2007 Is there a way to take a newsgator javascript link or something similar and use the output in PHP so that the links from an RSS feed are in HTML? Right now for example, Newsgator gives users for blogs a line like: <script src="http://services.newsgator.com/ngws/headlines.aspx?uid=XXXXXX&mid=XX"></script> I want to use PHP to post the results into HTML like: <a href="http://www.blah.com/news/story1.html">Story of the hour!</a><br /> <a href="http://www.blah.com/news/story2.html">Story Number 2</a><br /> ETC... Any help with this would be much appreciated! Quote Link to comment Share on other sites More sharing options...
Goose Posted April 13, 2007 Share Posted April 13, 2007 It seems like newsgator only provides a JS implementation for their service. You would probably have to check with newsgator on this. Quote Link to comment Share on other sites More sharing options...
nogray Posted April 13, 2007 Share Posted April 13, 2007 Not sure how will the newsgator output the HTML, but if the script prints out HTML code, you can load the output into a div, and fill a form field with the div innerHTML and submit the form to a php file. <html> <head> <script language="javascript"> function submit_form(){ document.getElementById('html_output').value = document.getElementById('HTML_code').innerHTML; document.getElementById('html_form').submit(); } </script> </head> <body onload="submit_form();"> <div id="HTML_code"> <script src="http://services.newsgator.com/ngws/headlines.aspx?uid=XXXXXX&mid=XX"></script> </div> <form method="post" action="SOME_PAGE.php" id="html_form" name="html_form"> <input type="hidden" name="html_output" id="html_output" /> </form> </body> </html> Quote Link to comment 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.