0

So i'm trying to make a script that reads from forum last post first word and displays it on my site
vBulletin forum
http://www.forum.com/showthread.php?85788&goto=newpost

it uses javascript, so I can't get any info :S
My script so far

<?php
header("content-type: text/plain");

$myurl = 'http://www.forum.com/showthread.php?85788&goto=newpost';

$curl_handle = curl_init();
curl_setopt ($curl_handle, CURLOPT_URL, $myurl);
curl_setopt ($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($curl_handle, CURLOPT_CONNECTTIMEOUT, 1);
$buffer = curl_exec($curl_handle);

curl_close($curl_handle);   
echo $buffer;
?>
4
Contributors
5
Replies
7
Views
5 Years
Discussion Span
Last Post by mschroeder
0

HI,

You should HTML DOM Parser.. search on it on google..and you can parse the target page as simple as

echo file_get_html($myurl)->plaintext; 

Of course, you can do a more advance filtering. It all depends on what items you want to scrape.

0

you will need to find the http request javascript uses to pull the post, though i'm wondering if i should help or not

0

It would be much easier to answer this if there was a link to the actual content you were trying to scrape. Else we can provide only theoretical answers that won't do you much good in the practical application.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.