Salta al contenuto
  • CATEGORIES
  • La Community Connect.gt
  • Presentati alla Community
  • News Ufficiali da Connect.gt
  • Internet News
  • A Scuola Di
  • Digital Marketing
  • Intelligenza Artificiale
  • SEO & GEO
  • Web Marketing e Content
  • Google Analytics e Web Analytics
  • Google Ads & Advertising
  • YouTube
  • TikTok, Instagram e altri Social
  • Google Adsense, Affiliazioni e Guadagno
  • E-Commerce
  • Coding e Sistemistica
  • Help Center: consigli per il tuo progetto
  • Hosting e Cloud
  • Coding
  • CMS & Piattaforme Self-Hosted
  • Annunci e Collaborazioni
  • Annunci Vendita e Acquisto: Pubblicità, Domini, Link e altro
  • Collaborazioni WEB e Lavoro: offro e cerco
  • Impresa, Fisco e Leggi
  • Consulenza Legale e Professioni Web
  • Consulenza Fiscale, Imprese, Startup e P.Iva
  • Gli Off Topic
  • PC, Smartphone e altri Hardware
  • Tutti i Software
  • GT Fetish Cafè
  • Discussioni
  • 0 Non letti 0
  • Recenti
  • Hashtag
  • Popolare
  • Utenti
  • Privacy
  • Termini e condizioni
  • © 2026 Search On Media Group S.r.l.
Collassa
Connect.gt
Il network Search On
Connect.gt WMF AI Festival Accademia Advanced SEO Tool AgentCy Social Media Strategies Search Tech
Registrati Accedi
Connect.gt
Stream Interest Categorie Hashtag
  1. La community italiana di SEO, marketing digitale e AI
  2. Categorie
  3. Coding e Sistemistica
  4. Coding
  5. connettersi ad un file RSS remoto

connettersi ad un file RSS remoto

Pianificato Fissato Bloccato Spostato Coding
4 Post 2 Autori 2.8k Visualizzazioni 1 Seguito
  • Da Vecchi a Nuovi
  • Da Nuovi a Vecchi
  • Più Voti
Rispondi
  • Risposta alla discussione
