php-general Digest 17 Dec 2005 12:45:55 -0000 Issue 3855

Topics (messages 227564 through 227574):

Re: Weird html - No "real" <cr>
        227564 by: Gustav Wiberg
        227565 by: Brady Mitchell
        227573 by: Gustav Wiberg

Re: Help with the copy command...
        227566 by: adriano ghezzi

Re: Blocking Values From an External Source
        227567 by: Matt Stone

Re: Can anyone recommend a hosting company
        227568 by: Jose Miguel
        227569 by: Ray Hauge

setcookie doesn't save session properly
        227570 by: nhiemenz.digipen.edu
        227571 by: comex

Re: Binary Config file: Protect script(s): Powered-by logo: How to?
        227572 by: Michael Hulse

PHP visual programming example
        227574 by: Edward Patel

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
Hi

Yes, but I assume that

echo "<hr>Kontroll rad i textfil:$rowsInTextFile av $totalRowsInTextFile<br>";

would render a <newline> ?

/G

----- Original Message ----- From: <[EMAIL PROTECTED]>
To: "Gustav Wiberg" <[EMAIL PROTECTED]>
Sent: Saturday, December 17, 2005 12:15 AM
Subject: Re: [PHP] Weird html - No "real" <cr>


[assuming i understand your question correctly] a <cr> or other type
of (operating system) newline is not a rendered value in html. you
need to use an html <BR>, or <P> (or put the text within an html
<PRE> block) to get the rendered html to have new lines.




------------ Original Message ------------
Date: Saturday, December 17, 2005 12:03:02 AM +0100
From: Gustav Wiberg <[EMAIL PROTECTED]>
To: PHP General <[email protected]>
Subject: [PHP] Weird html - No "real" <cr>

Hi there!

Why do I get this kind of ... why don't <cr> work? There is now
<newline> as when you view source in an ordinary html-file... I
hope you guys understand what I mean...


DOWN BELOW IS THE PHP CODE! :-)



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


<b>PCB</b><br><b>AUTOMATISK</B> INFOGNING AV PRODUKTER SOM INTE
FINNS I VP's
databas!<br><hr>Loggfil=logfiles/pcb_autoinsert.txt<br>Rader i
databas=354<br><hr>Kontroll rad i textfil:1 av 1881<br><hr>Kontroll
rad i textfil:2 av 1881<br><b>.</b><hr>Kontroll rad i textfil:3 av
1881<br><b>.</b><hr>Kontroll rad i textfil:4 av
1881<br><b>.</b><hr>Kontroll rad i textfil:5 av
1881<br><b>.</b><hr>Kontroll rad i textfil:6 av
1881<br><b>.</b><hr>Kontroll rad i textfil:7 av
1881<br><b>.</b><hr>Kontroll rad i textfil:8 av
1881<br><b>.</b><hr>Kontroll rad i textfil:9 av
1881<br><b>.</b><hr>Kontroll rad i textfil:10 av
1881<br><b>.</b><hr>Kontroll rad i textfil:11 av
1881<br><b>.</b><hr>Kontroll rad i textfil:12 av
1881<br><b>.</b><hr>Kontroll rad i textfil:13 av
1881<br><b>.</b><hr>Kontroll rad i textfil:14 av
1881<br><b>.</b><hr>Kontroll rad i textfil:15 av
1881<br><b>.</b><hr>Kontroll rad i textfil:16 av
1881<br><b>.</b><hr>Kontroll rad i textfil:17 av
1881<br><b>.</b><hr>Kontroll rad i textfil:18 av
1881<br><b>.</b><hr>Kontroll rad i textfil:19 av
1881<br><b>.</b><hr>Kontroll rad i textfil:20 av
1881<br><b>.</b><hr>Kontroll rad i textfil:21 av
1881<br><b>.</b><hr>Kontroll rad i textfil:22 av
1881<br><b>.</b><hr>Kontroll rad i textfil:23 av
1881<br><b>.</b><hr>Kontroll rad i textfil:24 av
1881<br><b>.</b><hr>Kontroll rad i textfil:25 av
1881<br><b>.</b><hr>Kontroll rad i textfil:26 av
1881<br><b>.</b><hr>Kontroll rad i textfil:27 av
1881<br><b>.</b><hr>Kontroll rad i textfil:28 av
1881<br><b>.</b><hr>Kontroll rad i textfil:29 av
1881<br><b>.</b><hr>Kontroll rad i textfil:30 av
1881<br><b>.</b><hr>Kontroll rad i textfil:31 av
1881<br><b>.</b><hr>Kontroll rad i textfil:32 av
1881<br><b>.</b><hr>Kontroll rad i textfil:33 av
1881<br><b>.</b><hr>Kontroll rad i textfil:34 av
1881<br><b>.</b><hr>Kontroll rad i textfil:35 av
1881<br><b>.</b><hr>Kontroll rad i textfil:36 av
1881<br><b>.</b><hr>Kontroll rad i textfil:37 av
1881<br><b>.</b><hr>Kontroll rad i textfil:38 av
1881<br><b>.</b><hr>Kontroll rad i textfil:39 av
1881<br><b>.</b><hr>Kontroll rad i textfil:40 av
1881<br><b>.</b><hr>Kontroll rad i textfil:41 av
1881<br><b>.</b><hr>Kontroll rad i textfil:42 av
1881<br><b>.</b><hr>Kontroll rad i textfil:43 av
1881<br><b>.</b><hr>Kontroll rad i textfil:44 av
1881<br><b>.</b><hr>Kontroll rad i textfil:45 av
1881<br><b>.</b><hr>Kontroll rad i textfil:46 av
1881<br><b>.</b><hr>Kontroll rad i textfil:47 av
1881<br><b>.</b><hr>Kontroll rad i textfil:48 av
1881<br><b>.</b><hr>Kontroll rad i textfil:49 av
1881<br><b>.</b><hr>Kontroll rad i textfil:50 av
1881<br><b>.</b><hr>Kontroll rad i textfil:51 av
1881<br><b>.</b><hr>Kontroll rad i textfil:52 av
1881<br><b>.</b><hr>Kontroll rad i textfil:53 av
1881<br><b>.</b><hr>Kontroll rad i textfil:54 av
1881<br><b>.</b><hr>Kontroll rad i textfil:55 av
1881<br><b>.</b><hr>Kontroll rad i textfil:56 av
1881<br><b>.</b><hr>Kontroll rad i textfil:57 av
1881<br><b>.</b><hr>Kontroll rad i textfil:58 av
1881<br><b>.</b><hr>Kontroll rad i textfil:59 av
1881<br><b>.</b><hr>Kontroll rad i textfil:60 av
1881<br><b>.</b><hr>Kontroll rad i textfil:61 av
1881<br><b>.</b><hr>Kontroll rad i textfil:62 av
1881<br><b>.</b><hr>Kontroll rad i textfil:63 av
1881<br><b>.</b><hr>Kontroll rad i textfil:64 av
1881<br><b>.</b><hr>Kontroll rad i textfil:65 av
1881<br><b>.</b><hr>Kontroll rad i textfil:66 av
1881<br><b>.</b><hr>Kontroll rad i textfil:67 av
1881<br><b>.</b><hr>Kontroll rad i textfil:68 av
1881<br><b>.</b><hr>Kontroll rad i textfil:69 av
1881<br><b>.</b><hr>Kontroll rad i textfil:70 av
1881<br><b>.</b><hr>Kontroll rad i textfil:71 av
1881<br><b>.</b><hr>Kontroll rad i textfil:72 av
1881<br><b>.</b><hr>Kontroll rad i textfil:73 av
1881<br><b>.</b><hr>Kontroll rad i textfil:74 av
1881<br><b>.</b><hr>Kontroll rad i textfil:75 av
1881<br><b>.</b><hr>Kontroll rad i textfil:76 av
1881<br><b>.</b><hr>Kontroll rad i textfil:77 av
1881<br><b>.</b><hr>Kontroll rad i textfil:78 av
1881<br><b>.</b><hr>Kontroll rad i textfil:79 av
1881<br><b>.</b><hr>Kontroll rad i textfil:80 av
1881<br><b>.</b><hr>Kontroll rad i textfil:81 av
1881<br><b>.</b><hr>Kontroll rad i textfil:82 av
1881<br><b>.</b><hr>Kontroll rad i textfil:83 av
1881<br><b>.</b><hr>Kontroll rad i textfil:84 av
1881<br><b>.</b><hr>Kontroll rad i textfil:85 av
1881<br><b>.</b><hr>Kontroll rad i textfil:86 av
1881<br><b>.</b><hr>Kontroll rad i textfil:87 av
1881<br><b>.</b><hr>Kontroll rad i textfil:88 av
1881<br><b>.</b><hr>Kontroll rad i textfil:89 av
1881<br><b>.</b><hr>Kontroll rad i textfil:90 av
1881<br><b>.</b><hr>Kontroll rad i textfil:91 av
1881<br><b>.</b><hr>Kontroll rad i textfil:92 av
1881<br><b>.</b><hr>Kontroll rad i textfil:93 av
1881<br><b>.</b><hr>Kontroll rad i textfil:94 av
1881<br><b>.</b><hr>Kontroll rad i textfil:95 av
1881<br><b>.</b><hr>Kontroll rad i textfil:96 av
1881<br><b>.</b><hr>Kontroll rad i textfil:97 av
1881<br><b>.</b><hr>Kontroll rad i textfil:98 av
1881<br><b>.</b><hr>Kontroll rad i textfil:99 av
1881<br><b>.</b><hr>Kontroll rad i textfil:100 av
1881<br><b>.</b><hr>Kontroll rad i textfil:101 av
1881<br><b>.</b><hr>Kontroll rad i textfil:102 av
1881<br><b>.</b><hr>Kontroll rad i textfil:103 av
1881<br><b>.</b><hr>Kontroll rad i textfil:104 av
1881<br><b>.</b><hr>Kontroll rad i textfil:105 av
1881<br><b>.</b><hr>Kontroll rad i textfil:106 av
1881<br><b>.</b><hr>Kontroll rad i textfil:107 av
1881<br><b>.</b><hr>Kontroll rad i textfil:108 av
1881<br><b>.</b><hr>Kontroll rad i textfil:109 av
1881<br><b>.</b><hr>Kontroll rad i textfil:110 av
1881<br><b>.</b><hr>Kontroll rad i textfil:111 av
1881<br><b>.</b><hr>Kontroll rad i textfil:112 av
1881<br><b>.</b><hr>Kontroll rad i textfil:113 av
1881<br><b>.</b><hr>Kontroll rad i textfil:114 av
1881<br><b>.</b><hr>Kontroll rad i textfil:115 av
1881<br><b>.</b><hr>Kontroll rad i textfil:116 av
1881<br><b>.</b><hr>Kontroll rad i textfil:117 av
1881<br><b>.</b><hr>Kontroll rad i textfil:118 av
1881<br><b>.</b><hr>Kontroll rad i textfil:119 av
1881<br><b>.</b><hr>Kontroll rad i textfil:120 av
1881<br><b>.</b><hr>Kontroll rad i textfil:121 av
1881<br><b>.</b><hr>Kontroll rad i textfil:122 av
1881<br><b>.</b><hr>Kontroll rad i textfil:123 av
1881<br><b>.</b><hr>Kontroll rad i textfil:124 av
1881<br><b>.</b><hr>Kontroll rad i textfil:125 av
1881<br><b>.</b><hr>Kontroll rad i textfil:126 av
1881<br><b>.</b><hr>Kontroll rad i textfil:127 av
1881<br><b>.</b><hr>Kontroll rad i textfil:128 av
1881<br><b>.</b><hr>Kontroll rad i textfil:129 av
1881<br><b>.</b><hr>Kontroll rad i textfil:130 av
1881<br><b>.</b><hr>Kontroll rad i textfil:131 av
1881<br><b>.</b><hr>Kontroll rad i textfil:132 av
1881<br><b>.</b><hr>Kontroll rad i textfil:133 av
1881<br><b>.</b><hr>Kontroll rad i textfil:134 av
1881<br><b>.</b><hr>Kontroll rad i textfil:135 av
1881<br><b>.</b><hr>Kontroll rad i textfil:136 av
1881<br><b>.</b><hr>Kontroll rad i textfil:137 av
1881<br><b>.</b><hr>Kontroll rad i textfil:138 av
1881<br><b>.</b><hr>Kontroll rad i textfil:139 av
1881<br><b>.</b><hr>Kontroll rad i textfil:140 av
1881<br><b>.</b><hr>Kontroll rad i textfil:141 av
1881<br><b>.</b><hr>Kontroll rad i textfil:142 av
1881<br><b>.</b><hr>Kontroll rad i textfil:143 av
1881<br><b>.</b><hr>Kontroll rad i textfil:144 av
1881<br><b>.</b><hr>Kontroll rad i textfil:145 av
1881<br><b>.</b><hr>Kontroll rad i textfil:146 av
1881<br><b>.</b><hr>Kontroll rad i textfil:147 av
1881<br><b>.</b><hr>Kontroll rad i textfil:148 av
1881<br><b>.</b><hr>Kontroll rad i textfil:149 av
1881<br><b>.</b><hr>Kontroll rad i textfil:150 av
1881<br><b>.</b><hr>Kontroll rad i textfil:151 av
1881<br><b>.</b><hr>Kontroll rad i textfil:152 av
1881<br><b>.</b><hr>Kontroll rad i textfil:153 av
1881<br><b>.</b><hr>Kontroll rad i textfil:154 av
1881<br><b>.</b><hr>Kontroll rad i textfil:155 av
1881<br><b>.</b><hr>Kontroll rad i textfil:156 av
1881<br><b>.</b><hr>Kontroll rad i textfil:157 av
1881<br><b>.</b><hr>Kontroll rad i textfil:158 av
1881<br><b>.</b><hr>Kontroll rad i textfil:159 av
1881<br><b>.</b><hr>Kontroll rad i textfil:160 av
1881<br><b>.</b><hr>Kontroll rad i textfil:161 av
1881<br><b>.</b><hr>Kontroll rad i textfil:162 av
1881<br><b>.</b><hr>Kontroll rad i textfil:163 av
1881<br><b>.</b><hr>Kontroll rad i textfil:164 av
1881<br><b>.</b><hr>Kontroll rad i textfil:165 av
1881<br><b>.</b><hr>Kontroll rad i textfil:166 av
1881<br><b>.</b><hr>Kontroll rad i textfil:167 av
1881<br><b>.</b><hr>Kontroll rad i textfil:168 av
1881<br><b>.</b><hr>Kontroll rad i textfil:169 av
1881<br><b>.</b><hr>Kontroll rad i textfil:170 av
1881<br><b>.</b><hr>Kontroll rad i textfil:171 av
1881<br><b>.</b><hr>Kontroll rad i textfil:172 av
1881<br><b>.</b><hr>Kontroll rad i textfil:173 av
1881<br><b>.</b><hr>Kontroll rad i textfil:174 av
1881<br><b>.</b><hr>Kontroll rad i textfil:175 av
1881<br><b>.</b><hr>Kontroll rad i textfil:176 av
1881<br><b>.</b><hr>Kontroll rad i textfil:177 av
1881<br><b>.</b><hr>Kontroll rad i textfil:178 av
1881<br><b>.</b><hr>Kontroll rad i textfil:179 av
1881<br><b>.</b><hr>Kontroll rad i textfil:180 av
1881<br><b>.</b><hr>Kontroll rad i textfil:181 av
1881<br><b>.</b><hr>Kontroll rad i textfil:182 av
1881<br><b>.</b><hr>Kontroll rad i textfil:183 av
1881<br><b>.</b><hr>Kontroll rad i textfil:184 av
1881<br><b>.</b><hr>Kontroll rad i textfil:185 av
1881<br><b>.</b><hr>Kontroll rad i textfil:186 av
1881<br><b>.</b><hr>Kontroll rad i textfil:187 av
1881<br><b>.</b><hr>Kontroll rad i textfil:188 av
1881<br><b>.</b><hr>Kontroll rad i textfil:189 av
1881<br><b>.</b><hr>Kontroll rad i textfil:190 av
1881<br><b>.</b><hr>Kontroll rad i textfil:191 av
1881<br><b>.</b><hr>Kontroll rad i textfil:192 av
1881<br><b>.</b><hr>Kontroll rad i textfil:193 av
1881<br><b>.</b><hr>Kontroll rad i textfil:194 av
1881<br><b>.</b><hr>Kontroll rad i textfil:195 av
1881<br><b>.</b><hr>Kontroll rad i textfil:196 av
1881<br><b>.</b><hr>Kontroll rad i textfil:197 av
1881<br><b>.</b><hr>Kontroll rad i textfil:198 av
1881<br><b>.</b><hr>Kontroll rad i textfil:199 av
1881<br><b>.</b><hr>Kontroll rad i textfil:200 av
1881<br><b>.</b><hr>Kontroll rad i textfil:201 av
1881<br><b>.</b><hr>Kontroll rad i textfil:202 av
1881<br><b>.</b><hr>Kontroll rad i textfil:203 av
1881<br><b>.</b><hr>Kontroll rad i textfil:204 av
1881<br><b>.</b><hr>Kontroll rad i textfil:205 av
1881<br><b>.</b><hr>Kontroll rad i textfil:206 av
1881<br><b>.</b><hr>Kontroll rad i textfil:207 av
1881<br><b>.</b><hr>Kontroll rad i textfil:208 av
1881<br><b>.</b><hr>Kontroll rad i textfil:209 av
1881<br><b>.</b><hr>Kontroll rad i textfil:210 av
1881<br><b>.</b><hr>Kontroll rad i textfil:211 av
1881<br><b>.</b><hr>Kontroll rad i textfil:212 av
1881<br><b>.</b><hr>Kontroll rad i textfil:213 av
1881<br><b>.</b><hr>Kontroll rad i textfil:214 av
1881<br><b>.</b><hr>Kontroll rad i textfil:215 av
1881<br><b>.</b><hr>Kontroll rad i textfil:216 av
1881<br><b>.</b><hr>Kontroll rad i textfil:217 av
1881<br><b>.</b><hr>Kontroll rad i textfil:218 av
1881<br><b>.</b><hr>Kontroll rad i textfil:219 av
1881<br><b>.</b><hr>Kontroll rad i textfil:220 av
1881<br><b>.</b><hr>Kontroll rad i textfil:221 av
1881<br><b>.</b><hr>Kontroll rad i textfil:222 av
1881<br><b>.</b><hr>Kontroll rad i textfil:223 av
1881<br><b>.</b><hr>Kontroll rad i textfil:224 av
1881<br><b>.</b><hr>Kontroll rad i textfil:225 av
1881<br><b>.</b><hr>Kontroll rad i textfil:226 av
1881<br><b>.</b><hr>Kontroll rad i textfil:227 av
1881<br><b>.</b><hr>Kontroll rad i textfil:228 av
1881<br><b>.</b><hr>Kontroll rad i textfil:229 av
1881<br><b>.</b><hr>Kontroll rad i textfil:230 av
1881<br><b>.</b><hr>Kontroll rad i textfil:231 av
1881<br><b>.</b><hr>Kontroll rad i textfil:232 av
1881<br><b>.</b><hr>Kontroll rad i textfil:233 av
1881<br><b>.</b><hr>Kontroll rad i textfil:234 av
1881<br><b>.</b><hr>Kontroll rad i textfil:235 av
1881<br><b>.</b><hr>Kontroll rad i textfil:236 av
1881<br><b>.</b><hr>Kontroll rad i textfil:237 av
1881<br><b>.</b><hr>Kontroll rad i textfil:238 av
1881<br><b>.</b><hr>Kontroll rad i textfil:239 av
1881<br><b>.</b><hr>Kontroll rad i textfil:240 av
1881<br><b>.</b><hr>Kontroll rad i textfil:241 av
1881<br><b>.</b><hr>Kontroll rad i textfil:242 av
1881<br><b>.</b><hr>Kontroll rad i textfil:243 av
1881<br><b>.</b><hr>Kontroll rad i textfil:244 av
1881<br><b>.</b><hr>Kontroll rad i textfil:245 av
1881<br><b>.</b><hr>Kontroll rad i textfil:246 av
1881<br><b>.</b><hr>Kontroll rad i textfil:247 av
1881<br><b>.</b><hr>Kontroll rad i textfil:248 av
1881<br><b>.</b><hr>Kontroll rad i textfil:249 av
1881<br><b>.</b><hr>Kontroll rad i textfil:250 av
1881<br><b>.</b><hr>Kontroll rad i textfil:251 av
1881<br><b>.</b><hr

