cloudy

Author Topic: Great New Weather Script - Need PHP Help (long)  (Read 3996 times)

0 Members and 2 Guests are viewing this topic.

Offline 1080iAddict

  • Posts: 45
Re: Great New Weather Script - Need PHP Help (long)
« Reply #15 on: June 08, 2006, 12:07:25 AM »
Here is the screen shot for those that want to see (the top scroller box is the first script and the bottom scroller box is the second script):




Offline 1080iAddict

  • Posts: 45
Re: Great New Weather Script - Need PHP Help (long)
« Reply #16 on: June 08, 2006, 12:10:45 AM »
OK.  So I played a bit more and added some more code revision to get rid of the NWS hyperlink at the bottom of the RSS Description.  This way, it only gives the description and not the hyperlink (which does not work anyway and says a href=http.....)

Code: [Select]
$newstring=str_replace(''', '\'', $what); //replace those half valid apostrophe entities with actual apostrophes
$newstring=preg_replace('|&lt;br&gt;|s', "<br>", $newstring); // return <br> to HTML form
$newstring=preg_replace("|(a href=http://\S*)|s","", $newstring); // remove NWS hyperlink to clean up display
$newstring=preg_replace("|&lt; Weather Forecast Office Homepage\S*|s","<p>", $newstring); // remove remaining NWS reference stuff to clean up display

I needed to do it by two more lines...there is probably a better way to do it if Ken wants to chime in....but this is how I was able to get it to work.

Adam

Offline aifan27

  • Tim
  • Posts: 2,857
  • Pennsylvania
    • Newtown Weather
Re: Great New Weather Script - Need PHP Help (long)
« Reply #17 on: June 08, 2006, 12:18:16 AM »
Adam,

Do you think you could make the screenshot larger?

Can't really see it...

Thanks.

--Tim

Offline 1080iAddict

  • Posts: 45
Re: Great New Weather Script - Need PHP Help (long)
« Reply #18 on: June 08, 2006, 01:40:24 AM »
I know.  Sorry Tim.  I am challenged here.  I tried to upload it and it says file too big.  So a photoboard is hosting it and I cant get it bigger.  Unfortunantly, I am running the PHP on a intranet so I cant give out a URL.  You can see the idea by clicking on the link I first posted to see the script sample page. 

Adam

Offline aifan27

  • Tim
  • Posts: 2,857
  • Pennsylvania
    • Newtown Weather
Re: Great New Weather Script - Need PHP Help (long)
« Reply #19 on: June 08, 2006, 06:13:50 PM »
Gotcha...Looks good.  8)

Thanks Adam.

--Tim

 

cumulus