Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





.htaccess Transparent SESHID And Sessions


just putting the finishing touches on a shopping site and have run into errors in the process when users are blocking cookies. i am using:

<IfModule mod_php4.c>
php_value session.use_trans_sid 0
</IfModule>

in my .htacess file to supress the PHPSESSID=22y3213etc. but it means that if a cookie isn't set the site fails to work properly.

if i remove that from my .htaccess the site works fine because the PHPSESSID is passed around evey page, but it knackers things for SEO purposes. Code:




View Complete Forum Thread with Replies

Related Forum Messages:
PHP (GD) Created Transparent PNG: AlphaImageLoader Makes Black Parts Transparent Instead Of Transparent Color Set With PHP
I have a problem with PHP (GD) created transparent PNG and Microsofts
AlphaImageLoader.

You will immediately see what the problem is if you view
http://www.useful-scripts.biz/test/.../transpng_2.php with IE 7
or Firefox and then with IE 6. It seems that the AlphaImageLoader
works correctly on a PNG image that has been created with an image
processor and then uploaded, but not with a PNG image created with
PHP. It seems to ignore the transparent color set with PHP and instead
to render the black color transparent.

The image in question was created using this code:

<?php
$source = imagecreatefrompng("parrot_orig.png");
$transp = imagecolorallocate($source,255,0,0);
imagecolortransparent($source,$transp);
imagefilledrectangle($source,15,15,70,70,$transp);
imagepng($source,"parrot_php.png");
?>

The HTML used on the page is this:

View Replies !
.htaccess To Enable Sessions
I want to get this blasted .htaccess file sorted out, so I can have
sessions without register_globals being on.

I have looked everywhere for info on this and I mean everywhere
including the php.net manual.

In the manual it said to include something like the following:

php_flag register_globals off;
php_value session.save_path C:homeusersiterootsessusers
php_value session.cookie_time 3600
php_value session.gc_maxlifetime 3600
php_value include_path .;C:homeusersiterootsess
php_value auto_prepend C:homeusersiterootsesspath_file.php

I did that and then someone in here said that it was wrong and I
needed to include all these other things and have other files in
different places as well.

To start with, I was informed in this group that all I needed was a
..htaccess file nothing else.

I am running locally, I have Windows XP Pro. I have Apache 2.0.49, PHP
4.37.

What exactly do I need to have in this .htaccess file (and elsewhere)
to get sessions to work? What am I doing wrong? All I have done is
followed what people in here and the advice in the manual said.

Is asp or coldfusion as complicated and troublesome to use as php is?

Are there any "good php" books that have recently been published that
explain clearly how to enable sessions without register_blobals being
on? This book I am working through is pretty new, it is for learning
asp, coldfusion or php with mysql in dreamweaver mx 2004! It has only
recently been published but is still going with the old method of
globals being on! I have four other books on php as well, and none of
them deal with this.

View Replies !
Transparent GIF
I am trying to resize transparent GIF images, so I was reading, and they say to use fopen, fread, and read the first 13 bytes... OK, so I read in a transparent gif, and the first 13 bytes... and echo it out to the screen, and I get this: GIF89a›&#65533;s&#65533;÷&#65533;&#65533;What am I supposed to do with that? they then say "allocate that color as transparent, and use imagecopy(); to set the transparency back."

View Replies !
Transparent .png
This isn't totally related to php, but I am using a php generated page that is using transparent .png's.

Anyway, when I view the page in Internet Explorer, the transparency within the png is replaced with grey?? But when I view it in Firefox it works fine?

View Replies !
Transparent Image
Hi!

Here's a piece of code:

[begin]

<?php

Header('Content-type: image/png');

$sz = "";

$FileValue = 1000;

$i = strlen($FileValue);

for ( $j = 0; $j < 7-$i; $j++ )
{
$sz = $sz . "0";
}

$Img = imagecreate(56,13);

$Gold = imagecolorallocate($Img,148,128,100);

$Gray = imagecolorallocate($Img,32,32,32);

ImageFilledRectangle($Img,0,0,55,12,$Gray);

imagestring($Img,4,0,0,$sz.$FileValue,$Gold);

imagepng($Img);

ImageDestroy($Img);
?>

[end]

OK. Calling this script I have a png picture back.

Now I add imagecolortransparent($Img,$Gray); just before imagepng() and OK
again, I have a transparent picture back. But now, if I add:

$r = imagerotate($Img,90,0);

imagepng($r);

just after the imagecolortransparent() instruction seen above, I get a
rotated picture, but not transparent. How to solve that? I've used a plenty
of tricks, no one works.

View Replies !
Transparent GD Watermark.
Any one know what would be the best way to accomplish a transparent watermark on upload with GD that will work for Jpegs, Gifs and Pngs,  using only GD in php 4?

View Replies !
Resize Transparent PNG
I have a basic script to resize a transparent png image. Code:

$dimg = imagecreatetruecolor($newwidth, $newheight);
imagecolortransparent($dimg, imagecolorallocate($dimg,0,0,0));
imagealphablending($dimg, false);
imagecopyresampled($dimg, $simg, 0, 0, 0, 0, $newwidth, $newheight, $currwidth, $currheight);


Problem is that my nice drop shadows are lost in resize. Does anyone know how I can keep them ?

View Replies !
Transparent Background
i'll try to explain myself the best i can, here is the problem:

i have a html page and inside this i want to put an iframe that contains a php page. That's ok, i can do it and it works, but the problem is that i can't make that php document to have transparent background.

it turns white. Is it because of the iframe? the php document has transparent background, but when i see it inside the iframe it doesn't work.

View Replies !
Two Transparent Colours
I have an image that I am opening and then merging onto another image, and it has two colours which I wish to make transparent, but it is not working, can you please give me an example of how to do this thanks. When I say that it is not working, I mean that when I allocate the second one, the first one is no longer transparent.

View Replies !
Transparent Overlay Watermark - On The Fly?
Is it possible to overlay a transparent watermark on an image -
dynamically?

I'd like the result to look like this example:
<http://www.cycletourist.com/temp/photo.php>

That is a bit of overkill, but you can see what I mean. The watermark
image (a png image) is included separately below the photo.

I tried using a class from phpclasses.org
<http://www.phpclasses.org/browse/package/1580.html...
but the result looks horrible. The transparency does not work.

I found one other method through Google,
<http://www.sitepoint.com/article/watermark-images-php>
but it did not work, either.

Can this kind of transparent overlay be done on the fly with GD lib?

View Replies !
Dynamically Transparent Gif's
Basically what i would like to do is dynamically set the transparency of a selection of images (GIF'S) depending on variables set in a My SQL Database. What i need to do is tint some jpg,s by setting the transparency of a solid blue gif which is set over the top of it in a table.

View Replies !
GD: Testing A Pixle To See If It's Transparent?
How would I determine if a pixel is 100% transparent on a given image?

View Replies !
Imagegettftext Transparent Holes
I created an image, made it transparent, drew a rounded rectangle on it and then wrote on it with imagegettftext - where the text is there are transparent holes.

$image = imageCreateTrueColor($width,$height);
imageSaveAlpha($image, true);
ImageAlphaBlending($image, false);

$transparentColor = imagecolorallocatealpha($image, 255-$r, 255-$g, 255-$b, 127);
imagefill($image, 0, 0, $transparentColor);

$background = imagecolorallocate($image, $br, $bg, $bb); .......

View Replies !
Find Out If An Image Is A Transparent Gif
Does anybody know if there's an easy way to find out if a given image is a transparent gif? (GIF89a)

View Replies !
Define The Transparent Color
I've made a script that takes images (in gif,jpg & png) and makes their thumbs in jpg format. Now, the problem is if I have a transparent gif when saved to jpg the part of the original picture that is transparent turns black in the new thumb. My question is: how can I define that the transparent part gets the color i want it to get (white is what i need) ?

Actually, I now what in theory should be done. I should change the r,g,b values of the color that has aplha=127 (and that's not a problem with imagecolorset()), but also I should change the alpha of that color to 0. how can that be done ? My quess is that that is the right way to do it.

View Replies !
Transparent Watermarks On Images
I'm using the code below to make a watermark and it's kinda working, but I want it semi-transparent as the PNG file is itself.

Is there an easy way of overlaying transparent images in the GD library, so that the original image is merged in such as way that it can be seen through the watermark? Code:

View Replies !
Make Thumbnail Transparent
I have a script that will upload an image, then create a thumbnail of that image. When I upload an image with a transparent background the normal sized image comes out with a transparent background, but the thumbnail image comes out with a black background. Code:

View Replies !
Transparent Text On Image?
Is it possible to place transparent text on an image? I want to display an image of some text in a fancy typeface, but superimpose text in a plain style, so that it can be copied and pasted; a bit like what you see in some PDF files, where the page image is visiable, the overlying text is not.

View Replies !
Transparent Filled Polygon
I'm working on a map program where each building is clickable and when it's clicked the page is refreshed to show a map with the building highlighted (in red). I was wondering if it would be possible to highlight the buildings using some sort of combination of the imagepolygonfill function and a transparency function (i'd like the buildings to still be visible under the highlight), rather than having to create many different files with the different buildings highlighted.

View Replies !
Make A Colour Transparent
I would like to do is grab an image, determine what colour is at a certain pixel (maybe 10, 10) and then set that colour to transparent for the whole image. Basically it is so that I can dynamically place an image on various backgrounds for previewing. I am not worried about perfection (anit-aliasing, matte, etc).

View Replies !
Add Transparent Copyright Text To Image
I need a way to add a transparent copyright message (e.g. copyright 2002 together with my company logo) to my photos on the fly. My photos come in many different formats, such as PNG, GIF and JPEG.

View Replies !
GIF Resize Resample Transparent Fill
I am currently trying to create what I would think is simple. I want to create a image.php file and have it resize a 80 x 80 image to 29 x 29 with out losing the quality. When I try to have the gif image imagefill with the color white (255,255,255) it holds up and ends with a timeout. The gif images also have the black pixels if i don't try filling.

Does anyone know a simple script to just resize a gif/jpg file? All documentation has been pretty bad so this is first time posting.

View Replies !
Create Or Resize Transparent .png - Drop Shadow - GD IM
I've searched and d/l'd but cant seem to find a way of creating
a semi-transparent drop shadow for an image.

Let me say, be fore I go on, I *do not* want one of those scripts that
resizes your image a bit to the left and bottom, and then grafts a
shadow onto it. I want to use a full shadow (it would be about as big
as the image) and shift it a bit with CSS. So, I will have the image
sitting in a DIV which will have the shadow as a bg. This works fine
doing it manually.

So, I would like to find one of two alternatives:

1. (best) Create the shadow from given parameters(size, darkness,
spread, etc.) I will write the .png to a folder, I dont really need to
create it dynamically each time, but want the ability for the future
(galleries) and for when I'm in development and images are changing,
moving around, etc.

2. (will work) Take a pre-existing shadow and resize it as needed, but
has to keep the transparency.

View Replies !
How Do I Echo A Binary Array (transparent Pixel)
What am I doing wrong here? I want to display a transparent pixel...

<?
$transparent1x1 = array (71, 73, 70, 56, 57, 97, 1, 0, 1, 0, -128, 0,
0, 0, 0, 0, 0, 0, 0, 33, -7, 4, 1, 0, 0, 0, 0, 44, 0, 0, 0, 0, 1, 0,
1, 0, 0, 2, 2, 68, 1, 0, 59);
header("Content-type: " . image_type_to_mime_type (IMAGETYPE_GIF));
echo $transparent1x1;
?>

View Replies !
[GD]: Open Existing Image(url) & Set A Transparent Color
lets say i output an image like this:

$img = array('somedomain.com/foo.jpg');

<img src="$img[0]" alt="" />

but it has a white background and i want to strip the white background to be transparent

how do i do that and output it inline again?

View Replies !
Remove A Black Background From An Image To Make It Transparent Using GD
is it possible to remove a black background from an image to make it transparent using GD. for example. can i pass the radius of the moon to GD (as it is on the image) and have it slice the moon out so to speak leaving it on a transparent background.

View Replies !
Security - Detect If A Client Is Connecting Through A Proxy(inluding Transparent) Or Not.
I want to detect if a client is connecting through a proxy(inluding transparent) or not.  What measures can I take to authenticat the source of the request before I even ask for login details. $_SERVER['REMOTE_ADDRESS'] is the only thing I can think of using but surely it is not sufficient to trust its value.

View Replies !
Put Transparent Layer That Disable Page Element At The Time Of Processing Ajax
I have made web page in php with the help of ajax and javascript. I want to do whenever page processing for ajax for that time I want to put some transperent layer that will disable the back pages element.. I have seen one site but I dont remember.

View Replies !
Htaccess Needs Saving To .htaccess
Windows won't let me change htaccess-dist to .htaccess - saying it needs a file type..!! is there another way in which I can save it other than just trying to rename it.

View Replies !
Creating Image From Uploaded Image And Transparent PNG
Say the client wants to be able to change the image, but not the text treatment, and doesn't have the Photoshop knowledge to actually replace it and re-save it themself.

Is there anyway to use a PNG with the rounded edges, text treatment, and transparent center, have the client upload a standard rectangular-shaped image, and use PHP to layer the uploaded image underneath the transparent one, creating a new image file?

View Replies !
Creating User Sessions W/out Using Sessions
I'm working on a user management system where I can use the benefits of PHP sessions w/out messing with them. Basically, my idea is to have an entry created into a "sessions table" when the user logs in. The table contains such info as the user's id number and the date/time they logged in. When the user logs out, the entry is deleted. In each page/script, it checks to see if the user is logged in by checking the sessions table for an entry w/their IP address and the date, to make sure it is fairly current (unless anyone can think of a better way to check).

Now my delema....obviously, I don't want people that don't properly log out to have a session that could last weeks (depending on when they visit again). I am thinking a script that cleans up entries that are old would do the trick, but obviously I want this script to run say, at least once an hour. Obviously, I am not going to be able to sit at my computer and run this script every hour of every day. I was thinking of using the script and doing a cron job, but I think my host only allows one cron job per day...and only at night. Any thoughts??

View Replies !
How Do Different Sessions Work? Multiple Sessions
I use a messageboard which uses sessions.

I have a login script which uses sessions.

I have a charting app which uses sessions.

How does PHP handle this? Does it create three different sessions or is everything handled by the one session file? In other words, is it working like magic and I don't need to worry about it.

What I'm confused with is that at the start of the login script there is a start_session() and other session related stuff. On logout, the session is destroyed.

Now does this affect the start_session() of the other scripts?

View Replies !
How To Use Php In .htaccess?
hi, does anyone knows how to write php in a .htaccess file? coz all i want to do is to have every member his own database with his own username and password, so that only hisself can access his own directory. but my membership creation is a web-based, so that i can't create the user's own password database by hand, so it must be done when a new user is created automatically.
are there any ways to do that?

Also, I tried to use php to call htpasswd but it seemed didn't work by the script: exec("htpasswd -b -c /usr/local/apache/passwd/perry perry perry");

View Replies !
Htaccess And PHP
I have set up .htaccess for one of my pages... and one of the protected files is a PHP script. Now, my question is, I want to use the username from htaccess in my PHP script, how do I get it?

Eg. you log in to my htaccess protected page and then you come to a page that say this "Hello, you are logged in as <username>"

View Replies !
SEO URL Htaccess
I want to convert my smarty urls to seo friendlly.For example
index.php?mod=member&pg=user&a ct=list should be converted to mod/
member/pg/user/act/list

Url can have N number of querystrings. All of those should be
converted to seo friendly.Please suggest an htaccess code for this
problem

View Replies !
PHP-.htaccess-CGI
I created a set of pages with PHP for login using a database. Now, I
need to link to a lot of CGI programs in a folder with protected-access
(.htaccess). The username and password are the same as the ones people use to login with. Is there a way to use the session usrname/password for the HTTP
authentication to that folder ?? If I remove the .htaccess for that
particular folder, then all those files will have access without any
kind of authentication.

I tried username:password@www.example.com . But this doesnt work with
IE 6. So I need something else.

View Replies !
Htaccess Help
right now im testing the generated permalinks of my cms.

i'm kind of learning htaccess rewrite.. but i dont get one thing.
what does this exactly mean?

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

View Replies !
Php - Htaccess
On my webhosting I don't have access to a root directory, so I am stuck in
the public folder.

I should secure the downloads folder, this is why I wanted to use a
..htaccess file.

Only, PHP should have access to this folder..because users login using a
username and password from the database.

How can I make an htaccess file which allows the "php-user" to access the
files in the folder on a Linux webserver?

View Replies !
.htaccess/PHP
Just wondering if this is possible:

I want to use htaccess to authenticate different users. What I would then
like to do is use the username from the htaccess box to set the session id
of the pages. Furthermore, I would like to use this to keep a check on
whether a user is logged in when they hit a page. This is so that I can
deliver content appropriate for each user. This is an existing project
where htaccess is being used. I'm just writing a backend for my customer so
that their clients can log fault calls.

Is this possible?

View Replies !
URL And .htaccess
I've protected a directory with an .htaccess file.

I'd like some of the files in this directory to be accessible by a scheduler
that runs an "URL". The problem is that the scheduler runs scripts in this
directory, so the server asks a username and password. How to avoid this ???
Should I set the .htaccess file to allow GET, but how ??? and what would be
the URL ???

directory tree:

admin
.htaccess
admin.htm //frame
adminmnu.htm //menu in frame
script1.php
script2.php
script3.php

View Replies !
Php .htaccess
Is there a way to use an http or https request to authenticated a .htaccess
protected directory?

View Replies !
Using Php Instead Of Htaccess
I'm finding out that htaccess, while a decent way to secure a directory and its contents is not very programmer flexible. I was wondering how you could go about securing the contents of a directory by using php and mysql.

View Replies !
Php And Htaccess
i would like to know that ,how to get user name if i am using like that

www.example.com/sijo

i was used an htaccess file in it i have written

RewriteEngine on

RewriteRule P/(.*)$ index1.php?referer=$1

like that but in running site i did not the name.

View Replies !
Using .htaccess
i have set up a cookie using php. <?php setcookie("user", "student", 3600); ?> . is it possible to read that cookie using .htaccess? otherwise please inform me how to set and read cookies using .htaccess. please give me a link to such tutorial if there is one.

View Replies !
Htaccess Log Out
I set an htaccess on an admin folder for a news script through the folder permissions section in cpanel. Everytime I go to the admin folder it logs in automatically for somereason. Not sure if its just for me or for others aswell but can I make a log out link so it logs me out?

View Replies !
Php And .htaccess
I have written the .htaccess file and is in my doc root. the rule is something like this.
RewriteRule ^test/?$ /view/os.php and so on, there are some 100 rules I have written. now I do not know , how to change the conf file so my php will read the link http://192.168.149.44/test/ and pass it directly to http://192.168.149.44/view/os.php
can any idea, what are change and where so my PHP/apache will read the .htaccess file and do the stuff.

View Replies !
What's Htaccess ?
what's htaccess ? i don't know anything bout this thing and please someone to give me a brief explanation...bout what it is and it's function..

i read on http://httpd.apache.org/docs/2.0/howto/htaccess.html but is too hard to digest (i'm already confused) since i really don't know much bout apache (beside just using it as web server ^_^)

View Replies !
And .htaccess
I am building a website, part of which reuires user authentication. In
the past I have used PHP and MYSQL to do this, but I was wondering if
there is an easy wasy to use .htaccess. On the face of it this looks
simple but each page the site returns is user specific, so I need a way
of finding out which user logged in.

For example if John logged in he would see page A
If Suzy logged in she would see page B.

I am thinking that there might be something in the page headers that I
can get hold of, I'm just not sure what.

View Replies !
In .htm Without .htaccess
i have a large site and need the content pages to be .htm but i want to use 1 header and footer file (php includes)...tried useing the .htaccess files to run htm as php but cant on my windows server....is there any other way to do this?

View Replies !
.htaccess &
I have protected a directory with the help of .htaccess & htpasswd. I also read that I can get the login value in a php variable. Like this:

$user = $_SERVER['PHP_AUTH_USER'];
echo "User : ";
echo $user;

View Replies !
Htaccess
When I try to go to a directory with mi Internet browser in order to display the files it contains, I get the following mention: Forbidden, you dont have permission to access /mydir/ on this server. Is there a way to acces to this directoy by puttinge an .htaccess file in it, and in that case what should I write into the .htaccess file.

View Replies !
.htaccess
Currently, I am using .htaccess rewrite to change some of the names of my URLs. However, I want to take it to another level. Currently, here is what I have:

RewriteEngine On

RewriteRule ^newsarticle/page/([0-9]+)/?$ newsarticle.php?id=$1

So if my news article was located at: http://www.mydomain.com/newsarticles.php?id=3, it will now be http://www.mydomain.com/newsarticles/page/3

However, I want it a little different.
Rather than ending in with the ID number, I want the URL to have the title.

If the news article title is Cool News Article, then I want the URL to be http://www.mydomain.com/newsarticles/Cool-News-Article

Does anyone know what I would have to do to accomplish this task? p.s. All news articles are pulled from a database and the title is stored in the field called `title`.

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved