Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pulling newsfeeds from another site (perl)

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Dear all,<br><br>Basically, we are trying to install the perlscript which is shown at <br><A HREF=" TARGET="_new"> this does is pull/harvest newsfeeds from the Guardian Unlimited's site. <br><br>We would like to integrate the following literature news to our site:<br><br><A HREF=" TARGET="_new"> there are no instructions provided for the script and our knowledge of Perl is not great.<br><br>It has taken up a lot of our time and we have no other source for help.<br><br>Can anybody possibly help us? Please explain the bits of the script we need to customize/edit on this messageboard or by writing to <A HREF="mailto:email@litmania.com">email@litmania.com</A>.<br><br>If need be, we would be pleased to renumerate anybody who can help us for their time.<br><br>I reckon it wouldn't take anybody more than half an hour to install/ammend the script.<br><br>Incidentally, does anybody know of any other company which provides specific literature/book newsfeeds (other than isyndicate)? We'd like one which doesn't show the headlines, but the first paragraph or so of the actual news on our site as well.<br><br>Thank you VERY much.<br><br>Yours sincerely,<br>N. Azam<br>Litmania.com Inc.<br><A HREF=" TARGET="_new">
 
Hi,<br><br>From a quick reading of the script there seem to be only two lines you need to change:<br><br>my %content_to_retrieve = (<br>&nbsp;&nbsp;&nbsp;'guardian_news.html'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&gt; '<A HREF=" TARGET="_new">[...].html',<br>&nbsp;&nbsp;&nbsp;'guardian_tv_radio.html' =&gt; '<A HREF=" TARGET="_new">[...].html'<br>);<br><br>should read<br><br>my %content_to_retrieve = (<br>&nbsp;&nbsp;&nbsp;'our_news.html' =&gt; '<A HREF=" TARGET="_new"> <br>);<br> <p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href= Cargill's Corporate Web Site</a><br>
 
Thanks a million for your help.<br><br>I've got it working. See:<br><br><A HREF=" TARGET="_new"> I just have one final, small question:<br><br>How do I 'refer' to it from the HTML of the page I want to have the newsfeed on? Please provide the exact code. <br><br>In other words: what is the code I use in my HTML so that the above news headlines are displayed at, say, <A HREF=" TARGET="_new"> (alongside other stuff on my homepage).<br><br>Thank you VERY much.
 
My pleasure.<br><br>Unfortunately I don't know the first thing about Perl and how it works with HTML.... Someone else probably will though.<br><br>(Sounds like you need to employ a programmer by the way &lt;smile&gt;, like you didn't know that...) <p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href= Cargill's Corporate Web Site</a><br>
 
hi,<br><br>i have read the script. the script will harvest the news and save it to a html file.<br><br>depending on your web server, if your web server supports Server-Side-Include (SSI), you can put the following html tag in your index.html where you want the news to display:<br><br>&nbsp;&nbsp;&lt;!--#include virtual=&quot;/path/to/guardian_news.html&quot; --&gt;<br><br>your should also rename your index.html to index.shtml to indicate that the file contains SSI statement. <p> <br><a href=mailto: > </a><br><a href= > </a><br>ttest<br>
:) happy programming :)
 
My web server does support SSI. I've tried doing exactly what you told me, but it doesn't work. See:<br><br><A HREF=" TARGET="_new"> you know, the newsfeed is at: <br><br><A HREF=" TARGET="_new"> <br><br>I have tried tinkering with the permissions to both the files/URLs, changed the directories, and also tried using the command in my index page, but it doesn't work. <br><br>Do you know why this might be? <br><br>Thank you very very much. <br><br>Nadeem Azam <br><A HREF=" TARGET="_new">
 
You might be able to enable SSI on your local directory by setting the .htaccess file.<br><br>Otherwise, I suggest you make index.pl your main index page and use that script to both load your news items and read in your html text. <p> Sincerely,<br><a href=mailto: > </a><br><a href= Anderson</a><br>CEO, Order amid Chaos, Inc.<br>
 
Thanks a million for your help Tom. You're an absolute angel!<br><br>One final question: I've looked but can't find the .htaccess file. Where would it be?<br><br>Sorry, if this is a fairly basic question, but I'm fairly new to this kind of stuff.<br><br>Best wishes - and thank you VERY much.<br><br>N. Azam<br>Litmania.com Inc.
 
Go to the directory that your script is in and create a new file called .htaccess.&nbsp;&nbsp;Open it up and write the following:<br><br>AddType text/x-server-parsed-html .html<br><br>close it and chmod 644.<br><br>Then add this line to your html file:<br><br>&lt;!--#include virtual=&quot;/path/to/guardian_news.html&quot; --&gt;<br><br>If it doesn't work, then the server administrator has disabled the ability to modify the default settings.<br><br>If that's the case, then either do it using perl (index.pl) as I suggested, beg the administrator to give you local permission to do this, or get a new host. <p> Sincerely,<br><a href=mailto: > </a><br><a href= Anderson</a><br>CEO, Order amid Chaos, Inc.<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top