Effettua l'accesso per rispondere
Questa discussione è stata eliminata. Solo gli utenti con diritti di gestione possono vederla.
  • E
    E
    eliane
    scritto su ultima modifica di
    User Attivo 0
    #1
    connettersi ad un file RSS remoto

    Cari amici, ho un piccolo problema

    Sono riuscita a trovare dove posso recuperare prezzo del euro in diverse monete

    solo che non riesco a leggere una parte del file xml
    il codice è questo

    <%
    rssURL =[URL]http://www.bankofcanada.ca/databank/client_output/7833.xml[/URL]
    'Creo l'oggetto DOM XML
    Set objXML = Server.CreateObject("msxml2.DOMDocument.3.0")
    'Imposto le proprietà dell'oggetto
    objXML.async = false
    objXML.setProperty "ServerHTTPRequest", True
    objXML.validateOnParse =false
    objXML.preserveWhiteSpace = false
    'Carico il file RSS dalla URL
    rssFile = objXML.Load(rssURL)
     
    'Se ci sono errori stampo a video
    If Not rssFile Then
    Response.write "ERRORE..."
    'Se NON ci sono errori proseguo...
    Else
    'Recupero i dati dai nodi Item (e sotto nodi)
    Set objNodeList = objXML.getElementsByTagName("Currency_name") 
     
     For Each objNode In objNodeList
    For Each objNode2 In objNode.childNodes
     
    Select Case objNode2.nodeName
     
     
     
    Case "Observation_data"
    strv1 = objNode2.firstChild.nodevalue
    Case "Observation_data"
    strv2 = objNode2.firstChild.nodevalue
    Case "Observation_data"
    strv3 = objNode2.firstChild.nodevalue
    End Select
    Next
    Response.write strv1&" - "&strv2&" - "&strv3&"<br>"
     
     'azzero tutto per il prossimo passaggio
    strv1 = ""
    strv2 = ""
    strv3 = ""
    'end if
    Next
    %>
    

    in questo script vorrei recuperare la cifra che è su strv2 o strv3
    il problema è che ci sono tre targe Observation_data uguale
    Aiutto!:x

    1 Risposta Ultima Risposta
    Miglior risposta 0
    0
    • L
      L
      legolas
      Moderatore
      scritto su ultima modifica di
      User Attivo 5
      #2

      Ciao, non riesco a visualizzare il file xml controlla l'url.
      Nel frattempo ti suggerisco di dare un'occhiata anche a questo file che utilizzo anche io nelle mie applicazioni ed è abbastanza semplice da leggere.

      http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml

      1 Risposta Ultima Risposta
      Miglior risposta 0
      0
      • E
        E
        eliane
        scritto su ultima modifica di
        User Attivo 0
        #3

        Ciao Legolas

        Grazie, ma quello che ho bisogno è il cambio valuta che se aggiorna di alcuni paese di Sud America

        Ho trovato risposta per quello script che ho messo
        il membro che se chiama KOLOSSEO
        del sito html ha risolto
        ecco la soluzione:

        <%
        dim arrObservation(3)dim indexArrayObservation rssURL ="http://www.bankofcanada.ca/databank/client_output/7833.xml"Set objXML = Server.CreateObject("msxml2.DOMDocument.3.0")objXML.async = falseobjXML.setProperty "ServerHTTPRequest", TrueobjXML.validateOnParse =falseobjXML.preserveWhiteSpace = falserssFile = objXML.Load(rssURL)If Not rssFile Then             Response.write "ERRORE..."Else    Set objNodeList = objXML.getElementsByTagName("Currency_name")     For Each objNode In objNodeList        For Each objNode2 In objNode.childNodes            if objNode2.nodeName="Observation_data" then               arrObservation(indexArrayObservation)=objNode2.firstChild.nodevalue               if indexArrayObservation<2 then                   indexArrayObservation=indexArrayObservation+1               end if            end if        Next        Response.write arrObservation(1) & " - " & arrObservation(2) & "<br>"        indexArrayObservation=0     Nextend if
        %>
        

        ma solo che il file http://www.bankofcanada.ca/databank/client_output/7833.xml me sembra che ha un tempo di scadenza,
        prima funzionava ma adesso non funziona più
        ho presso qui: http://www.bankofcanada.ca/en/rates/exchform.html

        allora ho cambiato sistema e prendo dai files cvs di yahoo in questo modo:

        <%
        url="[URL]http://it.old.finance.yahoo.com/d/quotes.csv?s=EURUSD=X&f=sl1d1t1c1ohgv&e=.csv[/URL]" 'Dollaro USA
        Set xml = Server.CreateObject("Microsoft.XMLHTTP")
         xml.Open "GET", url, False
         xml.Send
         stringa=xml.responseText
        set xml = nothing
        'a questo punto nella variabile STRINGA abbiamo il contenuto del file indicato nell'url
         
        ARR=SPLIT(stringa,":") 'spezza la colonna
        for i=0 to ubound(arr)
         arr2=split(arr(i),";") 'spezza la riga
          for j=0 to ubound(arr2)
           if (i=0 and j=1) then 
           'abbiamo trovato il B1 (i=0,j=1 è l'indice di B1)
         
            EURUSD=arr2(j)
            'ora possiamo anche uscire dal for (che ce frega..)
            exit for
           end if
          next
        next
        'response.Write(EURUSD&"<br>")
        ''''''''''''''''''''''''''''''''''
        url2="[URL]http://it.old.finance.yahoo.com/d/quotes.csv?s=EURBRL=X&f=sl1d1t1c1ohgv&e=.csv[/URL]" 'Brasile - Real
        Set xmlBRL = Server.CreateObject("Microsoft.XMLHTTP")
         xmlBRL.Open "GET", url2, False
         xmlBRL.Send
         stringaBRL=xmlBRL.responseText
        set xmlBRL = nothing
        'a questo punto nella variabile STRINGA abbiamo il contenuto del file indicato nell'url
         
        ARRBRL=SPLIT(stringaBRL,":") 'spezza la colonna
        for iBRL=0 to ubound(arrBRL)
         arr2BRL=split(arrBRL(iBRL),";") 'spezza la riga
          for jBRL=0 to ubound(arr2BRL)
           if (iBRL=0 and jBRL=1) then 
           'abbiamo trovato il B1 (i=0,j=1 è l'indice di B1)
         
            EURBRL=arr2BRL(jBRL)
            'ora possiamo anche uscire dal for (che ce frega..)
            exit for
           end if
          next
        next
        'response.Write(EURBRL&"<br>")
        '''''''''''''''
        url3="[URL]http://it.old.finance.yahoo.com/d/quotes.csv?s=EURCUP=X&f=sl1d1t1ba&e=.csv[/URL]" ' Colombia - Peso
        Set xmlCOP = Server.CreateObject("Microsoft.XMLHTTP")
         xmlCOP.Open "GET", url3, False
         xmlCOP.Send
         stringaCOP=xmlCOP.responseText
        set xmlCOP = nothing
        'a questo punto nella variabile STRINGA abbiamo il contenuto del file indicato nell'url
         
        ARRCOP=SPLIT(stringaCOP,":") 'spezza la colonna
        for iCOP=0 to ubound(arrCOP)
         arr2COP=split(arrCOP(iCOP),";") 'spezza la riga
          for jCOP=0 to ubound(arr2COP)
           if (iCOP=0 and jCOP=1) then 
           'abbiamo trovato il B1 (i=0,j=1 è l'indice di B1)
         
            EURCOP=arr2COP(jCOP)
            'ora possiamo anche uscire dal for (che ce frega..)
            exit for
           end if
          next
        next
        'response.Write(EURCOP&"<br>")
        '''''''''''''''''''''''''''''''''''''
        url4="[URL]http://it.old.finance.yahoo.com/d/quotes.csv?s=EURPEN=X&f=sl1d1t1ba&e=.csv[/URL]" 'Perù - Sol
        Set xmlPEN = Server.CreateObject("Microsoft.XMLHTTP")
         xmlPEN.Open "GET", url4, False
         xmlPEN.Send
         stringaPEN=xmlPEN.responseText
        set xmlPEN = nothing
        'a questo punto nella variabile STRINGA abbiamo il contenuto del file indicato nell'url
         
        ARRPEN=SPLIT(stringaPEN,":") 'spezza la colonna
        for iPEN=0 to ubound(arrPEN)
         arr2PEN=split(arrPEN(iPEN),";") 'spezza la riga
          for jPEN=0 to ubound(arr2PEN)
           if (iPEN=0 and jPEN=1) then 
           'abbiamo trovato il B1 (i=0,j=1 è l'indice di B1)
         
            EURPEN=arr2PEN(jPEN)
            'ora possiamo anche uscire dal for (che ce frega..)
            exit for
           end if
          next
        next
        'response.Write(EURPEN&"<br>")
        '''''''''''''''''''''''''''''''''''''
        url5="[URL="http://it.old.finance.yahoo.com/d/quotes.csv?s=EURVEB=X&f=sl1d1t1ba&e=.csv&quot;'Venezuela"]http://it.old.finance.yahoo.com/d/quotes.csv?s=EURVEB=X&f=sl1d1t1ba&e=.csv"'Venezuela[/URL] - Bolivar
        Set xmlVEB = Server.CreateObject("Microsoft.XMLHTTP")
         xmlVEB.Open "GET", url5, False
         xmlVEB.Send
         stringaVEB=xmlVEB.responseText
        set xmlVEB = nothing
        'a questo punto nella variabile STRINGA abbiamo il contenuto del file indicato nell'url
         
        ARRVEB=SPLIT(stringaVEB,":") 'spezza la colonna
        for iVEB=0 to ubound(arrVEB)
         arr2VEB=split(arrVEB(iVEB),";") 'spezza la riga
          for jVEB=0 to ubound(arr2VEB)
           if (iVEB=0 and jVEB=1) then 
           'abbiamo trovato il B1 (i=0,j=1 è l'indice di B1)
         
            EURVEB=arr2VEB(jVEB)
            'ora possiamo anche uscire dal for (che ce frega..)
            exit for
           end if
          next
        next
        'response.Write(EURVEB&"<br>")
         
        '''''''''''''''''''''''
        url6="[URL]http://it.old.finance.yahoo.com/d/quotes.csv?s=EURARS=X&f=sl1d1t1ba&e=.csv[/URL]" 'Argentina - Peso
        Set xmlARS = Server.CreateObject("Microsoft.XMLHTTP")
         xmlARS.Open "GET", url6, False
         xmlARS.Send
         stringaARS=xmlARS.responseText
        set xmlARS = nothing
        'a questo punto nella variabile STRINGA abbiamo il contenuto del file indicato nell'url
         
        ARRARS=SPLIT(stringaARS,":") 'spezza la colonna
        for iARS=0 to ubound(arrARS)
         arr2ARS=split(arrARS(iARS),";") 'spezza la riga
          for jARS=0 to ubound(arr2ARS)
           if (iARS=0 and jARS=1) then 
           'abbiamo trovato il B1 (i=0,j=1 è l'indice di B1)
         
            EURARS=arr2ARS(jARS)
            'ora possiamo anche uscire dal for (che ce frega..)
            exit for
           end if
          next
        next
        'response.Write(EURARS&"<br>")
         
         
        %>
        

        in verità sono una frana ,
        Forse se potrebbe fare un codice meglio di quello che ho fatto.

        Del modo che ho fatto funziona ma ancora sto provando se i files cvs di yahoo aggiona o non.
        gli prendo qui: http://it.finance.yahoo.com/valuta/convert?amt=1&from=EUR&to=VEB&submit=Converti

        1 Risposta Ultima Risposta
        Miglior risposta 0
        0
        • E
          E
          eliane
          scritto su ultima modifica di
          User Attivo 0
          #4

          Si, me sembra che i files csv di yahoo sono ben aggiornati!

          1 Risposta Ultima Risposta
          Miglior risposta 0
          0

          Ciao! Sembra che tu sia interessato a questa conversazione, ma non hai ancora un account.

          Stanco di dover scorrere gli stessi post a ogni visita? Quando registri un account, tornerai sempre esattamente dove eri rimasto e potrai scegliere di essere avvisato delle nuove risposte (tramite email o notifica push). Potrai anche salvare segnalibri e votare i post per mostrare il tuo apprezzamento agli altri membri della comunità.

          Con il tuo contributo, questo post potrebbe essere ancora migliore 💗

          Registrati Accedi
          Rispondi
          • Risposta alla discussione
          Effettua l'accesso per rispondere
          • Da Vecchi a Nuovi
          • Da Nuovi a Vecchi
          • Più Voti


          • Accedi

          • Non hai un account? Registrati

          • Accedi o registrati per effettuare la ricerca.
          • Primo post
            Ultimo post
          Home Accedi Registrati
          Menu
          • CATEGORIES
          • La Community Connect.gt
          • Presentati alla Community
          • News Ufficiali da Connect.gt
          • Internet News
          • A Scuola Di
          • Digital Marketing
          • Intelligenza Artificiale
          • SEO & GEO
          • Web Marketing e Content
          • Google Analytics e Web Analytics
          • Google Ads & Advertising
          • YouTube
          • TikTok, Instagram e altri Social
          • Google Adsense, Affiliazioni e Guadagno
          • E-Commerce
          • Coding e Sistemistica
          • Help Center: consigli per il tuo progetto
          • Hosting e Cloud
          • Coding
          • CMS & Piattaforme Self-Hosted
          • Annunci e Collaborazioni
          • Annunci Vendita e Acquisto: Pubblicità, Domini, Link e altro
          • Collaborazioni WEB e Lavoro: offro e cerco
          • Impresa, Fisco e Leggi
          • Consulenza Legale e Professioni Web
          • Consulenza Fiscale, Imprese, Startup e P.Iva
          • Gli Off Topic
          • PC, Smartphone e altri Hardware
          • Tutti i Software
          • GT Fetish Cafè
          • Discussioni
          • Non letti 0
          • Recenti
          • Hashtag
          • Popolare
          • Utenti
          • Privacy
          • Termini e condizioni
          • © 2026 Search On Media Group S.r.l.