Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $cookiefile = "cookies.txt";
- $parseUrl = "http://cp.rpg-city.de/";
- $parse = curl_init();
- curl_setopt($parse, CURLOPT_URL, $parseUrl);
- //curl_setopt($parse, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($parse, CURLOPT_HEADER, 1);
- curl_setopt($parse, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($parse, CURLOPT_COOKIEJAR, $cookiefile);
- curl_setopt($parse, CURLOPT_COOKIEFILE, $cookiefile);
- curl_setopt($parse, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($parse, CURLOPT_SSL_VERIFYHOST, false);
- $parseResponse = curl_exec($parse);
- curl_close($parse);
- $dom = new DOMDocument();
- libxml_use_internal_errors(true);
- $dom->loadHTML($parseResponse);
- $content = $dom->getElementById("contentPageContent");
- if (!is_null($content)) {
- $tables = $content->childNodes;
- echo $content->nodeValue . "<br>";
- $skillsTable = $tables->item(8)->childNodes;
- echo $tables->item(8)->nodeValue . "<br>";
- $skills = $skillsTable->item(1)->childNodes;
- echo $skillsTable->item(1)->nodeValue . "<br>";
- $skillRow = $skills->item(0)->childNodes;
- $skill = split(" ", str_replace("(", "", $skillRow->item(2)->nodeValue));
- echo "Skill: " . $skill[0];
- echo "<br>";
- echo "Exp: " . $skill[1];
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement