<?php
include("db_connect.php");
$query = "select top 5 * from news order by news_id desc";
$result = mssql_query($query, $db);
 
$i = 0;
while($row = mssql_fetch_row($result)){
            $i++;
            $title = rawurlencode($row[1]);
            $date = rawurlencode($row[2]);
            $headline = rawurlencode($row[3]);
            $full = rawurlencode($row[4]);
            
            $title = str_replace("%DE", "%80", $title);
            $date = str_replace("%DE", "%80", $date);
            $headline = str_replace("%DE", "%80", $headline);
            $full = str_replace("%DE", "%80", $full);
            
            $title = str_replace("%FE", "%81", $title);
            $date = str_replace("%FE", "%81", $date);
            $headline = str_replace("%FE", "%81", $headline);
            $full = str_replace("%FE", "%81", $full);
            
            $title = str_replace("%FD", "%87", $title);
            $date = str_replace("%FD", "%87", $date);
            $headline = str_replace("%FD", "%87", $headline);
            $full = str_replace("%FD", "%87", $full);
            
            $title = str_replace("%DD", "%87", $title);
            $date = str_replace("%DD", "%87", $date);
            $headline = str_replace("%DD", "%87", $headline);
            $full = str_replace("%DD", "%87", $full);
            
            $title = str_replace("%F0", "%9B", $title);
            $date = str_replace("%F0", "%9B", $date);
            $headline = str_replace("%F0", "%9B", $headline);
            $full = str_replace("%F0", "%9B", $full);
            
            $title = str_replace("%D0", "%8B", $title);
            $date = str_replace("%D0", "%8B", $date);
            $headline = str_replace("%D0", "%8B", $headline);
            $full = str_replace("%D0", "%8B", $full);
            
            printf("&title$i=%s&date$i=%s&headline$i=%s&full$i=%s",
$title, $date, $headline, $full);}
 
php?>
 
And it results this: 
 
?>&title1=ewrsdf&date1=21.11.2002&headline1=sfasd%20fsd%20sdfdff&full1=s
df%20sdf%20sdf%20asdfdline$i=%s&full$i=%s", $title, $date, $headline,
$full);} php?> , $full); } php?>
 
Prints out all kinds of stuff, php tags, variable names and stuff, Iĺve
used this script on a LAMP server and no problems.
 
The server is runing PHP V. 4.1.2 on win 2000 CGI version, Any Ideas???
 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to