Hilfe! Kann mir jmd die 6 Zeilen in ASP umschreiben?

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Hilfe! Kann mir jmd die 6 Zeilen in ASP umschreiben?

    Hi ihr lieben ASPler,

    ich habe da ein dringendes Problem!!!
    Ich hab eine Seite in ASP die ich umstylen musste,
    nun muss ich zusätzlich noch einen Dynamischen Head
    aus einer anderen Seite hinzuladen... nun komm ich
    aus der PHP Welt und habe von ASP keine Ahnung...

    Also habe ich es einfach erstmal in PHP gemacht um dann
    leider festzustellen das die beiden, zumindest auf dem
    Server nicht kompatible sind...

    Nun meine Frage und Bitte: Kann mir jemand folgenden
    Script einmal in ASP umschreiben? Am besten mit Erklärung?

    PHP-Code:
    <?
    $content = file_get_contents("http://www.badoeynhausen.de/index.php");
    $content = explode('<body onload="getnewImage();" bgcolor="#FFFFFF">', $content);
    $content = explode('<!--TYPO3SEARCH_begin-->', $content[1]);
    $content = str_replace("/fileadmin/", "fileadmin/", $content[0]);
    $content = str_replace("fileadmin/", "http://www.badoeynhausen.de/fileadmin/", $content);
    echo $content;
    ?>
    Falls sich jmd bereit erklärt: vielen vielen Dank!!!
    Design & Coding with a breeze of madness at xjonx

  • #2
    Hi,

    ich drücke mich um vbs(ich geh mal davon aus, dass du vbs benutzt) wo ich nur kann. Aber das hier könnte dir weiterhelfen.

    vbs-function-ref

    greets
    (((call/cc call/cc) (lambda (x) x)) "Scheme just rocks! and Ruby is magic!")

    Kommentar


    • #3
      das ist ja das schön... ich habe keine Ahnung ws ich benutze.
      Ich weiß nur, das ich gerade ernsthaft versuche ASP schnippsel
      zu finden mit denen ich das PHP übersetzen kann...
      Design & Coding with a breeze of madness at xjonx

      Kommentar


      • #4
        Re: Hilfe! Kann mir jmd die 6 Zeilen in ASP umschreiben?

        PHP-Code:
        $content file_get_contents("http://www.badoeynhausen.de/index.php"); 
        Code:
          Dim objHTTPRequest, strContent, strTemp, strOutput
        
          ' Create an xmlhttp object:
          Set objHTTPRequest = Server.CreateObject("Microsoft.XMLHTTP")
          ' Or, for version 3.0 of XMLHTTP, use:
          ' Set objHTTPRequest = Server.CreateObject("MSXML2.ServerXMLHTTP")
        
          ' Opens the connection to the remote server.
          objHTTPRequest.Open "GET", "http://www.blah.com/", False
        	
          ' Actually Sends the request and returns the data:
          objHTTPRequest.Send
        
          ' save response
          strContent = objHTTPRequest.responseText 
        
          ' destroy object
           set objHTTPRequest = nothing
        PHP-Code:
        $content explode('<body onload="getnewImage();" bgcolor="#FFFFFF">'$content);
        $content explode('<!--TYPO3SEARCH_begin-->'$content[1]); 
        Code:
        strTemp = Split(strContent,"yourDelimiter")
        strContent = Split(strTemp(1),"yourDelimiter")
        PHP-Code:
        $content str_replace("/fileadmin/""fileadmin/"$content[0]);
        $content str_replace("fileadmin/""http://www.badoeynhausen.de/fileadmin/"$content); 
        Code:
        strOutput = Replace(Replace(strContent(0),"find_string","replace_with"),"find_string","replace_with")
        PHP-Code:
        echo $content
        Code:
        Response.Write strOutput
        Zuletzt geändert von asp2php; 07.02.2007, 09:20.

        Kommentar


        • #5
          hey,

          ich sag schon mal danke für die Mühe.
          Hab ich das jetzt so richtig "umgesetzt" ?

          Code:
              '$content = file_get_contents("http://www.badoeynhausen.de/index.php");
              
          Dim objHTTPRequest, strContent, strTemp, strOutput
          
              ' Create an xmlhttp object:
              
          Set objHTTPRequest = Server.CreateObject("Microsoft.XMLHTTP")
          
              ' Or, for version 3.0 of XMLHTTP, use:
              ' Set objHTTPRequest = Server.CreateObject("MSXML2.ServerXMLHTTP")
          
              ' Opens the connection to the remote server.
          objHTTPRequest.Open "GET", "http://www.badoeynhausen.de/index.php", False
          	
              ' Actually Sends the request and returns the data:
              
          objHTTPRequest.Send
          
              ' save response
              
          strContent = objHTTPRequest.responseText 
          
              '$content = explode('<body onload="getnewImage();" bgcolor="#FFFFFF">', $content);
              '$content = explode('<!--TYPO3SEARCH_begin-->', $content[1]);
          
          strTemp = Split(strContent,"yourDelimiter")
          strContent = Split(strTemp(1),"yourDelimiter")
          
              '$content = str_replace("/fileadmin/", "fileadmin/", $content[0]);
              '$content = str_replace("fileadmin/", "http://www.badoeynhausen.de/fileadmin/", $content);
          
          strOutput = Replace(Replace(strContent(0),"/fileadmin/","fileadmin/"),"fileadmin/","http://www.badoeynhausen.de/fileadmin/")
          
              'echo $content;
          
          Response.Write strOutput
          Design & Coding with a breeze of madness at xjonx

          Kommentar

          Lädt...
          X