Warnung: file_put_contents(/home/www/web1/html/php_dev/test.txt) [function.file-put-contents]: failed to open stream: Permission denied in /home/www/web1/html/php_dev/sys/lib.activity.php (Zeile 58)
Hilfe! Kann mir jmd die 6 Zeilen in ASP umschreiben? [Archiv] - PHP-Scripte PHP-Tutorials PHP-Jobs und vieles mehr
ebiz-webhosting
- Ad -
php-resource




Archiv verlassen und diese Seite im Standarddesign anzeigen :
Hilfe! Kann mir jmd die 6 Zeilen in ASP umschreiben?


 
xJonx
07-02-2007, 10:35 
 
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?

<?
$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!!!

 
closure
07-02-2007, 10:49 
 
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 (http://www.w3schools.com/vbscript/vbscript_ref_functions.asp)

greets

 
xJonx
07-02-2007, 10:57 
 
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...

 
asp2php
07-02-2007, 11:18 
 
$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.blah.com/", False

' Actually Sends the request and returns the data:
objHTTPRequest.Send

' save response
strContent = objHTTPRequest.responseText

' destroy object
set objHTTPRequest = nothing


$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),"find_string","replace_with"),"find_string","replace_with")


echo $content;


Response.Write strOutput

 
xJonx
07-02-2007, 11:24 
 
hey,

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

'$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


Alle Zeitangaben in WEZ +2. Es ist jetzt 06:46 Uhr.