Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // http://atelier801.com/section?f=7&s=1&s_d=&t_d=&p=4
- $forumID = $_GET['f'];
- $sectionID = $_GET['s'];
- $topicID = $_GET['t'];
- $pageNum = (array_key_exists('p', $_GET)) ? $_GET['p'] : 0;
- while(true){
- $url = 'http://atelier801.com/section';
- $url .= '?f=' . $forumID;
- $url .= '&s=' . $sectionID;
- $url .= ($pageNum != null) ? '&p=' . $pageNum : '';
- $page = file_get_contents($url);
- $regex= '/<a class="nombre-messages([^\"]*)" href="topic\?f=' . $forumID . '&t=' . $topicID . '([^\"]*)">([^<]*)<\/a>/i';
- if(preg_match($regex, $page, $matches))
- {
- //var_dump($matches);
- echo $matches[3];
- break;
- }else{
- $pageNum = $pageNum + 1;
- }
- if($pageNum==70){
- echo '-1';
- break;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement