Red de conocimiento informático - Problemas con los teléfonos móviles - VB obtiene el código fuente de la página web (puntuación 50 después del éxito).

VB obtiene el código fuente de la página web (puntuación 50 después del éxito).

La función privada get htmlstr $ (strurl $)' obtiene el código fuente.

Dim XmlHttp

set XmlHttp = CreateObject("Microsoft.XMLHTTP")

XmlHttp. Abra "GET", StrUrl, False

XmlHttp.send

Stime = Now 'Obtener la hora actual.

Y XmlHttp. ReadyState & lt& gtfour

Múltiples actividades

Ntime = Ahora 'Obtener tiempo de ciclo

Si DateDiff("s ", stime, ntime)& gt; htmlstr = "":exit function 'Si se considera que excede los 3 segundos, expirará el tiempo y saldrá del proceso.

Línea

GetHtmlStr = StrConv(XmlHttp. Responsebody, vbUnicode)

Establecer XmlHttp = Ninguno

Finalizar función