Kontroll rad i textfil:252 av 1881<br><b>.</b><hr>Kontroll rad i
textfil:253 av 1881<br><b>.</b><hr>Kontroll rad i textfil:254 av
1881<br><b>.</b><hr>Kontroll rad i textfil:255 av
1881<br><b>.</b><hr>Kontroll rad i textfil:256 av
1881<br><b>.</b><hr>Kontroll rad i textfil:257 av
1881<br><b>.</b><hr>Kontroll rad i textfil:258 av
1881<br><b>.</b><hr>Kontroll rad i textfil:259 av
1881<br><b>.</b><hr>Kontroll rad i textfil:260 av
1881<br><b>.</b><hr>Kontroll rad i textfil:261 av
1881<br><b>.</b><hr>Kontroll rad i textfil:262 av
1881<br><b>.</b><hr>Kontroll rad i textfil:263 av
1881<br><b>.</b><hr>Kontroll rad i textfil:264 av
1881<br><b>.</b><hr>Kontroll rad i textfil:265 av
1881<br><b>.</b><hr>Kontroll rad i textfil:266 av
1881<br><b>.</b><hr>Kontroll rad i textfil:267 av
1881<br><b>.</b><hr>Kontroll rad i textfil:268 av
1881<br><b>.</b><hr>Kontroll rad i textfil:269 av
1881<br><b>.</b><hr>Kontroll rad i textfil:270 av
1881<br><b>.</b><hr>Kontroll rad i textfil:271 av
1881<br><b>.</b><hr>Kontroll rad i textfil:272 av
1881<br><b>.</b><hr>Kontroll rad i textfil:273 av
1881<br><b>.</b><hr>Kontroll rad i textfil:274 av
1881<br><b>.</b><hr>Kontroll rad i textfil:275 av
1881<br><b>.</b><hr>Kontroll rad i textfil:276 av
1881<br><b>.</b><hr>Kontroll rad i textfil:277 av
1881<br><b>.</b><hr>Kontroll rad i textfil:278 av
1881<br><b>.</b><hr>Kontroll rad i textfil:279 av
1881<br><b>.</b><hr>Kontroll rad i textfil:280 av
1881<br><b>.</b><hr>Kontroll rad i textfil:281 av
1881<br><b>.</b><hr>Kontroll rad i textfil:282 av
1881<br><b>.</b><hr>Kontroll rad i textfil:283 av
1881<br><b>.</b><hr>Kontroll rad i textfil:284 av
1881<br><b>.</b><hr>Kontroll rad i textfil:285 av
1881<br><b>.</b><hr>Kontroll rad i textfil:286 av
1881<br><b>.</b><hr>Kontroll rad i textfil:287 av
1881<br><b>.</b><hr>Kontroll rad i textfil:288 av
1881<br><b>.</b><hr>Kontroll rad i textfil:289 av
1881<br><b>.</b><hr>Kontroll rad i textfil:290 av
1881<br><b>.</b><hr>Kontroll rad i textfil:291 av
1881<br><b>.</b><hr>Kontroll rad i textfil:292 av
1881<br><b>.</b><hr>Kontroll rad i textfil:293 av
1881<br><b>.</b><hr>Kontroll rad i textfil:294 av
1881<br><b>.</b><hr>Kontroll rad i textfil:295 av
1881<br><b>.</b><hr>Kontroll rad i textfil:296 av
1881<br><b>.</b><hr>Kontroll rad i textfil:297 av
1881<br><b>.</b><hr>Kontroll rad i textfil:298 av
1881<br><b>.</b><hr>Kontroll rad i textfil:299 av
1881<br><b>.</b><hr>Kontroll rad i textfil:300 av
1881<br><b>.</b><hr>Kontroll rad i textfil:301 av
1881<br><b>.</b><hr>Kontroll rad i textfil:302 av
1881<br><b>.</b><hr>Kontroll rad i textfil:303 av
1881<br><b>.</b><hr>Kontroll rad i textfil:304 av
1881<br><b>.</b><hr>Kontroll rad i textfil:305 av
1881<br><b>.</b><hr>Kontroll rad i textfil:306 av
1881<br><b>.</b><hr>Kontroll rad i textfil:307 av
1881<br><b>.</b><hr>Kontroll rad i textfil:308 av
1881<br><b>.</b><hr>Kontroll rad i textfil:309 av
1881<br><b>.</b><hr>Kontroll rad i textfil:310 av
1881<br><b>.</b><hr>Kontroll rad i textfil:311 av
1881<br><b>.</b><hr>Kontroll rad i textfil:312 av
1881<br><b>.</b><hr>Kontroll rad i textfil:313 av
1881<br><b>.</b><hr>Kontroll rad i textfil:314 av
1881<br><b>.</b><hr>Kontroll rad i textfil:315 av
1881<br><b>.</b><hr>Kontroll rad i textfil:316 av
1881<br><b>.</b><hr>Kontroll rad i textfil:317 av
1881<br><b>.</b><hr>Kontroll rad i textfil:318 av
1881<br><b>.</b><hr>Kontroll rad i textfil:319 av
1881<br><b>.</b><hr>Kontroll rad i textfil:320 av
1881<br><b>.</b><hr>Kontroll rad i textfil:321 av
1881<br><b>.</b><hr>Kontroll rad i textfil:322 av
1881<br><b>.</b><hr>Kontroll rad i textfil:323 av
1881<br><b>.</b><hr



