Pages: [1]
|
 |
|
Author
|
Topic: .htaccess question. (Read 1031 times)
|
dlilahl
Mega ZboXian
  
Offline
Posts: 99

|
Hi.. A while back, Bert, you had posted information on the many uses of .htaccess. I cannot find that and would you please post it again?
I use it for php5, and for security but also you had other information, too. Thanks,
lilaŠ
|
|
|
|
|
Logged
|
|
|
|
|
|
|
|
ZboX
Founder
Administrator
Posting Maniac
    
Offline
Posts: 1515

What 'ya got there??
|
Well done Lanny. Two posts and both are jewels.
~;-)
Bert
|
|
|
|
|
Logged
|
|
|
|
MisRox
Founder
Administrator
Posting Maniac
    
Offline
Posts: 232

|
WhoooHooo, Lanny! Good to see you, are paying attention...<G> 
...;-) Rox
|
|
|
|
|
Logged
|
Visit Me at:
|
|
|
dlilahl
Mega ZboXian
  
Offline
Posts: 99

|
Thanks Lanny, Bert for your sites with .htaccess. Possibly I was thinking more in terms of command lines? Not a redirect, but random or some way to use it that seemed unusal at the time since I had not studied much on .htaccess. Could it be used something like a copyright signature that would be used in each file? Just guessing here on ideas in not using SSI instead. Wish I had kept that. (gr)
Read in the one Lanny posted about servers not having the function SSI..it could be used in a htaccess. However think these should be posted for Bert, or host, to say it's ok to use. And, we have access to SSI here.
If anyone reading these post should remember another method of using it, please post. Most of the uses on the web are for blocking, redirect, etc.
tks, lilaŠ
|
|
|
|
|
Logged
|
|
|
|
ZboX
Founder
Administrator
Posting Maniac
    
Offline
Posts: 1515

What 'ya got there??
|
Thanks Lanny, Bert for your sites with .htaccess. Possibly I was thinking more in terms of command lines? Not a redirect, but random or some way to use it that seemed unusal at the time since I had not studied much on .htaccess. Could it be used something like a copyright signature that would be used in each file? Just guessing here on ideas in not using SSI instead. Wish I had kept that. (gr)
Read in the one Lanny posted about servers not having the function SSI..it could be used in a htaccess. However think these should be posted for Bert, or host, to say it's ok to use. And, we have access to SSI here.
If anyone reading these post should remember another method of using it, please post. Most of the uses on the web are for blocking, redirect, etc.
tks, lilaŠ
Hi Lila, What you are asking could be done either by an ssi, php include, or a css stylesheet. Of course the css stylesheet could be iffy on Webtv. So let us know which way you would like to go and we'll try our derndest to get the coding for you.
~;-)
Bert
|
|
|
|
|
Logged
|
|
|
|
dlilahl
Mega ZboXian
  
Offline
Posts: 99

|
Thanks Bert. Might post CSS examples as the SSI, and PHP I can handle ok. 
CSS will go with my stuides of PHP, too. Tks, lila
|
|
|
|
|
Logged
|
|
|
|
ZboX
Founder
Administrator
Posting Maniac
    
Offline
Posts: 1515

What 'ya got there??
|
Thanks Bert. Might post CSS examples as the SSI, and PHP I can handle ok. 
CSS will go with my stuides of PHP, too. Tks, lila
Ok Lila. You just need examples of including via css of a header or footer?
Bert
|
|
|
|
|
Logged
|
|
|
|
dlilahl
Mega ZboXian
  
Offline
Posts: 99

|
Header would be fine, Bert. Thank you.
Had this script in my cache so dropped it off as it is a neat random php for changing colors of any image. It is fun to use.
lila
<<>?php function make_seed() { list($usec, $sec) = explode(' ', microtime()); return (float) $sec + ((float) $usec * 100000); } $ar=array(0,0,0,0); srand(make_seed()); $onetwoorthree=rand(0,2); $first=rand(0,100)/100; $second=1-$first; $ar[$onetwoorthree]=$first; $ar[$onetwoorthree+1]=$second; if ($onetwoorthree+1>2) $ar[0]=$second; //echo " ".$ar[0]." ".$ar[1]." ".$ar[2]; $im = imagecreatefromjpeg("http://yourdomain/image here") or die ("Cannot Initialize new GD image stream"); header ("Content-type: image/jpeg"); error_reporting(0); $height=imagesy($im); $width=imagesx($im); $im2=imagecreatetruecolor($width,$height); for ($x=0;$x<$width;$x++){ for ($y=0;$y<$height;$y++){ $rgb = ImageColorAt($im, $x, $y); $r = ($rgb >> 16) & 0xFF; $g = ($rgb >> 8) & 0xFF; $b = $rgb & 0xFF;
$r2=$r; $g2=$g; $b2=$b;
$r=$r2*$ar[0]+$g2*$ar[1]+$b2*$ar[2]; $g=$r2*$ar[2]+$g2*$ar[0]+$b2*$ar[1]; $b=$r2*$ar[1]+$g2*$ar[2]+$b2*$ar[0];
$color = imagecolorallocate($im2, $r, $g, $b); imagesetpixel($im2,$x,$y,$color); } } imagejpeg($im2,"",80); ?<>>
Here is a nice rose to beam if you'd like to use it.
reload each time:
http://dlilahl.zboxhosting.com/PHP.TOOLS/ROSE.jpg
http://dlilahl.zboxhosting.com/PHP.TOOLS/1hue-shift2.php
|
|
|
|
« Last Edit: April 16, 2007, 10:32:35 PM by dlilahl »
|
Logged
|
|
|
|
ZboX
Founder
Administrator
Posting Maniac
    
Offline
Posts: 1515

What 'ya got there??
|
Hi Lila, Well upon further research it seems including via CSS is not an attractive way of doing it. And I'm not sure how familiar you are with CSS. There would be issues with browser compatibility etc. Frankly the easiest way would be to use SSI. However I did stumble over a neat way to import a style sheet into a page:
<STYLE TYPE="text/css"> @import url("generic.css") </STYLE>
Where "generic.css" is the actual stylesheet and is in the same directory as the page you would like to import it into.
~;-)
Bert
|
|
|
|
|
Logged
|
|
|
|
dlilahl
Mega ZboXian
  
Offline
Posts: 99

|
THANKS...will run the codes to see what happens. gr
To tie this into .htaccess in a command line would not be better as I read the information sites you both have given. I just couldn't remember your post. lol
The SSI and php include is the better way for command lines as I understand it. What I mean by command lines is using the same as SSI header or php include header that adds a code of script just as your .htaccess in using php4 or 5.
Thanks and will later let you know how your css worked out.
lilaŠ
|
|
|
|
|
Logged
|
|
|
|
Pages: [1]
|
|
|
|
|