Php auf nicht php server ...

Seite 1 von 1 - Forum: Coding Stuff auf overclockers.at

URL: https://www.overclockers.at/coding-stuff/php_auf_nicht_php_server_111334/page_1 - zur Vollversion wechseln!


alex128 schrieb am 06.04.2004 um 18:59

hallo !

ich möchte dieses php script : http://ebay.homegrow.org/picrota/pic.php

in eine htm einbinden welche aber auf einem nicht php server liegt .

meine frage ist es möglich den php code auf einem 2ten server aus zu starten und das ergebnis im browser anzeigen lassen dessen seite von einem nicht php server kommt .
konfuzius .ich weiß . .

der code einer funktionierenden html lösung währe hilfreich .


funka schrieb am 06.04.2004 um 18:59

in dem fall

Code: PHP
<img src="http://ebay.homegrow.org/picrota/pic.php"> 
fertig


alex128 schrieb am 06.04.2004 um 19:04

das sollt dann ja lokal am rechner auch gehen ( ohne web svr ) tuts aber nicht ..

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<img src="http://ebay.homegrow.org/picrota/pic.php">
</body>
</html>


moidaschl schrieb am 06.04.2004 um 19:09

Zitat von funka
in dem fall
Code: PHP
<img src="http://ebay.homegrow.org/picrota/pic.php"> 
fertig

nur so aus interesse:
wie kann eine .php datei als bild eingebunden / angesprochen werden?


alex128 schrieb am 06.04.2004 um 19:16

das ist der php scour kommt von einem freud , gibts dafür auch eine rein html lösung =

<html>

<head>
<title></title>
</head>

<body>

<?php

$open=opendir('pics');
while ($file = readdir ($open)) {
if ($file != "." && $file != "..") {
$filearray[]=$file;
}
}
closedir($open);
$anz=count($filearray)-1;

$rand=mt_rand("0","$anz");

echo "<img src=\"pics/$filearray[$rand]\">";

?>

</body>

</html>


funka schrieb am 06.04.2004 um 19:40

achso sorry dachte es wird nur das bild ausgegeben
er sollte statt dem folgendes versuchen
(nur das bild ausgeben)

Code: PHP
header("Content-Length: ".filesize($file)."\n");
header("Content-type: hierpassendermimetypevermutlich image/jpeg\n");
fpassthru($file);exit;


alex128 schrieb am 06.04.2004 um 19:54

na jetzt steh ich komplett daneben .

meine php kentnisse sind glei null .

zum php welches ich postete : es wird ja auch nur ein bild ausgegeben ( von zur zeit ca 20 ) - mehr brauch das script nicht zu können .

beim obrigen script spielt es aber keine rolle ob format : gif jpeg png


dio schrieb am 06.04.2004 um 19:54

g0t frames? <iframe src="http://location/pfad/zur/datei.php">


alex128 schrieb am 06.04.2004 um 19:59

Zitat von diokletian
g0t frames? <iframe src="http://location/pfad/zur/datei.php">



das funkt

danke !

http://members.chello.at/ebay.ebay/pictest.htm




overclockers.at v4.thecommunity
© all rights reserved by overclockers.at 2000-2026