<?php
//Parameters for specific vendor taken from db depending on ID sent
to URL
//
if (isset($_GET["IDImport"])) {

    $IDImport = $_GET["IDImport"];

}

//echo "IMPORT=$IDImport";
//exit;
//This is when testing...
//
if (intval($IDImport) !== 5) {

  HEADER("Location:vendor_update.php?IDImport=$IDImport");
  exit;
}


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

<?php
//This script was updated 2005-12-16
//by Gustav Wiberg / [EMAIL PROTECTED]
//Please visit www.varupiraten.se for more scripts
//
require("phpfunctions/datefunctions.php");
$todayDate = dateOfCurrentTime();

require("phpfunctions/dbsafety.php");





require("phpfunctions/opendb.php");

//Delete unessary products (products without pictures)
//
$sql = "DELETE FROM tbvara WHERE bildlank = 'empty.jpg'";
$querys = mysql_query($sql);
//echo "TILLFÄLLIG PRODUKTER BORTTAGNA!";


//Start here...
//
$sql = "SELECT IDImport, importFile, vendorName, saldoColumn,
artNrColumn, priceColumn, checkLev, separator FROM tbimport WHERE
IDImport = " . safeQuote($IDImport) . " LIMIT 1";

$querys = mysql_query($sql);
$importDbArray = mysql_fetch_array($querys);

