Computer Hope

Internet & Networking => Web design => Topic started by: Al968 on September 26, 2009, 07:47:17 PM

Title: PHP Scrapper
Post by: Al968 on September 26, 2009, 07:47:17 PM
Hello,

I am new to this forum and also relativly new to PHP and I am trying to make a scrapper that would extract and show on my website the following :

Code: [Select]
<td>&nbsp;</td><td>Version</td><td>Date</td></tr>
<tr><th><a href="http://www.avast.com/fre/updates.html">VPS</a></th><td>090926-0</td><td><a href="http://www.avast.com/fre/vps_history.html">26.9.2009</a></td></tr>
<tr><td id="box_dotted_line" colspan="3">&nbsp;</td></tr>
<tr><th>Pro</th><td>4.8.1356</td><td><a href="http://www.avast.com/fre/avast-4-home_pro-revision-history.html">25.9.2009</a></td></tr>
<tr><th>Server</th><td>4.8.1091</td><td><a class="a_lang_ENG" href="http://www.avast.com/fre/avast-4-server-revision-history.html">13.5.2009</a></td></tr>
<tr><th>ADNM</th><td>4.8.975</td><td><a class="a_lang_ENG" href="http://www.avast.com/fre/adnm-revision-history.html" title="ADNM - Revision history">13.5.2009</a></td>

In order to acheive that I have found this article that describes what I am trying to do : http://www.hiteshagrawal.com/php/html-scrapper-in-php (http://www.hiteshagrawal.com/php/html-scrapper-in-php)

However I can't seem to get what I want, can anyone please out to me how I should go about in order to acheive this ?

Thanks

Al968
Title: Re: PHP Scrapper
Post by: kpac on September 27, 2009, 04:18:52 AM
Quote
However I can't seem to get what I want, can anyone please out to me how I should go about in order to acheive this ?
What have you tried doing?

Is this on your computer, or is it online?
Title: Re: PHP Scrapper
Post by: Al968 on September 27, 2009, 06:50:29 AM
I tried to include the table which the information I need is in use include'the site's adress\filename'  but that didn't work, sorry I should have pointed out that I would like to put the php script on my website (hence online)

Al968
Title: Re: PHP Scrapper
Post by: kpac on September 27, 2009, 08:06:23 AM
Quote
I tried to include the table which the information I need is in use include'the site's adress\filename'  but that didn't work,
Sorry, I don't understand. Have you got any code already?

Quote
I would like to put the php script on my website (hence online)
Okay, but are you testing it on your PC?
Title: Re: PHP Scrapper
Post by: Al968 on September 27, 2009, 08:33:37 AM
In order to test it I upload the file each time to my web server
Unfortunatly no I don't have anymore code as I think I deleted it after seeing that it didn't work (I know that was stupid of me), but anyhow would the article I spotted be able to do that or would you recommand an other method ?

Thanks

Al968
Title: Re: PHP Scrapper
Post by: kpac on September 27, 2009, 09:32:20 AM
That article you read would do the trick. You need to make sure your Webhost has CURL installed and configured on the server, though. That might be one of the reasons it didn't work for you. I'm sure if you ask them, they'll be able to tell you.