Source code viewer in HTML

591
.

Guys i have written a script for viewing website html code and it was working normal when i created but not working when i slightly modify it, pleases fix if you can

.

Here

Прикрепленные файлы:
.
Onatolich

If I understand right, you need something like this:

$source = $_POST['source'];
if(preg_match('#http:\/\/(.*)#ui'))
echo htmlspecialchars(file_get_contents($source));

.
Koenig
(\/)____o_O____(\/)
# Onatolich (10.08.2014 / 01:07)
If I understand right, you need something like this:

$source = $_POST['source'];
if(preg_match('#http:\/\/(.*)#ui'))
echo htmlspecialchars(file_get_contents($source));
you can use nl2br()
Всего: 4