//No specific vendor is chosen
//Therefore, show all vendors for user to choose
//
if (strlen($importDbArray["importFile"]) == 0) {

    //Show a list of vendors
     //
     $sql = "SELECT IDImport, vendorName FROM tbimport ORDER BY
vendorName";

     $querys = mysql_query($sql);
     while ($dbArray = mysql_fetch_array($querys)) {

        $IDImport = $dbArray["IDImport"];
        $vendorName = $dbArray["vendorName"];
        $logFileName = strtolower("logfiles/$vendorName.txt");
//Example: captech.txt
        ?>
        <b><?php echo $vendorName;?></b><br><hr>
        <a href="vendor_insert.php?IDImport=<?php echo
$IDImport;?>">Lägg till produkter</a><br>
        <a href="<?php echo $logFileName;?>">Visa
loggfil</a><br><br><hr><br>
        <?php

     }

    mysql_close();
    exit;
}


//Parameters that sets the rules for importing
//
$fileName = $importDbArray["importFile"]; //Example:
import/CapTech_pris.txt
$vendorName = $importDbArray["vendorName"]; //Example: Captech
$saldoColumn = $importDbArray["saldoColumn"]; //Example: 2 (third
column)
$artNrColumn = $importDbArray["artNrColumn"]; //Example: 0 (First
column)
$priceColumn = $importDbArray["priceColumn"]; //Example: 7 (Eigth
column)
$checkLev = $importDbArray["checkLev"]; //Example: CA-
$separator = $importDbArray["separator"]; //Example: ;
$vendorName = $importDbArray["vendorName"]; //Example: ;

$logFileName = strtolower("logfiles/" . $vendorName.
"_autoinsert.txt"); //Example: captech.txt

if (strlen($checkLev) == 0 || strlen($vendorName) == 0 ||
strlen($saldoColumn) == 0 || strlen($artNrColumn) == 0 ||
strlen($priceColumn) == 0 || strlen($checkLev) == 0) {

  echo "DOESN'T WORK WITHOUT all fields";
  mysql_close();
  exit;

}
static $row = 1;

