Ben die webfilters op school zo wel zo'n beetje spuugzat
. So let's work the way around. Daarom ben ik nog een beetje aan het klooien geweest met php. Het was al een beetje aan de late kant dus verwacht niet te veel van deze code. Ik ga hier morgen een goed werkend script van bouwen.
Zie (half werkende brainstorm) code :
GEEF GEEN COMMENTAAR OVER DE CODE (die's bagger) ALEEN OVER HET IDEE.
Nog suggesties?
Zie (half werkende brainstorm) code :
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
| <?
if (strpos(strtolower($url), "gif")!=0) {
header('Content-Type: image/gif');
}
if (strpos(strtolower($url), "jpg")!=0) {
header('Content-Type: image/pjpeg');
}
if (strpos(strtolower($url), "jpeg")!=0) {
header('Content-Type: image/pjpeg');
}
$CurPath = substr($url,0, strrpos($url, '/'));
$FileLoc = 'http://sikkes.xs4all.nl/http.php?url=';
$fp = fopen ($url, "r");
if (!$fp) {
print "404 Pagina niet gevonden :-(";
} else {
while (!feof($fp)) {
$Buffer = fgets($fp,128);
$Content="$Content$Buffer";
}
}
fclose($fp);
# $Content = str_replace($CurPath , $FileLoc, $Content);
# $Content = str_replace('src="/' , 'src="' . $FileLoc, $Content);
$Content = str_replace('http://' ,$FileLoc . '%blaatert%://', $Content);
$Content = str_replace('"/' , '"' . $FileLoc . $CurPath . '/', $Content);
$Content = str_replace('%blaatert%://' , 'http://', $Content);
print $Content;
?> |
GEEF GEEN COMMENTAAR OVER DE CODE (die's bagger) ALEEN OVER HET IDEE.
Nog suggesties?