I purchased a third party software which handles the creation of podcasts!. I did not want to spend the time to modify/hack it into vbulletin so I wrote a simple script that just scrapes the page and gets the contents

The problem that I am having was that I thought all the shows showed up on one page using this URL:

but the shows are incremented and the p= increases, examples:

So I asked a friend of mine, who is an outstanding developer, if there was a way to data mine the page and get all contents of the shows, no matter what the p= value was.

he came back with the following code:

<?php


//This is what Natch said to do and it pulls in just the basics
$everything = 'http://www.sportsrant.com/radio/index.php?d1=shows&p='.$_REQUEST['show'];
$contents = implode ('', file ($everything));
preg_match("/<!-- start -->.*?<!-- stop -->/is", $contents, $results);
//print_r ($results);
echo $results [0];
exit;

?>

he said this would work, but if you go to http://www.sportsrant.com/music.php, it does not get the content, just some of it

What am I doing wrong or can this not be done

TIA
Mike

    i have to assume that this software you bought is simply a front end to a database. likely the "p" in each URL is the primary key value for each record in the db. if so then it would pretty easy to just query the db to grab the data need. does this software reside on your own server? do you have access to the database?

      yes sir It is querying the DB and it is on my server and I do have access to the DB!! I am still new to DB queries and that is why I went this route

        which RDBMS does it use? is it mySQL? when you setup the software you likely had to enter some database connection credentials somewhere. these can be used to wite your own script to connect to the db and then fetch the data you want. i realize that you are new to this but i urge you to take the time to learn this. you will be glad later and you will have a lot more flexibility in how you can search/sort/display the data. the docs for the software probably explain the data structure of the db (table names, field names).

          yes it is from a mysql data and I will write the script, I thought of that earlier and think that is the way to go and you're correct that it is only way to learn this stuff

          Thank you sir for your time

          Mike

            Write a Reply...