//echo $fileName . "<br>"; // = $importDbArray["importFile"];
//Example: import/CapTech_pris.txt
echo "<b>$vendorName</b><br>"; // = $importDbArray["vendorName"];
//Example: Captech
//echo $saldoColumn . "<br>"; // = $importDbArray["saldoColumn"];
//Example: 2 (third column)
//echo $artNrColumn . "<br>"; // = $importDbArray["artNrColumn"];
//Example: 0 (First column)
//echo $priceColumn . "<br>"; // = $importDbArray["priceColumn"];
//Example: 7 (Eigth column)
//echo $checkLev . "<br>"; // = $importDbArray["checkLev"];
//Example: CA-
//echo "SEP:$separator";




//Function for creating a logfile
//and writing to screen
//
function writeNow($str, $logFileName) {

//Create a handle for writing (appending)
//
$logHandle = fopen($logFileName,"a");

  fwrite($logHandle, "$str\r\n");
  //echo $str . "<br>";

//Close file for writing to logfile
//
fclose($logHandle);

}




    //Check if the filename exists first!
    //If not, then exit script

    if (substr($fileName, 0, 4) != 'http') {

        if (!file_exists($fileName)) {

        echo "Filen $fileName finns inte!<br>Avslutar scriptet nu!";
        exit;

        }

    }


$rowsInTextFile = 0;


$insertActions = 0;


        $sql = "SELECT tbvara.Varunamn, tbvara.Saldo FROM tbvara";
        $sql .= " WHERE Varunamn LIKE '$checkLev%' AND
tbvara.Saldo>0 ORDER BY IDVara";
        $querys = mysql_query($sql);
        $rowsInDb = mysql_num_rows($querys);

        echo "<b>AUTOMATISK</B> INFOGNING AV PRODUKTER SOM INTE
FINNS I VP's databas!<br><hr>";
        echo "Loggfil=$logFileName<br>";
        echo "Rader i databas=$rowsInDb<br>";

    //Go through textfile and search for artnr. If not found, then
add information
    //
    $handle = fopen("$fileName", "r");

    //Go through textfile to $startRow
    //

    if (isset($_GET["startrow"])) {
        $startRow = $_GET["startrow"];
    }
    else {
        $startRow = 0;
    }

    $totalRowsInTextFile = 0;

     while (($data = fgetcsv($handle, 1000, "$separator")) !==
FALSE) {

        //echo "STARTROW=$startRow";
        $totalRowsInTextFile++;
        //if (intval($startRow) > intval($totalRowsInTextFile))
{break;}

    }
    fclose($handle);

    $handle2 = fopen("$fileName", "r");

    $rowsInTextFile = 0;

     while (($data = fgetcsv($handle2, 1000, "$separator")) !==
FALSE) {




        $textArtNr = $data[$artNrColumn];
        $textBeskrivandeVarunamn = $data[4];
        $textDetaljText = $data[8];

        //Go through database with products from vendor
        //
        $sql = "SELECT tbvara.Varunamn, tbvara.Saldo FROM tbvara";
        $sql .= " WHERE Varunamn LIKE '$checkLev%' ORDER BY IDVara";

        $querys = mysql_query($sql);

        //Does article exist in database already?
        //
        $foundProductInDb = 'N';


        while ($toarray = mysql_fetch_array($querys)) {

            $dbArtNr = substr($toarray["Varunamn"],3); //Start
after PC-
            //echo "Comparing $textArtNr with $dbArtNr<br>";

            if ($textArtNr == $dbArtNr) {$foundProductInDb = 'Y';}

        }



        //Product existed in textfile, but not in db.
        //Therefore, insert into db
        //
        if ($foundProductInDb == 'N') {

            $intoDb = "PC-" . $textArtNr;
            $intoDbDetaljText =
str_replace("br","<br>",$textDetaljText);

            //Go through rows in table tbreplacetextvendor for
current vendor
            //
            //Replace texts from field searchFor and replace from
field replaceWith
            //If nothing is written in field replaceWith, then do
the searchFor-field bold
            //
            $sql2 = "SELECT searchFor, ForIDVendor FROM
tbreplacetextvendor";
            $querys2 = mysql_query($sql2);

            while ($dbArray2 = mysql_fetch_array($querys2)) {

                $searchFor = $dbArray2["searchFor"];


                //Should the text be replaced by something specific?
                //
                    $explodeDetalj =
explode("<br>",$intoDbDetaljText);

                    for ($nr=0;$nr<count($explodeDetalj);$nr++) {

                        if (substr($explodeDetalj[$nr],0,1) == "-")
{
                        $explodeDetalj[$nr] = str_replace("- ",
"<li> ", $explodeDetalj[$nr]);
                        }

                    }


                    //Make text bold where it should be bold
                    //
                    for ($nr=0;$nr<count($explodeDetalj);$nr++) {

                    $detail = strtolower($explodeDetalj[$nr]);
                    $sf = strtolower($searchFor);

    if (substr($detail,0) == substr($sf,0)) {

                            $explodeDetalj[$nr] =
str_replace($searchFor, "<b>$searchFor</b>", $explodeDetalj[$nr]);
     }


                    }


                    $intoDbDetaljText =
implode("<br>",$explodeDetalj);




            }






//$intoDbDetaljText = "testar";
$intoDbBildLank = "empty.jpg";
$intoDbBildLankStor = "empty_big.jpg";

            $sqlTest = "SELECT Varunamn FROM tbvara WHERE
Varunamn=" . safeQuote($intoDb);
            $querysTest = mysql_query($sqlTest);
            $prodCount = mysql_num_rows($querysTest);

            //Add only if the same product does not exist
            //
            if ($prodCount == 0) {

            $sql3 = "INSERT INTO tbvara (Varunamn,
ForIDAnvandare_Leverantor, beskrivandeVarunamn, detaljTextMer,
inlagdDatum, bildLank, bildlankStor)";
            $sql3 .= " VALUES ("  . safeQuote($intoDb);
            $sql3 .= ", " . safeQuote(7); //Seven is VP-vendor.
            $sql3 .= ", " . safeQuote($textBeskrivandeVarunamn);
            $sql3 .= ", " . safeQuote($intoDbDetaljText);
            $sql3 .= ", " . safeQuote($todayDate);
            $sql3 .= ", " . safeQuote($intoDbBildLank);
            $sql3 .= ", " . safeQuote($intoDbBildLankStor);
            $sql3 .= ")";
            $querys3 = mysql_query($sql3) or die("DEAD sql3");

            $sql4 = "SELECT IDVara FROM tbvara ORDER BY IDVara
DESC";
            $querys4 = mysql_query($sql4) or die("DEAD sql4");
            $dbArray4 = mysql_fetch_array($querys4);
            $dbID = $dbArray4["IDVara"];

            $sql5 = "SELECT ForIDVara, ForIDUnderKategori FROM
tbunderkategorivara WHERE ForIDVara=" . safeQuote($dbID) . " AND
ForIDUnderKategori=15";
            $querys5 = mysql_query($sql5) or die("DEAD sql5");
            $dbArray5 = mysql_fetch_array($querys5);

            //If connection not found, then insert...
            //
            if ($dbArray5["ForIDVara"] OR
strlen($dbArray["ForIDVara"])==0) {

                $sql6 = "INSERT INTO tbunderkategorivara
(ForIDVara, ForIDUnderKategori)";
                $sql6 .= " VALUES(" . safeQuote($dbID);
                $sql6 .= ", " . safeQuote(15); //This undercategory
sets product to not defined category
                $sql6 .= ")";
                $querys6 = mysql_query($sql6) or die ("DEAD sql6");

            }

            //writeNow($sql6,$logFileName);
            }


         }


