strSQL = "SELECT * FROM erotik where kategori = '" & Request.Querystring("mode") & "'" set rs = conn.execute(strSQL)
' Array med URL'er, som skal chekkes Do While Not rs.EOF arrURLS = arrURLS & "," & rs("link") arrIDS = arrIDS & "," & rs("ID") rs.MoveNext Loop arrURLS = Split(arrURLS,",") arrIDS = Split(arrIDS,",")
' Array med HTTP header koder arrHTTPcode = Array("100", "101", "200", "201", "202", "203", "204", "205", "206", "300", "301", "302", "303", "304", "305", "307", "400", "401", "402", "403", "404", "405", "406", "407", "408", "409", "410", "411", "412", "413", "414", "415", "416", "417", "500", "501", "502", "503", "504", "505") ' Array med HTTP header kodernes forklaringer arrHTTPtext = Array("Continue", "Switching Protocols", "OK", "Created", "Accepted", "Non-Authoritative Information", "No Content", "Reset Content", "Partial Content", "Multiple Choices", "Moved Permanently", "Found", "See Other", "Not Modified", "Use Proxy", "Temporary Redirect", "Bad Request", "Unauthorized", "Payment Required", "Forbidden", "Not Found", "Method Not Allowed", "Not Acceptable", "Proxy Authentication Required", "Request Time-out", "Conflict", "Gone", "Length Required", "Precondition Failed", "Request Entity Too Large", "Request-URI Too Large", "Unsupported Media Type", "Requested range not satisfiable", "Expectation Failed", "Internal Server Error", "Not Implemented", "Bad Gateway", "Service Unavailable", "Gateway Time-out", "HTTP Version not supported") ' Gennemløb Array med URL'er For intURL = 0 to Ubound(arrURLS) Set HttpObj = Server.CreateObject("AspHTTP.Conn") HTTPObj.Url = arrURLS(intURL) HTTPObj.GetURL
For intCode = 0 to Ubound(arrHTTPcode) If Instr(HttpObj.Response,arrHTTPcode(intCode)) Then strResponse = arrHTTPtext(intCode) Exit For End if Next If strResponse <> "OK" Then Response.Write "<p>" & arrIDS(intURL) & " - " & arrURLS(intURL) & " - " & strResponse & "</p>" End If strResponse = "" Next %>
men den giver fejlen: invalid url i linie 26 som er:
I dette særtema ser vi på, hvordan cloud og AI bliver fundamentet for virksomhedernes digitale forretning, og hvordan de nye muligheder for automatisering og forretningsværdi kan udnyttes uden at miste overblik, sikkerhed og menneskelig kontrol.
Dim arrHTTPtext ' Array med HTTP header kodernes forklaringer arrHTTPtext = Array("Continue", "Switching Protocols", "OK", "Created", "Accepted", "Non-Authoritative Information", "No Content", "Reset Content", "Partial Content", "Multiple Choices", "Moved Permanently", "Found", "See Other", "Not Modified", "Use Proxy", "Temporary Redirect", "Bad Request", "Unauthorized", "Payment Required", "Forbidden", "Not Found", "Method Not Allowed", "Not Acceptable", "Proxy Authentication Required", "Request Time-out", "Conflict", "Gone", "Length Required", "Precondition Failed", "Request Entity Too Large", "Request-URI Too Large", "Unsupported Media Type", "Requested range not satisfiable", "Expectation Failed", "Internal Server Error", "Not Implemented", "Bad Gateway", "Service Unavailable", "Gateway Time-out", "HTTP Version not supported")
Dim intURL ' Gennemløb Array med URL'er For intURL = 0 to Ubound(arrURLS)
Dim httpObj Set HttpObj = Server.CreateObject("AspHTTP.Conn") HttpObj.Url = arrURLS(intURL) HttpObj.GetURL
For intCode = 0 to Ubound(arrHTTPcode) If Instr(HttpObj.Response,arrHTTPcode(intCode)) Then strResponse = arrHTTPtext(intCode) Exit For End if Next If strResponse <> "OK" Then Response.Write "<p>" & arrIDS(intURL) & " - " & arrURLS(intURL) & " - " & strResponse & "</p>" End If strResponse = "" Next %>
Dim arrHTTPtext ' Array med HTTP header kodernes forklaringer arrHTTPtext = Array("Continue", "Switching Protocols", "OK", "Created", "Accepted", "Non-Authoritative Information", "No Content", "Reset Content", "Partial Content", "Multiple Choices", "Moved Permanently", "Found", "See Other", "Not Modified", "Use Proxy", "Temporary Redirect", "Bad Request", "Unauthorized", "Payment Required", "Forbidden", "Not Found", "Method Not Allowed", "Not Acceptable", "Proxy Authentication Required", "Request Time-out", "Conflict", "Gone", "Length Required", "Precondition Failed", "Request Entity Too Large", "Request-URI Too Large", "Unsupported Media Type", "Requested range not satisfiable", "Expectation Failed", "Internal Server Error", "Not Implemented", "Bad Gateway", "Service Unavailable", "Gateway Time-out", "HTTP Version not supported")
Dim intURL ' Gennemløb Array med URL'er For intURL = 0 to Ubound(arrURLS)
Dim httpObj Set HttpObj = Server.CreateObject("AspHTTP.Conn") HttpObj.Url = arrURLS(intURL) HttpObj.GetURL
For intCode = 0 to Ubound(arrHTTPcode) If Instr(HttpObj.Response,arrHTTPcode(intCode)) Then strResponse = arrHTTPtext(intCode) Exit For End if Next If strResponse <> "OK" Then Response.Write "<p>" & arrIDS(intURL) & " - " & arrURLS(intURL) & " - " & strResponse & "</p>" End If strResponse = "" Next %>
Du forsøger at udskrive arrayet. Du skal udskrive elementerne i arrayet:
dim i For i = 0 to Ubound(arrURLS) Response.Write "" & i & ": " & arrURLS(i) & "<br>" Next
--------------- Jeg tror nu jeg ved hvad der er galt. Når du splitter arrURLS gemmer du resultatet i arrURLS. Før splitning er arrURLS en streng og efter splitning er det et array. arrURLS kan ikke pludselig skifte type. Omdøb derfor enten strengen eller arrayet.
Synes godt om
Slettet bruger
28. august 2002 - 11:41#11
fandt aldrig det specifikke problem men tak for hjælpen
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.