[ale] creating web pages on remote servers

Cade Thacker linux at cade.org
Fri May 23 14:59:16 EDT 2003


Hey Drew, I used php to do almost this exact same thing. The error
checking in this could be a little tighter, but should do what you want.
Hope this helps...

Also if you are running a *nix you could set up a very simple cron wget.
Using the timestamping feature of "wget -N" (or something like that) to
compare dates, the program will only get the file if newer, otherwise
ignore.

If you have any other questions, feel free to email me on-list
or off-list.....


function get_web_page($my_url)
{
    $fp = fopen($my_url, "r");

    $page_data="";

    while ($fp && !feof($fp))
        $page_data .= fgets($fp,1000);

    fclose($fp);

    return $page_data;

}

function write_file_to_disk($my_file_name, $data)
{

    if (!is_writeable($my_file_name))
    {
        print "Cannot write to file \"$my_file_name\"";
        exit;
    }


    if (!$file_handle = fopen($my_file_name, "w+"))
    {
        print "Cannot open file \"$my_file_name\"";
        exit;
    }

    if (!fwrite($file_handle, $data))
    {
       print "Cannot write to file \"$my_file_name\"";
       exit;

    }

    fclose($file_handle);

}

--cade

On Linux vs Windows
==================
Remember, amateurs built the Ark, Professionals built the Titanic!
==================



On Fri, 23 May 2003 ale-request at ale.org wrote:

> Send Ale mailing list submissions to
> 	ale at ale.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://www.ale.org/mailman/listinfo/ale
> or, via email, send a message with subject or body 'help' to
> 	ale-request at ale.org
>
> You can reach the person managing the list at
> 	ale-admin at ale.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Ale digest..."
>
>
> Today's Topics:
>
>    1. Re: no 802.11g for Linux? (Jonathan Rickman)
>    2. Re: What technology is used on chat web pages? (Christopher Fowler)
>    3. creating web pages on remote servers (ChangingLINKS.com)
>    4. Re: creating web pages on remote servers (Geoffrey)
>    5. Re: What technology is used on chat web pages? (Geoffrey)
>    6. Re: no 802.11g for Linux? (Michael D. Hirsch)
>    7. Re: no 802.11g for Linux? (Dow Hurst)
>    8. Re: What technology is used on chat web pages? (Christopher Fowler)
>    9. Re: What technology is used on chat web pages? (Bill Paule)
>   10. Re: no 802.11g for Linux? (Jason Day)
>   11. Re: no 802.11g for Linux? (Geoffrey)
>   12. Re: no 802.11g for Linux? (Geoffrey)
>   13. [OT]:  [EFGA] Help!  Web site changes (Geoffrey)
>   14. RE: What technology is used on chat web pages? (David Hamm)
>   15. Re: What technology is used on chat web pages? (Dylan Northrup)
>   16. quick, simple backup (Tom & JaVonn)
>   17. Re: quick, simple backup (Robert L. Harris)
>
> --__--__--
>
> Message: 1
> Date: Fri, 23 May 2003 07:49:35 -0400 (EDT)
> From: Jonathan Rickman <jonathan at xcorps.net>
> To: <ale at ale.org>
> Subject: Re: [ale] no 802.11g for Linux?
> Reply-To: ale at ale.org
>
> On Thu, 22 May 2003, Jim Philips wrote:
>
> > This discussion:
> >
> > http://www.ussg.iu.edu/hypermail/linux/kernel/0304.3/1120.html
> >
> > claims that there won't be any open source drivers for 802.11g wireless cards,
> > because they can operate at any frequency and the feds don't want people
> > using them to hack into frequencies reserved for them. Does anybody know more
> > about this? Is this the straight dope? Or is this person full of it?
>
> No. He's not full of it. There likely will not be an "open source" driver
> for some chipsets. However, a binary driver will most likely be provided
> once the demand for it peaks.
>
> --
> Jonathan Rickman
> X Corps Security
> http://www.xcorps.net
>
>
> --__--__--
>
> Message: 2
> Date: Fri, 23 May 2003 09:09:09 -0400
> From: Christopher Fowler <cfowler at outpostsentinel.com>
> To: ale at ale.org
> Subject: Re: [ale] What technology is used on chat web pages?
> Reply-To: ale at ale.org
>
> Keep the page lean and set a autorefresh in a metatag
>
> On Fri, May 23, 2003 at 08:10:37AM -0400, Jim Lynch wrote:
> > How do they write web pages such as chat pages?  Traditional web pages
> > are "fetch" only technology.  That is, the user controls when he wants
> > the page to change, except for a bit of javascript that can refresh or
> > modify the page locally.  But on a chat type page, the server has to be
> > able to send data to the users page when the other party enters
> > something.  Does anyone know how you could do that?   I suppose a
> > javascript could set a timer and refresh periodically, but that doesnt
> > appear to be the way it works.
> >
> > Is there a way to establish a pipe somehow?
> >
> > I'd like to write a simple chat page via perl and cgi, if possible.
> >
> > Thanks,
> > Jim.
> > _______________________________________________
> > Ale mailing list
> > Ale at ale.org
> > http://www.ale.org/mailman/listinfo/ale
>
> --__--__--
>
> Message: 3
> From: "ChangingLINKS.com" <x3 at ChangingLINKS.com>
> Organization: ChangingLINKS.com
> To: ale at ale.org
> Date: Fri, 23 May 2003 08:11:47 -0500
> Subject: [ale] creating web pages on remote servers
> Reply-To: ale at ale.org
>
> I want be able to update a flat file (.txt) on a remote Server(B) without a
> password. I will install a .php/perl/cfm/asp script and place a blank file
> (with write permissions, I guess) on Server(B).
>
> Server(A) will trigger a script that prompts Server(B) to parse a page
> dynamically created on Server(A). I want Server(B) to save the the data from
> the parsed page in the flat file (so that it can access the info without
> relying on Server(A)). There is no mySQL database on Server(B).
>
> My question goes to web administrators:
> Would Perl (cgi-bin) or .php be more likely to have FILE WRITING ability on
> hosting accounts around the world? Would it be common for servers to be set
> up so that a .php/perl script could write to a file?
> --
> Wishing you Happiness, Joy and Laughter,
> Drew Brown
> http://www.ChangingLINKS.com
>
> --__--__--
>
> Message: 4
> Date: Fri, 23 May 2003 09:23:12 -0400
> From: Geoffrey <esoteric at 3times25.net>
> To: ale at ale.org
> Subject: Re: [ale] creating web pages on remote servers
> Reply-To: ale at ale.org
>
> ChangingLINKS.com wrote:
>
> > My question goes to web administrators:
> > Would Perl (cgi-bin) or .php be more likely to have FILE WRITING ability on
> > hosting accounts around the world? Would it be common for servers to be set
> > up so that a .php/perl script could write to a file?
>
> Absolutely.
>
> --
> Until later: Geoffrey		esoteric at 3times25.net
>
> The latest, most widespread virus?  Microsoft end user agreement.
> Think about it...
>
>
> --__--__--
>
> Message: 5
> Date: Fri, 23 May 2003 09:32:29 -0400
> From: Geoffrey <esoteric at 3times25.net>
> To: ale at ale.org
> Subject: Re: [ale] What technology is used on chat web pages?
> Reply-To: ale at ale.org
>
> Christopher Fowler wrote:
> > Keep the page lean and set a autorefresh in a metatag
>
> That really isn't a reasonable solution, although I've seen it done.  I
> guess it depends on what your intended use is.
>
> But, say I'm on the chat page, entering something, suddenly it
> refreshes. That's assuming the design is a single window or multiple
> frames.  Still, you have this distracting refresh.  I think a smarter
> solution is needed such as a client/server java app.
>
> --
> Until later: Geoffrey		esoteric at 3times25.net
>
> The latest, most widespread virus?  Microsoft end user agreement.
> Think about it...
>
>
> --__--__--
>
> Message: 6
> From: "Michael D. Hirsch" <mhirsch at nubridges.com>
> Organization: nuBridges
> To: ale at ale.org
> Subject: Re: [ale] no 802.11g for Linux?
> Date: Fri, 23 May 2003 09:38:18 -0400
> Reply-To: ale at ale.org
>
> On Thursday 22 May 2003 06:48 pm, Jim Philips wrote:
> > This discussion:
> >
> > http://www.ussg.iu.edu/hypermail/linux/kernel/0304.3/1120.html
> >
> > claims that there won't be any open source drivers for 802.11g wireless
> > cards, because they can operate at any frequency and the feds don't want
> > people using them to hack into frequencies reserved for them. Does
> > anybody know more about this? Is this the straight dope? Or is this
> > person full of it?
>
> I hate to contradict the people who say he is wrong, but some pretty top
> kernel developers seem to believe it, too.  This is covered in the latest
> kerneltraffic under the heading "Some WLAN Chip Specs Secret To Protect
> Military Communications"
> http://www.kerneltraffic.org/kernel-traffic/kt20030520_216.html#2
>
> Here is a representative excerpt:
>     David S. Miller also said:
>
>     Don't expect specs or opensource drivers for any of these pieces of
>     hardware until these vendors figure out a way to hide the frequency
>     programming interface.
>
>     Ie. these cards can be programmed to transmit at any frequency, and
>     various government agencies don't like it when f.e. users can transmit
>     on military frequencies and stuff like that.
>
> If David Miller says it, I'm inclined to believe it.  Later in that thread
> Alan Cox chimed in and did not say anything to contradict it, either.
>
> Michael
>
> --__--__--
>
> Message: 7
> Date: Fri, 23 May 2003 09:59:26 -0400
> From: Dow Hurst <dhurst at kennesaw.edu>
> To: ale at ale.org
> Subject: Re: [ale] no 802.11g for Linux?
> Reply-To: ale at ale.org
>
> We have a Dell Inspiron 8500 I've been configuring for Linux and this
> was a disappointment when the mini-PCI Broadcom card wasn't recognized.
> I went searching and found all this stuff out too.  At least the
> wireless isn't needed when using Linux.  The user will just boot to
> Windows and collect whatever is needed, reboot to Linux, and then grab
> the files off the NTFS partition.  We will try the wireless later when
> someone figures it out.  Some people are just getting a Orinoco Gold
> WiFi card for $59 and using it instead in their fancy new Dell laptops.
> Dow
>
>
> Jim Philips wrote:
>
> >This discussion:
> >
> >http://www.ussg.iu.edu/hypermail/linux/kernel/0304.3/1120.html
> >
> >claims that there won't be any open source drivers for 802.11g wireless cards,
> >because they can operate at any frequency and the feds don't want people
> >using them to hack into frequencies reserved for them. Does anybody know more
> >about this? Is this the straight dope? Or is this person full of it?
> >
> >
> >_______________________________________________
> >Ale mailing list
> >Ale at ale.org
> >http://www.ale.org/mailman/listinfo/ale
> >
> >
> >
>
> --
> __________________________________________________________
> Dow Hurst                  Office: 770-499-3428
> Systems Support Specialist    Fax: 770-423-6744
> 1000 Chastain Rd. Bldg. 12
> Chemistry Department SC428  Email:   dhurst at kennesaw.edu
> Kennesaw State University         Dow.Hurst at mindspring.com
> Kennesaw, GA 30144
> *****************************************************************
> This message (including any attachments) contains confidential  *
> information intended for a specific individual and purpose,     *
> and is protected by law.  If you are not the intended recipient,*
> you should delete this message and are hereby notified that     *
> any disclosure, copying, or distribution of this message, or    *
> the taking of any action based on it, is strictly prohibited.   *
> *****************************************************************
>
>
>
> --__--__--
>
> Message: 8
> Date: Fri, 23 May 2003 10:01:59 -0400
> From: Christopher Fowler <cfowler at outpostsentinel.com>
> To: ale at ale.org
> Subject: Re: [ale] What technology is used on chat web pages?
> Reply-To: ale at ale.org
>
> On Fri, May 23, 2003 at 09:32:29AM -0400, Geoffrey wrote:
> > Christopher Fowler wrote:
> > >Keep the page lean and set a autorefresh in a metatag
> >
> > That really isn't a reasonable solution, although I've seen it done.  I
> > guess it depends on what your intended use is.
> >
> > But, say I'm on the chat page, entering something, suddenly it
> > refreshes. That's assuming the design is a single window or multiple
> > frames.  Still, you have this distracting refresh.  I think a smarter
> > solution is needed such as a client/server java app.
>
> Correct.  Java would be the best solution for that.  I use BitchX for
> my chatting
>
> >
> > --
> > Until later: Geoffrey		esoteric at 3times25.net
> >
> > The latest, most widespread virus?  Microsoft end user agreement.
> > Think about it...
> >
> > _______________________________________________
> > Ale mailing list
> > Ale at ale.org
> > http://www.ale.org/mailman/listinfo/ale
>
> --__--__--
>
> Message: 9
> Subject: Re: [ale] What technology is used on chat web pages?
> From: Bill Paule <wbpaule at mbtcconsulting.com>
> To: ale at ale.org
> Organization: Smart Web Systems, LLC
> Date: 23 May 2003 10:04:51 -0400
> Reply-To: ale at ale.org
>
> On Fri, 2003-05-23 at 09:32, Geoffrey wrote:
> > Christopher Fowler wrote:
> > > Keep the page lean and set a autorefresh in a metatag
> >
> > That really isn't a reasonable solution, although I've seen it done.  I
> > guess it depends on what your intended use is.
> >
> <snip>
>
> > I think a smarter
> > solution is needed such as a client/server java app.
>
> If you are looking for different client side options I believe Flash may have the capability as well but I am not sure.
>
> --
> Bill Paule <wbpaule at mbtcconsulting.com>
> Smart Web Systems, LLC
>
>
> --__--__--
>
> Message: 10
> Date: Fri, 23 May 2003 10:11:49 -0400
> From: Jason Day <jasonday at worldnet.att.net>
> To: ale at ale.org
> Subject: Re: [ale] no 802.11g for Linux?
> Reply-To: ale at ale.org
>
> On Thu, May 22, 2003 at 07:19:32PM -0400, James P. Kinney III wrote:
> > I would be perfectly happy if the chip makers would write a module, or
> > even a user-space driver. 54Mbps sounds pretty sweet.
>
> Unfortunately, according to this article, the IEEE has decided to
> throttle the maximum throughput of 802.11g to 10-20Mbps.  Saw this on
> Slashdot this morning.
>
> http://www.computerworld.com/mobiletopics/mobile/story/0,10801,81450,00.html?nas=PM-81450
>
> --
> Jason Day                                       jasonday at
> http://jasonday.home.att.net                    worldnet dot att dot net
>
> "Of course I'm paranoid, everyone is trying to kill me."
>     -- Weyoun-6, Star Trek: Deep Space 9
>
> --__--__--
>
> Message: 11
> Date: Fri, 23 May 2003 10:16:42 -0400
> From: Geoffrey <esoteric at 3times25.net>
> To: ale at ale.org
> Subject: Re: [ale] no 802.11g for Linux?
> Reply-To: ale at ale.org
>
> Dow Hurst wrote:
> > We have a Dell Inspiron 8500 I've been configuring for Linux and this
> > was a disappointment when the mini-PCI Broadcom card wasn't recognized.
> > I went searching and found all this stuff out too.  At least the
> > wireless isn't needed when using Linux.  The user will just boot to
> > Windows and collect whatever is needed, reboot to Linux, and then grab
> > the files off the NTFS partition.  We will try the wireless later when
> > someone figures it out.  Some people are just getting a Orinoco Gold
> > WiFi card for $59 and using it instead in their fancy new Dell laptops.
>
> Dow, emperor linux (http://www.emperorlinux.com) sells this same laptop,
> with the following reference to an internal wifi card:
>
> Add internal 802.11b WiFi card: add $200 (prism2, not the Dell 1180)
>
> So I gather you must have gotten the Dell 1180 internal with yours. :(
>
> --
> Until later: Geoffrey		esoteric at 3times25.net
>
> The latest, most widespread virus?  Microsoft end user agreement.
> Think about it...
>
>
> --__--__--
>
> Message: 12
> Date: Fri, 23 May 2003 10:33:19 -0400
> From: Geoffrey <esoteric at 3times25.net>
> To: ale at ale.org
> Subject: Re: [ale] no 802.11g for Linux?
> Reply-To: ale at ale.org
>
> Jason Day wrote:
> > On Thu, May 22, 2003 at 07:19:32PM -0400, James P. Kinney III wrote:
> >
> >>I would be perfectly happy if the chip makers would write a module, or
> >>even a user-space driver. 54Mbps sounds pretty sweet.
> >
> >
> > Unfortunately, according to this article, the IEEE has decided to
> > throttle the maximum throughput of 802.11g to 10-20Mbps.  Saw this on
> > Slashdot this morning.
>
> Just so they're compatible with older technology.  Good thing they
> didn't do this with the car, we'd be traveling at a horses pace...
>
> --
> Until later: Geoffrey		esoteric at 3times25.net
>
> The latest, most widespread virus?  Microsoft end user agreement.
> Think about it...
>
>
> --__--__--
>
> Message: 13
> Date: Fri, 23 May 2003 10:36:40 -0400
> From: Geoffrey <esoteric at 3times25.net>
> To: ALE <ale at ale.org>
> Cc: rcostner at rboc.net
> Subject: [ale] [OT]:  [EFGA] Help!  Web site changes
> Reply-To: ale at ale.org
>
> Any takers on assisting a good organization with this effort?
>
> Robert A. Costner wrote:
> > The EFGA web site format needs to be improved.  Help!
> >
> > In case some of you did not know, I have always claimed I'm not going
> > to write web pages.  I really don't like it.  But for two weeks or
> > so, I've been editing something, particularly in the sumac section,
> > or the front page about every day.
> >
> > If someone wants to make suggestions on colors, fonts, layout, etc,
> > this this would be fine.  In fact, it would be excellent.  Nothing
> > would please me more than to hear how bad it looks and how to fix it.
> >
> >
> > Layout of a web page is just not where my skill sets lie.  If anyone
> > has any suggestions, please email me and let me know.
> >
> > Thanks, -- Robert
> >
> > * To join or be removed from this list, send a message to
> > majordomo at efga.org with the message body of SUBSCRIBE action or
> > UNSUBSCRIBE action
>
>
> --
> Until later: Geoffrey		esoteric at 3times25.net
>
> The latest, most widespread virus?  Microsoft end user agreement.
> Think about it...
>
>
> --__--__--
>
> Message: 14
> From: David Hamm <dhamm at itserve.com>
> To: "'ale at ale.org'" <ale at ale.org>
> Subject: RE: [ale] What technology is used on chat web pages?
> Date: Fri, 23 May 2003 10:52:53 -0400
> Reply-To: ale at ale.org
>
> I found a site called PHP chat.  I know there is a company that sells php
> chat services but www.php-chat.org looks like an open source offering.
>
>
> -----Original Message-----
> From: Bill Paule [mailto:wbpaule at mbtcconsulting.com]
> Sent: Friday, May 23, 2003 10:05 AM
> To: ale at ale.org
> Subject: Re: [ale] What technology is used on chat web pages?
>
>
> On Fri, 2003-05-23 at 09:32, Geoffrey wrote:
> > Christopher Fowler wrote:
> > > Keep the page lean and set a autorefresh in a metatag
> >
> > That really isn't a reasonable solution, although I've seen it done.  I
> > guess it depends on what your intended use is.
> >
> <snip>
>
> > I think a smarter
> > solution is needed such as a client/server java app.
>
> If you are looking for different client side options I believe Flash may
> have the capability as well but I am not sure.
>
> --
> Bill Paule <wbpaule at mbtcconsulting.com>
> Smart Web Systems, LLC
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
>
> --__--__--
>
> Message: 15
> Date: Fri, 23 May 2003 10:04:48 -0500 (CDT)
> From: Dylan Northrup <docx at io.com>
> To: ale at ale.org
> Subject: Re: [ale] What technology is used on chat web pages?
> Reply-To: ale at ale.org
>
> A long time ago, (23.05.03), in a galaxy far, far away, Geoffrey wrote:
>
> :=That really isn't a reasonable solution, although I've seen it done.  I
> :=guess it depends on what your intended use is.
> :=
> :=But, say I'm on the chat page, entering something, suddenly it
> :=refreshes. That's assuming the design is a single window or multiple
> :=frames.  Still, you have this distracting refresh.  I think a smarter
> :=solution is needed such as a client/server java app.
>
> I haven't tried this, but I believe you could have an input frame and an
> output frame; the output frame refreshes ever 15-30-60 seconds or whatever
> interval you like and the input frame only clears when you send text.
>
> I agree, however, that using the Java applet is likely the path of least
> resistance.
>
> --
> Dylan Northrup <*> docx at io.com <*> http://www.io.com/~docx/
> "Harder to work, harder to strive, hard to be glad to be alive, but it's
>  really worth it if you give it a try." -- Cowboy Mouth, 'Easy'
>
>
> --__--__--
>
> Message: 16
> Date: Fri, 23 May 2003 11:24:04 -0400
> From: Tom & JaVonn <pairoftwins at mindspring.com>
> To: Atlanta Linux Enthusiasts <ale at ale.org>
> Subject: [ale] quick, simple backup
> Reply-To: ale at ale.org
>
> All:
>
> Client's Travan tapes are worn.  They back up ONLY 100 MB critical files daily.  They're computer-shy, and just want to point & click.
>
> Shall I recommend:
>
> 1) CD-RW ( cheap media, but has to be blanked prior to write )
>
> 2) Zip 250 ( modest media cost, proprietary )
>
> 3) other ?
>
> Thanks,
>
> Tom
>
> --__--__--
>
> Message: 17
> Date: Fri, 23 May 2003 11:28:43 -0400
> From: "Robert L. Harris" <Robert.L.Harris at rdlg.net>
> To: ale at ale.org
> Subject: Re: [ale] quick, simple backup
> Reply-To: ale at ale.org
>
>
> --huBJOJF9BsF479P6
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
>
>
>
> Personally, I'd say go with the DVD-R/RW.  Easy to scrip thte backups
> and almost as cheap as CD-RW now.
>
> I used Zips in the past and they're great also except for when they
> finally go to 300Megs since it's so convienent.
>
>
> Thus spake Tom & JaVonn (pairoftwins at mindspring.com):
>
> > All:
> >=20
> > Client's Travan tapes are worn.  They back up ONLY 100 MB critical files =
> daily.  They're computer-shy, and just want to point & click.
> >=20
> > Shall I recommend:
> >=20
> > 1) CD-RW ( cheap media, but has to be blanked prior to write )
> >=20
> > 2) Zip 250 ( modest media cost, proprietary )
> >=20
> > 3) other ?
> >=20
> > Thanks,
> >=20
> > Tom
> > _______________________________________________
> > Ale mailing list
> > Ale at ale.org
> > http://www.ale.org/mailman/listinfo/ale
>
> :wq!
> ---------------------------------------------------------------------------
> Robert L. Harris                     | GPG Key ID: E344DA3B
>                                          @ x-hkp://pgp.mit.edu=20
> DISCLAIMER:
>       These are MY OPINIONS ALONE.  I speak for no-one else.
>
> Diagnosis: witzelsucht  =09
>
> IPv6 =3D robert at ipv6.rdlg.net	http://ipv6.rdlg.net
> IPv4 =3D robert at mail.rdlg.net	http://www.rdlg.net
>
> --huBJOJF9BsF479P6
> Content-Type: application/pgp-signature
> Content-Disposition: inline
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.2 (GNU/Linux)
>
> iD8DBQE+zj4r8+1vMONE2jsRAmSUAJ9A0l+etU6BYvbgtkhP0pLo/bqTtACgkBiF
> QyY7lsXqBI4PM3OLH+QYHSM=
> =kGRv
> -----END PGP SIGNATURE-----
>
> --huBJOJF9BsF479P6--
>
>
> --__--__--
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
>
>
> End of Ale Digest
>

_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list