21-07-2005, 17:05
|
|
|
|
חבר מתאריך: 04.10.04
הודעות: 442
|
|
בניית סקריפט מוגבל בזמן
שלום,
יש לי סקריפט פעיל ותקין שתפקידו ללכת למיקום מסויים באינטרנט
לקרוא משם קובץ HTML מוגדר מראש, ואח"כ להציג אותו בדף שלי.
הקוד:
קוד:
some ASP or HTML code
<%
'changes ascii chars to unicode to deal with hebrew
Function AsciiToUnicode(ByRef pstrAscii)
For llngIndex = 1 To LenB(pstrAscii)
lstrUnicode = lstrUnicode & Chr(AscB(MidB(pstrAscii, llngIndex,1)))
Next
AsciiToUnicode = lstrUnicode
End function
Response.Buffer = True
Dim objXMLHTTP, xml
' Create an xmlhttp object:
Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")
' Opens the connection to the remote server.
xml.Open "GET", " location/file.html", False
' Actually Sends the request and returns the data:
xml.Send
Dim mystr : mystr = AsciiToUnicode(xml.ResponseBody)
Set xml = Nothing
Response.Write mystr
%>
some ASP or HTML code
אני זקוק ל"עטיפה" לסקריפט זה, כך שהוא יעבוד X זמן, נניח 5 שניות, ואז, גם אם הוא לא הספיק
לפתוח את הדף המרוחק ולקרוא אותו הוא יצא, וימשיך לטעון את שאר ה HTML/ASP המקומי.
אשמח לעזרה,
תודה.
|