/    Sign up×
Community /Pin to ProfileBookmark

Hello Friends..I am not familiar with PHP so much thats why i am bugging you.
I want to make indexer using [U]form[/U]. It has to accept .htm and .html files or actual folder names. If the input received is a folder, find all the .htm and .html inside that folder and use the indexer on those files. I need to traverse the entire directory structure rooted at the path provided as a parameter and index every .htm and .html file . I need to display all the information of the files i.e. all .htm and .html files and display the full path of each file is indexed. The information display contains metatags and the word count. Thanks.

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@cridleyOct 24.2007 — look up opendir() and readdir()
[CODE]
function IterateDir($path)
{
$handle = opendir($path);

while (false !== ($file = readdir($handle))) {
//split $file to get the extension then do whatever you want with the file
// use is_dir($file) to check whether it's a dir, if so then recursively call this function to iterate through the entire tree structure
}
}[/CODE]


Obviously this allows to open directories on the server machine, not the client.
Copy linkTweet thisAlerts:
@madristaaauthorOct 25.2007 — i did it..but i am not able to do it..can u expalin me properly..as after wards i have to find the meta information and word count
×

Success!

Help @madristaa spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...