$rowsInTextFile++;
$startRow++;
echo "<hr>Kontroll rad i textfil:$rowsInTextFile av
$totalRowsInTextFile<br>";
if (isset($sql3)) {
echo "<b>.</b>";
}
/*
if ($rowsInTextFile>100) {
  mysql_close();
  ?>
  <script language="Javascript" type="text/Javascript">
  window.document.location = 'vendor_insert.php?IDImport=<?php echo
$IDImport;?>&startrow=<?php echo $startRow++;?>';
  </script>
  <?php
}
  */

    //Next row in textfile
    //
    }

fclose($handle2);
mysql_close();


echo "<br><br><br>************************************<br>";
echo "<b>Automatisk infogning av produkter slutfört.</b><br>Dessa
produkter hamnar i kategorin Ej tilldelade";
?>
<br><br>
<a href="vendor_update?IDImport=<?php echo $IDImport;?>">Fortsätt
med uppdatering</a>
</body>
</html>


/G
http://www.varupiraten.se/

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

---------- End Original Message ----------

--- End Message ---
--- Begin Message ---
> Hi
> 
> Yes, but I assume that
> 
> echo "<hr>Kontroll rad i textfil:$rowsInTextFile av 
> $totalRowsInTextFile<br>";
> 
> would render a <newline> ?
> 
> /G

Echo does not automatically add a newline, you would have to use \n to
get newlines with the echo statement:

echo "<hr>Kontroll rad i textfil:$rowsInTextFile av >
$totalRowsInTextFile<br>";

Will display the line break in the webpage as expected, but to get the
source code displayed to have the line break you would need to use:

echo "<hr>Kontroll rad i textfil:$rowsInTextFile av >
$totalRowsInTextFile<br>\n";

Brady

--- End Message ---
--- Begin Message ---
Ok, thanx!:-)

/G

----- Original Message ----- From: "Brady Mitchell" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, December 17, 2005 12:35 AM
Subject: RE: [PHP] Weird html - No "real" <cr>


Hi

Yes, but I assume that

echo "<hr>Kontroll rad i textfil:$rowsInTextFile av $totalRowsInTextFile<br>";

would render a <newline> ?

/G

Echo does not automatically add a newline, you would have to use \n to
get newlines with the echo statement:

echo "<hr>Kontroll rad i textfil:$rowsInTextFile av >
$totalRowsInTextFile<br>";

Will display the line break in the webpage as expected, but to get the
source code displayed to have the line break you would need to use:

echo "<hr>Kontroll rad i textfil:$rowsInTextFile av >
$totalRowsInTextFile<br>\n";

Brady

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

--- End Message ---
--- Begin Message ---
just put the "wrong" lines in a file and run it from the shell
with php -f
you should get more info about what's going wrong

hyh
ciao!


