FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Help with script that retrieve remote files
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Help with script that retrieve remote files [message #176399] Fri, 30 December 2011 15:29 Go to next message
Dianakc is currently offline  Dianakc
Messages: 1
Registered: December 2011
Karma: 0
Junior Member
Hello,

I know very little about programming, even so I was able to use PHP
Simple DOM for open a file and outputs a new xml file. I'm trying to
create a WordPress xml import script for a specific local service that
doesn't offer any content export. The script must open all remote
files (after some service config) and output a new xml file for
download.

I already have the working script but need help on:

* Open all remote .htm files with the prefix 'arch'

Right now the script works greatly on parsing a single static/remote
local htm file and output a new xml file, but can't figure out how to
open prefix-based files.

Thanks for any help
Re: Help with script that retrieve remote files [message #176400 is a reply to message #176399] Fri, 30 December 2011 15:47 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 12/30/2011 10:29 AM, Dianakc wrote:
> Hello,
>
> I know very little about programming, even so I was able to use PHP
> Simple DOM for open a file and outputs a new xml file. I'm trying to
> create a WordPress xml import script for a specific local service that
> doesn't offer any content export. The script must open all remote
> files (after some service config) and output a new xml file for
> download.
>
> I already have the working script but need help on:
>
> * Open all remote .htm files with the prefix 'arch'
>
> Right now the script works greatly on parsing a single static/remote
> local htm file and output a new xml file, but can't figure out how to
> open prefix-based files.
>
> Thanks for any help
>
>

You will need a way to list the files, i.e. with (s)ftp. HTTP protocol
has no provisions for wildcards in URI names.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Help with script that retrieve remote files [message #176401 is a reply to message #176399] Fri, 30 December 2011 16:07 Go to previous message
richard is currently offline  richard   
Messages: 213
Registered: June 2013
Karma: 0
Senior Member
On Fri, 30 Dec 2011 07:29:14 -0800 (PST), Dianakc wrote:

> Hello,
>
> I know very little about programming, even so I was able to use PHP
> Simple DOM for open a file and outputs a new xml file. I'm trying to
> create a WordPress xml import script for a specific local service that
> doesn't offer any content export. The script must open all remote
> files (after some service config) and output a new xml file for
> download.
>
> I already have the working script but need help on:
>
> * Open all remote .htm files with the prefix 'arch'
>
> Right now the script works greatly on parsing a single static/remote
> local htm file and output a new xml file, but can't figure out how to
> open prefix-based files.
>
> Thanks for any help

I trust these files are all on YOUR domain.
As there are legal issues for accessing files you are not entitled to.

One way might be to read the file directory, parse the filename and see if
it contains "arch".

e.g.
thisdomain.com/folder/folder/archive.html
parse to "archive.html".
Does filename contain "arch"? if yes then open.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: filtering profanity and obscene language - a list?
Next Topic: BB type posting - is this secure?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 05:18:52 GMT 2024

Total time taken to generate the page: 0.02203 seconds