A while ago I was looking for some information on the book Designing for the Social Web by Joshua Porter. To my surprise, I found that the book itself could be easily gotten for free, because Google search pointed to download links to the e-book. Of course most of anything can be downloaded for free using Torrents, Newsgroups, etc. but I’m not used to seeing Google offering direct links to this kind of content.

The source that stood out most, was the university of Duy Tan University, because it seemed to host not just Joshua’s book, but many others as well. I won’t give out the exact url here, though anyone could easily Google it themselves. Curious to see what kind of books the university was offering for free, I used a short php snippet that would use curl to fetch all e-books of the universities website.

The directories themselves were properly rights managed and gave a 403 error. But as long as I knew the books name, I could access the pdf files directly. And since each book was named simply with a number, this was not a big challenge.


	set_time_limit(999999); 
	for( $i=1; $i<5000; $i++ ){
		getStuff($i);
	}


	function getStuff($i){
		$url  = 'http://elib.dtu.edu.vn/[location-of-the-ebooks]/'.$i.'.pdf';
		$path = $i.'.pdf';

		$fp = fopen($path, 'w');

		$ch = curl_init($url);
		curl_setopt($ch, CURLOPT_FILE, $fp);

		$data = curl_exec($ch);

		curl_close($ch);
		fclose($fp);
	}

Most of the pdf’s turned out to be student scriptures, book reviews and rapports, all written in Vietnamese.

However, about 400 pdf’s were English e-books that the university probably shouldn’t be hosting.

If you happen to speak Vietnamese and decide to let DTU know about the e-books, you can send an email to me@paweldebik.com if you need any information about this.