Skip to content

Instantly share code, notes, and snippets.

'從網址取得要查詢的ISBN
Dim isbn As String = Request.QueryString("isbn")
'宣告webclient物件
Dim webClient1 As New System.Net.WebClient
'將isbn送到博客來查詢,並讀取網頁原始碼到result中
dim result as String = webClient1.DownloadString("https://search.books.com.tw/search/query/key/" & isbn)
'找出書籍封面的網址位置
dim PicUrl as String = result.Substring(result.IndexOf("https://im1.book.com.tw"), result.IndexOf("&", result.IndexOf("https://im1.book.com.tw")) - result.IndexOf("https://im1.book.com.tw"))
//you need to connect to wifi first
void wifisendfile()
{
String host="xxx.xxx.xxx.xxx";//your host name or ip
//prepare httpclient
Serial.println("Starting connection to server...");
Serial.println(host);
WiFiClient client;