Forum Moderators: coopster

Message Too Old, No Replies

search bot?

         

kumarsena

3:38 pm on Feb 16, 2005 (gmt 0)

10+ Year Member



hey guys,

just wondering if it is possible usnig php to say keep track of updates on several sites at once but only media file updates(videos audios- all legal :)) im not sure if this has anything to do with php, but worth a try. the problem is such:

i want to set up a website that keep traks off free audio video on other sites. but it would be very mush work doing this manually....so is php the way to go? any pointers would be appreciated,.

thanks
kumar

mcibor

10:02 am on Feb 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If the server allows to download those files, then php is an ideal solution for you. What you should do is download the desired directory and make links to the appropriate files. You can use database to store the info about files (i don't know how to connect to ODBC, but it's possible as well).

However if the files on those sites are only available through html it would be quite hard to do that, but possible.

I don't know of any links with such things. Have you tried searching here?

Best regards
Michal Cibor

kumarsena

3:26 pm on Feb 18, 2005 (gmt 0)

10+ Year Member



hi

thanks for the reply,

yes, the files are all available for download.

the problem for me is that i dont know where to start, but i am still loking for guides tutorials etc...

thnks

kumarsena

3:55 pm on Feb 18, 2005 (gmt 0)

10+ Year Member



what if i get the urls of the folders where the soundfiles are kept and then make a search function that crawls these givens urls upon my request and updates a database?

mcibor

10:13 pm on Feb 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think that easier would be to create the function that goes through all files, compares them with db, and if they aren't in database write them to it.

I can't find the exact php code that crawls through the files, but can search for it if you want (I have it on the other computer, the broken one:). Just remember, that you need to filter out any other files exept the desired ones.

In the db I would keep the exact name of the file, path to it, type, description, id of course (one for every file, I wouldn't divide them to different types, however it can be done. Or... maybe it's not such a bad idea to keep music, video, text and graphic apart. You have to decide!).

BTW do you use an outside program for managing the db? Eg phpmyadmin? If not, then you'll need to write a code (with root login) that is able to correct the database.

mcibor

10:14 pm on Feb 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I would do sth like:

<?PHP
//here safe login

if($logged === TRUE)
{
$query = stripslashes($_POST["query"]);
$ask = mysql_query($query) or die(mysql_error());
if(mysql_num_rows($ask))
{
while($ans = mysql_fetch_array($ask, MYSQL_BOTH))
{
//here print out the results if there are any
}
}
}
?>

I found the search folder code at [phpfreaks.com...]

Hope this helps!
Best regards
Michal Cibor

PS. Sorry for splitting this message, but I couldn't post it as one

kumarsena

11:08 pm on Feb 18, 2005 (gmt 0)

10+ Year Member



hey

great! thnx a lot! well the search function is failry straight forward i think, but the problem arises on how to fetch the info from the remote site. i will only deal with mp3 files (all legal :)) but i need to know the artist and album and other details related to these files. searching a folder will give me the file names with the .mp3 extension. but how do i get the rest of the info? i have sent u a url...

hakre

8:11 am on Feb 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



looks like gpl and looks like it has everything build in concering mp3: [coolmp3.sourceforge.net...]

h**p://px.skalar.com/ seems to be offline, there were a lot of code snippets directly related to id3 tags of mp3 files. you should find more on the net by searching for php and id3-tags (they contain song metainformation).

mcibor

8:01 pm on Feb 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There's some script on cddb at

[hotscripts.com...]

Hope that helps. I don't have much knowledge about the cddb library, but there's sth like [freedb.org...] which is free (as the name shows).

Best wishes
Michal Cibor

PS I won't be able to come here for 3 weeks, so have patience, or just start a new thread: how to cddb :)

Bye!