function getLinksList() { $djDevsLink = new DjinniDeveloper(); $links = $djDevsLink->getData(); $applicants = $links->find('.clearfix'); foreach ($applicants as $applicant) { $this->count++; if ($this->count <= 5) { $applicant = $links->find('.clearfix', $this->count - 1); $path = $applicant->find('.profile', 0)->href; $link = 'http://djinni.co'; $this->developers['link'] = $link .= $path; var_dump('<br>Count = ' . $this->count . '<br>', $this->developers, '<br><br>'); } } }
<?php $res = new DjinniDeveloper(); $rev = new DjinniDevelopersParser(); $links = $rev->getLinksList(); print_r($links); // $tobd = $res->getLink(); // echo $res->link; for ($i = 0; $i < 3; $i++) { $devs = $res->getDevelopersInfo($i); print_r($devs); # code... }