473,467 Members | 1,985 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ


News Script

By Blair Ireland
Senior Editor, TheScripts.com

News

Now we are offering two news sources as well, so we have to choose our news sources.

Although it is possible to parse news sites any way you want, such as discussed in our leeching news from sites tutorial, I recently came upon a site that provides PHP applications that already have the work done for you! The site can be found at http://swamp.chl.chalmers.se/backends/, and you can just download all of the news parsers at http://swamp.chl.chalmers.se/backends/download/PHPbackends.tar.gz.

Your options are: 32bitsonline, Appwatch, Arstechnica, BeBits, BeNews, BeOS Central, BetaNews, EmuSphere, FileWatcher, Freshmeat, Geeknews, Gimp News, Hacker News Network, Happy Penguin Additions, HotWired's Webmonkey, LinuxApps, Linux.com Tuneup, Linux.de (German), LinuxDEV.Net, Linuxfreak Newdownload, Linuxnewbie.org, LinuxQuake, Linuxtelephony, Linuxticker (German), Linux Today, Mozilla.org, Segfault, Slashdot, SoftwareCenter, SolarisCentral, and lastly SolarisGuide.

Alot eh? You will have to go through each of your options listed, and change the configuration as you see fit.

For your <OPTION VALUE=""></OPTION> Fields though, you will want to put in the name of the PHP file, so 32bitsonline would look like <OPTION VALUE="32bitsonline.php3">32bitsonline</OPTION>. All of the scripts will need to be in the same directory as well.

Now we need a sample registration form.... so here's the HTML we will use.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE> Register </TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<FORM METHOD=POST ACTION="http://www.yoursite.com/register.php3">
<TABLE>
<TR>
    <TD COLSPAN=2><CENTER>Please Select Your Registration Options</CENTER></TD>
</TR>
<TR>
    <TD>Choose Your UserName</TD>
    <TD><INPUT TYPE="text" NAME="Name" size="20"></TD>
</TR>
<TR>
    <TD>Choose Your Password</TD>
    <TD><INPUT TYPE="password" NAME="Password" size="10"></TD>
</TR>
<TR>
    <TD>Password Confirmation</TD>
    <TD><INPUT TYPE="password" NAME="Password2" size="10"></TD>
</TR>
<TR>
    <TD>News Source 1</TD>
    <TD><SELECT NAME="News1">
            <OPTION VALUE="32bitsonline.php3">32bitsonline</OPTION>
            <OPTION VALUE="freshmeat.php3">Fresh Meat</OPTION>
            <OPTION VALUE="slashdot.php3">Slashdot</OPTION>
            <OPTION VALUE="hotwired.php3">WebMonkey</OPTION>
            </SELECT>
    </TD>
</TR>
<TR>
    <TD>News Source 2</TD>
    <TD><SELECT NAME="News2">
            <OPTION VALUE="32bitsonline.php3">32bitsonline</OPTION>
            <OPTION VALUE="freshmeat.php3">Fresh Meat</OPTION>
            <OPTION VALUE="slashdot.php3">Slashdot</OPTION>
            <OPTION VALUE="hotwired.php3">WebMonkey</OPTION>            
            </SELECT>
    </TD>
</TR>
<TR>
    <TD>Weather Source</TD>
    <TD><SELECT NAME="Weather">
            <OPTION VALUE="USNY0996">New York</OPTION>
            <OPTION VALUE="USCA0987">San Francisco</OPTION>
            <OPTION VALUE="CAXX0504">Toronto</OPTION>
            </SELECT>
    </TD>
</TR>
<TR><TD COLSPAN=2><CENTER><INPUT TYPE="submit" Value="Register!"></CENTER></TD></TR>
</TABLE>
</FORM>
</BODY>
</HTML>

« Weather Forecast Script Member Script »

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.