2005/12/16, Tim Meader <[EMAIL PROTECTED]>:
>
> What difference are you seeing in the files I give in the example? Are
> they not identical paths?
>
> Thanks.
>
> Hristo Yankov wrote:
> > The two examples you give are not the same? I see
> > different files. Please, doublecheck.
> >
> > --- Tim Meader <[EMAIL PROTECTED]> wrote:
> >
> >> Okay, this seems like a ridiculously easy question
> >> which shouldn't even
> >> need asking, but I'm having trouble getting the
> >> builtin copy command to
> >> work properly. It seems to work fine as long as I
> >> feed it a full
> >> constant string path for each argument (ie - in the
> >> form
> >> "/the/path/to/the/file"). However, if I try to feed
> >> it two variables as
> >> the arguments, it craps out somewhere along the
> >> line. Here are the two
> >> different sets of calls I'm making:
> >>
> >> These two work perfectly:
> >>
> >>
> >
> copy("/usr/local/apache/htdocs/ipreg2/crons/regservice_rep/snapshot.baseline",
> >
> "/usr/local/apache/htdocs/ipreg2/crons/regservice_rep/snapshot.baseline.bak")
> >> ;
> >>
> >
> copy("/usr/local/apache/htdocs/ipreg2/crons/regservice_rep/lastrun.timestamp",
> >
> "/usr/local/apache/htdocs/ipreg2/crons/regservice_rep/lastrun.timestamp.bak");
> >> These two fail:
> >>
> >> $l_stLastRun =
> >>
> >
> "/usr/local/apache/htdocs/ipreg2/crons/regservice_rep/lastrun.timestamp";
> >> $l_stSnapshotBase =
> >>
> >
> "/usr/local/apache/htdocs/ipreg2/crons/regservice_rep/snapshot.baseline";
> >> copy($l_stSnapshotBase, $l_stSnapshotBase.".bak");
> >> copy($l_stLastRun, $l_stLastRun.".bak");
> >>
> >> Can anyone offer any insight on what the problem
> >> might be with this? The
> >> "unlink" function seems to accept the variable
> >> inputs with absolutely no
> >> problem, so I can't understand the discrepancy
> >> between the two.
> >>
> >> Thanks in advance.
> >>
> >> Tim
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> >
> >
> > ===========================================
> > Hristo Yankov, Developer at Portellus, Inc.
> > ICQ - 191445567
> > Yahoo! - yankov_hristo
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
>
> --
> Tim
> [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
----- Original Message ----- 
From: "Shaun" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, December 16, 2005 7:50 PM
Subject: [PHP] Blocking Values From an External Source


> Hi,
>
> I have a script on my site for processing values sent from a contact form
> and emailing them to the webmaster. The script has been abused by spammers
> and my hosting company has recommended that I change the script to only
> accept information posted from my own URL. Could someone tell me how this
> can be done please?
>

If your script is being abused through mail headers injection, making it
only accept information being posted from your own url won't work.
First set a max length in your "from e  mail address" text box and validate
that. For example:

if (strlen($_POST['email']) > SOME_NUMBER ){
    die ("E Mail Address Too Long");
}

Next, validate your e mail address to the rfc standard, there's a good
tutorial here: http://www.iamcal.com/publish/articles/php/parsing_email/

If you validate it using the function in the article your form will be
bulletproof as far as headers injection goes as the rfc standard does not
allow a '\' or ':' in the address. If you follow your isp's advice and still
allow invalid input from your form you're leaving yourself wide open to
header injection. For example someone can still input

[EMAIL PROTECTED]: [EMAIL PROTECTED]

into the from address field. Who needs a bot to post that info when a single
click on a form can see your script used to spam a stack of recipients? To
put it another way, is it worth validating the source of your input if
you're not going to validate the input itself?

HTH

Cheers
Matt

--- End Message ---
--- Begin Message ---
Try browsing the forums webhostingtalk.com, they have some pretty good
reviews about several hosting companys.

On 12/16/05, Marty <[EMAIL PROTECTED]> wrote:
>
> Can anyone recommend a fair priced, reliable hosting company that would
> best
> meet my needs as follows:
>
>
> Shared plan with
> PHP
> Windows server
> Mssql
> Need to host multiple domains under one account.
>
> thanks in advance
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
Jose Arce
http://sinexion.com - http://josearce.com

--- End Message ---
--- Begin Message ---
I use SiteFlip.  Their prices are really low, and they offer quite a bit.

www.siteflip.com

Affiliates have some special discount prices as low as $11.40/yr for 250 MB space, 5GB transfer, 1 domain (you register it), PHP, MySQL, and more (no setup fees).

http://affiliates.siteflip.com

Jose Miguel wrote:

Try browsing the forums webhostingtalk.com, they have some pretty good
reviews about several hosting companys.

On 12/16/05, Marty <[EMAIL PROTECTED]> wrote:
Can anyone recommend a fair priced, reliable hosting company that would
best
meet my needs as follows:


Shared plan with
PHP
Windows server
Mssql
Need to host multiple domains under one account.

thanks in advance

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




--
Jose Arce
http://sinexion.com - http://josearce.com


--- End Message ---
--- Begin Message ---
I'm using
setcookie($sessionName, $sessionid, time()+60*60*24*10000,
$sessionCookie['path'], $sessionCookie['domain'],
$sessionCookie['secure']);

to, obviously, store a session. The problem is that this always times out
after 24 hours, and I can't figure out why.
Is there something I'm missing? ie, perhaps this doesn't save a session
itself, so the session still gets deleted. But then why does the session
stick around for 24 hours even if the browser is closed? Sessions used to
time out when the browser was closed before adding this.

Also, I only use session_start() so perhaps I'm supposed to call
session_id()?

Thanks,
Realm

--- End Message ---
--- Begin Message ---
> I'm using
> setcookie($sessionName, $sessionid, time()+60*60*24*10000,
> $sessionCookie['path'], $sessionCookie['domain'],
> $sessionCookie['secure']);
>
> to, obviously, store a session.
> Also, I only use session_start() so perhaps I'm supposed to call
> session_id()?

I'm not sure why the cookie is being mis-saved, but sessions ARE
supposed to save the cookies automatically.

--- End Message ---
--- Begin Message ---

On Dec 15, 2005, at 10:15 PM, Michael Hulse wrote:
On Dec 15, 2005, at 10:09 PM, Michael Hulse wrote:
So, if you buy the gallery script, which I did (I think I spent like 20$), the "Powered by Company Name" disappears.

I forgot to add:

When you buy the script, the company will send you a new replacement config.dat file that "magically" removes the "Powered by Company Name" from the bottom of the template pages.

Hello,

Wow, I did not expect to get 0 responses to my original post... Now I feel kinda bad for even asking. :(

Anyway, Let me re-phrase my question: How do you protect your code?

I have heard about commercial options of obfuscating code... But I would love to learn about ways to do the same without paying the big-bucks.

If one were to read my original post, that gallery script has a great system of adding a "Powered By" link to bottom of the template pages... I would love to learn how to do something similar. Anyone feel like sharing? Links? Thoughts? Comments? Suggestions? Should I go bugger off?

Feel free to contact me off-list.

:)

Thanks in advance!
Cheers,
Micky

--- End Message ---
--- Begin Message ---
Hi,

I have just put together a small visual programming example
that generate PHP code for our Designer. Feel free to try.

http://www.memention.com/designer/example/page.php

Share and enjoy!
Edward



--- End Message ---

Reply via email to