Ho raschiato un sito Web utilizzando il semplice parser DOM php:
<?php
include 'domparse.php';
$html = file_get_html('http://oceanofgames.com/rebel-galaxy-free-download/');
foreach($html->find('form[action="http://oceanofgames.com/Cloud-VPS-Download.php"]') as $element)
echo $element;
?>
E ho finito con qualcosa del tipo:
<form action="http://oceanofgames.com/Cloud-VPS-Download.php" target="_blank" method="post">
<input type="hidden" name="filename" value="Rebel_Galaxy.zip" /><br />
<input type="hidden" name="filesize" value="2GB" /><br />
<input type="hidden" name="id" value="85.25.103.44" /></p>
<div align="center">
<input type="image" alt="Download" height="99" src="http://oceanofgames.com/wp-content/uploads/2013/09/button-download.png" width="184" />
</div>
</form>
Devo creare un POST
server sul server usando queste credenziali del modulo usando cURL
e non ho idea di come farlo. Per favore, guidami.
curl --data "filename=Rebel_Galaxy.zip&filesize=2GB&id=85.25" https://example.com/resource