Create XML Files from Directory Scan
$100-200 USD
Pagado a la entrega
I need to create a script that will help me figure out which images are no longer in use on my webserver. The concept is that I can choose a directory, and the script will scan through all files that end in (.html,.php,.css) and look for files that end in .[url removed, login to view]). It will then create some XML files based on the result.
## Deliverables
I need to create a script that will help me figure out which images are no longer in use on my webserver. The concept is that I can choose a directory, and the script will scan through all files that end in (.html,.php,.css) and look for files that end in .[url removed, login to view]). It will then create some XML files based on the result. The form you would fill out to do this is below:
Page 1:
Generate report
<form>
Page Types to Scan: <input type="text" name="extensions" value=".txt,.html,.htm,.php, .css">
<br />
Images Types to Look For: <input type="text" name="ImageExtensions" value=".gif,.png,.jpg">
<br />
Start Scan Folder: <input type="text" name="scan directory" value="/users/home/web/">
<br />
Web Root: <input type="text" name="scan directory" value="/users/home/web/">
<br />
Base URL: <input type="text" name="scan directory" value="[url removed, login to view]">
<br />
Include all Subdirectories: <input type="checkbox" name="SubDirs" value="Y">
<br />
<input type="submit">
</form>
When submitted, this would create 3 xml files. 1 that lists all images referenced from inside of a file, something like this:
FILE 1: Image Reference inside of Files
<image>
<name>[url removed, login to view]</name>
<size>1233</size>
<lastmodified>12/12/2008</lastmodified>
<path>/users/home/web/images/</path>
<webpath>[url removed, login to view]</webpath>
<file>[url removed, login to view]</file>
<filepath>/</filepath>
<fileurl>[url removed, login to view]</fileurl>
</image>
And then an XML file that details all the images found in the file system, like this:
File 2: Images in folders
<file>
<name>[url removed, login to view]</name>
<size>1233</size>
<lastmodified>12/12/2008</lastmodified>
<path>/users/home/web/images/</path>
<webpath>[url removed, login to view]</webpath>
</file>
And then an XML file that lists all the images that are on the server, but not referenced inside of a file
File 3: Images in Folders, that are NOT referenced inside of Files.
<file>
<name>[url removed, login to view]</name>
<size>1233</size>
<lastmodified>12/12/2008</lastmodified>
<path>/users/home/web/images/</path>
<webpath>[url removed, login to view]</webpath>
</file>
Nº del proyecto: #3198825