wcf.regNote.message

versteht man dann wenigstens 
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
<?
$data = "";
$bild = fopen("http://www.example.com","r");
if($bild) {
stream_set_timeout($bild, 2);
$data = "";
$status = socket_get_status($bild);
while(!feof($bild) && !$status['timed_out']) {
$data .= fgets($bild, 1000);
$status = socket_get_status($bild);
}
if ( $status['timed_out'] ) return false;
fclose($bild);
} else return false;
echo $data;
?>
|


Quoted
// Microbanner //
$count=1;
$cb_microbannerbit.="<tr>";
$microbanner=$db->unbuffered_query("SELECT * FROM bb".$n."_microbanner WHERE active = '1'");
while($microbannerfound=$db->fetch_array($microbanner))
{
// Timeout wenn Bilder nicht auf gehen //
$data = "";
$bild = fopen($microbannerfount['banner'],"r");
if($bild)
{
stream_set_timeout($bild, 2);
$data = "";
$status = socket_get_status($bild);
while(!feof($bild) && !$status['timed_out'])
{
$data .= fgets($bild, 1000);
$status = socket_get_status($bild);
}
if ( $status['timed_out'] ) $data = "http://www.coder-board.info/images/spacer.gif";
fclose($bild);
} else {
$data = "http://www.coder-board.info/images/spacer.gif";
}
// Timeout wenn Bilder nicht auf gehen //
$count++;
$cb_microbannerbit .= "<td align=\"center\" class=\"tablea\" width=\"10%\"><span class=\"smallfont\">";
eval ("\$cb_microbannerbit .= \"".$tpl->get("cb_microbannerbit")."\";");
$cb_microbannerbit .= "</span></td>";
if($count==11)
{
$cb_microbannerbit.="</tr><tr>";
$count=1;
}
}
if($count<11)
{
while($count<11)
{
$count++;
$cb_microbannerbit.="<td class=\"tablea\"> </td>";
}
}
$cb_microbannerbit.="</tr>";
// Microbanner //
Quoted
<a href="$microbannerfound[link]" target="_blank">$microbannerfound[titel]<br /><img src="$data" width="88" height="31" border="0" alt=""></a>
|
|
Source code |
1 |
$data = fgets($bild, filesize($bild)); |
|
|
Source code |
1 2 3 4 5 6 |
if ( $status['timed_out'] )
$data = "http://www.coder-board.info/images/spacer.gif";
fclose($bild);
} else {
$data = "http://www.coder-board.info/images/spacer.gif";
}
|
Quoted
if ( $status['timed_out'] ) $data = "http://www.coder-board.info/images/spacer.gif";
fclose($bild);
Quoted
// Timeout wenn Bilder nicht auf gehen //
$data = "";
if(file_exists($microbannerfound['banner']))
{
$bild = fopen($microbannerfound['banner'],"r");
} else {
$bild = "";
}
if($bild)
{
stream_set_timeout($bild, 20000000);
$data = "";
$status = socket_get_status($bild);
while(!feof($bild) && !$status['timed_out'])
{
$data .= fgets($bild, 1024);
$status = socket_get_status($bild);
}
if ( $status['timed_out'] )
{
$data = "http://www.coder-board.info/images/spacer.gif";
} else {
$data = $microbannerfound['banner'];
}
fclose($bild);
} else {
$data = "http://www.coder-board.info/images/logo.jpg";
}
// Timeout wenn Bilder nicht auf gehen //
Quoted
if(file_exists($microbannerfound['banner']))
Quoted
file_exists
(PHP 3, PHP 4 )
file_exists -- Checks whether a file exists
Description
bool file_exists ( string filename)
Returns TRUE if the file specified by filename exists; FALSE otherwise.
This function will not work on remote files; the file to be examined must be accessible via the server's filesystem.
The results of this function are cached. See clearstatcache() for more details.
On windows use "//computername/share/filename" or "\\\\computername\share\filename" to check files on network shares.
Quoted
stream_set_timeout($bild, 20000000);

Quoted
socket_set_timeout
(PHP 4 )
socket_set_timeout -- Set timeout period on a socket
Description
bool socket_set_timeout ( int socket descriptor, int seconds, int microseconds)
Sets the timeout value on socket descriptor, expressed in the sum of seconds and microseconds.
This post has been edited 1 times, last edit by "braindead" (May 3rd 2004, 8:14am)
|
|
Source code |
1 |
[URL]http://www.coder-board.info/sponsoren/bilder/loadbild.php?pfad=http://www.example.com/pics/sponsor.jpg[/URL] |
....
|
|
Source code |
1 |
<img src="coder-board.info/LoadBild.php?sponsorbild=www.sponsor.de/images/bild.jpg"> |



|
|
PHP Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
<?
$data = "";
$bild = fopen($loadimg,"r");
if($bild)
{
stream_set_timeout($bild, 2);
$data = "";
$status = socket_get_status($bild);
while(!feof($bild) && !$status['timed_out'])
{
$data .= fgets($bild, 1000);
$status = socket_get_status($bild);
}
if ( $status['timed_out'] )
{
/* $data = "";
$ersatzbild = fopen("http://www.coder-board.info/images/spacer.gif","r");
while(!feof($ersatzbild))
{
data .= fgets($ersatzbild,1000);
}
fclose($ersatzbild); */ return false;
}
fclose($bild);
} else {
/* $data = "";
$ersatzbild = fopen("http://www.coder-board.info/images/spacer.gif","r");
while(!feof($ersatzbild))
{
data .= fgets($ersatzbild,1000);
}
fclose($ersatzbild); */ return false;
}
echo $data;
?>
|
|
|
PHP Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
// Microbanner //
$count=1;
$cb_microbannerbit.="<tr>";
$microbanner=$db->unbuffered_query("SELECT * FROM bb".$n."_microbanner WHERE active = '1'");
while($microbannerfound=$db->fetch_array($microbanner))
{
$cb_microbannerbit .= "<td align=\"center\" class=\"tablea\" width=\"10%\"><span class=\"smallfont\">";
eval ("\$cb_microbannerbit .= \"".$tpl->get("cb_microbannerbit")."\";");
$cb_microbannerbit .= "</span></td>";
if($count==10)
{
$cb_microbannerbit.="</tr><tr>";
$count=1;
} else {
$count++;
}
}
if($count<11)
{
while($count<11)
{
$count++;
$cb_microbannerbit.="<td class=\"tablea\"> </td>";
}
}
$cb_microbannerbit.="</tr>";
// Microbanner //
|
|
|
PHP Source code |
1 |
<a href="$microbannerfound[link]" target="_blank">$microbannerfound[titel]<br /><img src="microbanner.php?loadimg=$microbannerfound[banner]" width="88" height="31" border="0" alt=""></a>
|


|
|
PHP Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
$loadimg_ext = "jpg";
$bildformate = Array("jpg" => Array("0" => "FF", "1" => "D8", "2" => "FF", "-2" => "FF", "-1" => "D9"),
"gif" => Array("0" => "47", "1" => "49", "2" => "46", "-2" => "00", "-1" => "3B")
);
$error = false;
foreach($bildformate[$loadimg_ext] as $key => $val) {
if($key < 0 && $data[strlen($data) + $key] != sprintf("%c", hexdec($val))) {
$error = true;
break;
}
if($key >= 0 && $data[$key] != sprintf("%c", hexdec($val))) {
$error = true;
break;
}
}
if(!$error) { echo $data; }
else { echo $data_ersatz; }
|


[EDIT]sollte mit dem sprintf in den If's gegessen sein
[/EDIT] 