get('http://32b5oz2bbtn6gqj3.onion/index.php/Main_Page'); $images = $client->images(); $iterator = $images->getIterator(); while($iterator->valid()) { /* * $iterator->current(); is an array of * $result['fqd'] fully qualified domain uri - example.onion/path/filename.image * $result['src'] = the image src element, could be fqd or just /path/filename.image * $result['raw'] = the raw image data * $result['base64'] = base64 encoded raw data - file_put_contents(base64_decode(base64), file.image); * $result['html'] = the html of the page the image was retrieved from. */ /* foreach($iterator->current() as $key => $value) { file_put_contents(__DIR__ . '/images/' . pathinfo($value['src'], PATHINFO_FILENAME) . '.' . pathinfo($value['src'], PATHINFO_EXTENSION), $value['raw']); } $iterator->next(); } */ /*$client->get('http://4sy6ebszykvcv2n6.onion/'); $images = $client->images(); $html = $client->getHtml(); dump($html); */ //dump($resource); $j = stream_get_contents($resource); fclose($resource); dump($j); /* $iterator = $images->getIterator(); while($iterator->valid()) { foreach($iterator->current() as $key => $value) { file_put_contents(__DIR__ . '/images/' . pathinfo($value['src'], PATHINFO_FILENAME) . '.' . pathinfo($value['src'], PATHINFO_EXTENSION), $value['raw']); } $iterator->next(); } $testArray = [ 'fqd' => null, 'src' => null, 'alt' => null, 'base64' => null, 'html' => null ]; $image = new \Sikofitt\Element\Image('https://www.google.com/file/robots.txt', $testArray); dump($image); //$images = $client->images(); //dump($images); //$client->get('https://de.indymedia.org/index.shtml'); //foreach($images as $image) { //$image = new \Doctrine\Common\Collections\ArrayCollection(); // dump($image); //} //dump($result); */