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.





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 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 !
Connecting Through A Proxy
What I am trying to do is connect to my newshost (unlimited.newshosting.com(63.218.45.254 port is 119)) to download usenet headers for my site.After sending a whitelist request to Godaddy, they replied with this:

Thank you for your email. Applications that need to make https connections (port 443) will need to be made "proxy aware". This will require additional coding to varying degrees, depending on the application. You will need to know the ip address and port of the proxy server in order to correctly modify your code. The ip of the proxy server is 64.202.165.130 and connections will be made on port 3128.

You will need to use this when coding with PHP:

curl_setopt ($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE);
curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
curl_setopt ($ch, CURLOPT_PROXY, http://64.202.165.130:3128);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

I'm not sure how I go about this.

The code: ......

View Replies !
How To Detect Proxy?
What's a good way to detect if an ip is a proxy ?

View Replies !
Detect Proxy Typ
Is there any way to detect the type of proxy Transparent, Anonymouse, High Anonimity or No Proxy.

View Replies !
How To Detect If Clients Are Using A Proxy
I need to know if clients access my website directly or through a proxy. this is for security requirements.

I used a code like the following:

if($_SERVER["HTTP_X_FORWARDED_FOR"]||$_SERVER["HTTP_VIA"]||
$_SERVER["HTTP_CLIENT_IP"])
echo "proxy connection";
else
echo "direct connection";

However this worked only when accessing the website through http:// but when accessing it through https:// all variables $_SERVER["HTTP_X_FORWARDED_FOR"] and $_SERVER["HTTP_VIA"] and $_SERVER["HTTP_CLIENT_IP"] are empty

I used a public proxy server for testing. Its IP is 200.65.127.163 port is 80

It supports both normal http and secured http connections.

N.b: I know there are the highly anonymous proxies that normally can't be detected but at least I need to detect the normal anonymous proxies when opening my website through ssl.

View Replies !
Proxy And Client Ip
I'm using PHP-5.0.1 , I make a script to catch proxy and client ip, this is my script:

<?php
echo "$_SERVER['HTTP_X_FORWARDED_FOR']
=&nbsp;".$_SERVER['HTTP_X_FORWARDED_FOR']."<br>";
echo "$_SERVER['HTTP_CLIENT_IP']
=&nbsp;".$_SERVER['HTTP_CLIENT_IP']."<br>";
?>

it returns errors :

*Notice*: Undefined index: HTTP_X_FORWARDED_FOR in *D:Program
FilesApache GroupApache2htdocs est-scriptipers.php* on line *8*
$_SERVER['HTTP_X_FORWARDED_FOR'] =

*Notice*: Undefined index: HTTP_CLIENT_IP in *D:Program FilesApache
GroupApache2htdocs est-scriptipers.php* on line *9*
$_SERVER['HTTP_CLIENT_IP'] =

I get that script from php-manual at "predefined variables" section :

View Replies !
Help: FTP Client Using Socks Proxy
i need a simple FTP Client, just browsing directories,
which connects to ftp servers using a socks 4/5 proxy.

I already have the ftp client but i don't have any idea of how can i
use a socks proxy.

View Replies !
Connecting To Bittorrent Client
Tried using fsockopen but I don't really know what to send, anybody has some knowledge about this?

I've also tried to look trough some "php bittorrent clients" but in fact they're not clients they're just php interfaces to clients written in python.

View Replies !
Client Connecting To A Travel Database
I am trying to create a client hotel booking interface to Gullivers Travel Associates. In order to connect to them i will be using XML and PHP and will be using HTML to display information received from them. Their specification states the following: Code:

View Replies !
How To Detect That A System(client) Is Idle In PHP
I want to know that how can php script detect that a client is idle for few minutes(meens keyboard and mouse is not in use)

View Replies !
How To Detect Whether Javascript Is Enabled Or Not On Client Machine
to check that whether javsscript is enabled on
client machine or not. if not enabled then what steps should i take to
run my script that includes javascript.

View Replies !
Security Of Database Connecting Scripts
Is it insecure to have all pages of a site require a common.php page that has the sole purpose of connecting to the database??

If someone found the location of this could they not require it on there webpage and manipulate my database?

View Replies !
Nusoap - Array ( [faultcode] =env:Client [faultstring] =Rejected (from Client) )
Using a PHP 4 and Nusoap I get the following errors when attempting to
call a web service

I need to login to the main web service and get a session token to be
able to access the second web service - this part works ok

When I try and call the second web service, I get the following error.

Result
Array ( [faultcode] =env:Client [faultstring] =Rejected (from
client) )

Request

Response

VR array(2) { ["faultcode"]=string(10) "env:Client" ["faultstring"]=>
string(22) "Rejected (from client)" }

Below is my code:

$VendorWsdl =
"https://api.betfair.com/betex-api-public-ws/v1/VendorService.wsdl";
$VendorSoap = new soapclient($VendorWsdl,"wsdl");
$VendorProxy = $VendorSoap->getProxy();

$AddUserParams =
array(request=>array('header'=>$BetfairRequestHeader,'username'=>$tok[3],'vendorSoftwareId'=>342,'expiryDate'=>$expiry));
$VendorAddResult = $VendorProxy->addVendorSubscription($AddUserParams);

$VendorSessionToken =
$VendorAddResult['Result']['header']['sessionToken'];
print("VST "); print($VendorSessionToken); print("<br>
");
if ($VendorSoap->fault)
{
print_r($VendorAddResult);
echo "";
}
else
{
$VendorError = $VendorSoap->getError();
if ($VendorError)
{
echo "<h2>Error</h2>" . $VendorError . "";
}
else
{
echo "<h2>Result</h2>";
print_r($VendorAddResult);
echo "";
}
}
echo "<h2>Request</h2>";
print_r($VendorSoap->request); print("<br>
");
echo "" . htmlspecialchars($VendorSoap->request, ENT_QUOTES) . "";
echo "<h2>Response</h2>";
echo($VendorSoap->response); print("<br>
");
echo "" . htmlspecialchars($VendorSoap->response, ENT_QUOTES) . "";

print("VR "); var_dump($VendorAddResult);

View Replies !
Exec(curl --proxy ....) Or Passthru(curl --proxy....)
I am trying to do some proxy stuff , I am able to retrieve the page but not able to catch the return , what I am doing is

passthru("curl --proxy 195.115.142.120:80 xyz.com");

or

exec("curl --proxy 195.115.142.120:80 xyz.com");

It throws the results (displays the xyz.com) to my page but I want to catch that in a variable like

$variable=passthru("curl --proxy 195.115.142.120:80 xyz.com");
or
$variable=(some php fucntion)("curl --proxy 195.115.142.120:80 xyz.com");

echo $variable ,

should give me the page.

View Replies !
Connecting To Mysql But Not Connecting
I'm including a database connection file from another website. eg. include(http://domain1.com/dbc.inc.php) is in my page on domain2.com - now I tihnk both these domains are on the same server but I tihnk thats probably irrelevant.

The issue is that the file includes and runs perfectly, it says it has successfully established a mysql connection, however when I try to use that connection it says there is no connection... or more correction it says Warning: mysql_query(): Access denied for user 'nobody'@'localhost' (using password: NO) in ...

Warning: mysql_query(): A link to the server could not be established in...

which usually means, you forgot to include your db script dummy. now I could just create 'dummy' pages that just have include(domain1.com/pagename.php) and that would work because we do a similar thing on other pages to grab the content.

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 !
.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 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 !
PHP Security - Some Common Security Pitfalls That Are Inherent In The Language?
I'm working on developing an application in PHP4/MySQL and I've got very little experience with either. Most of my work is in ASP/Access and compiled programs. The app that I'm developing doesn't need to be perfectly secure, but I want to avoid common pitfalls, and I have no idea where to start.

From your experience, what are some common security pitfalls that are inherent in the language? I shouldn't have any trouble with program logic being an issue, just stuff that may be PHP specific. (Like the User being able to put anything that they'd like in the QueryString and having that show up as a variable in the script).

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 !
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 !
How Would Php Security Compare To Java Security?
I just want to know how would php security compare to java security? Its because that me and my officemate are developing a site which would handle confidential documents and we just cant decide on whether we should use php or java. Please do post you opinions regarding this and it would even be better if you could also post links to write-ups about php security.

View Replies !
Security - What Security Dangers Should I Be Aware Of?
I am quite new to PHP but I have managed to write a simple page create script. So far the script does not have any user input. It does open/write files and it also accesses my MySQL database. No variables are passed from script to script either.

My question is, what security dangers should I be aware of? My other question is, can you download a php file and view the contents?

View Replies !
PHP Proxy
I'm creating a php-proxy just by passing the request to the correct server and spitting out the reply from that server, but i ran into a small problem concerning cookies. I cannot create a cookie at the client side under the same name as the server that actually send it. Anyone have any ideas as in how to solve this or any example of an existing php-proxy?

View Replies !
Proxy IP
I am using $REMOTE_ADDR to try to get the client's IP address but I get the proxy's. I heard $HTTP_X_FORWARD_FOR could be used but it doesn't work.

View Replies !
PHP As Web Proxy ?
I need to use a PHP app as a sort of a web proxy
To be more specific:

I have a mailserver with own web server and web interface. What want it to
be able to dynamically change its output pages (but I cannot interface
directly PHP with its web browser)

So, suppose the web mail server runs on

http://www.webserver.com

and I have my site at

http://www.myphpserver.com

What I need is user to connect to
http://www.myphpserver.com/webserver/index.htm, and when my PHP webserver
receive this request, it will request the page from
http://www.webserver.com/index.htm. Then it will make some processing on the
returned HTML page (like changing CSS, adding banners, rewrite form's Action
parameter, etc), and will return this page to client.

When client will post a page (like clicking on a submit button), my php page
will receive it, and pass it to original action URL together with all
POST-ed data

View Replies !
IPA Behind Proxy
Is there a way to retrieve IP address behind a proxy?



View Replies !
Hidden IP, Or Proxy ! Help Me !
how can I hidden my IP when I connect Internet !
Or how can I hidden my IP from request HTTP?

Ex:
<form action="url" method="post">
<input name="name" >
<input type=submit name="submit">
</form>

Now, when I submit this form, it will send infomation to server, and the server will know IP of my computer. So, how can I hidden my IP or it will not real IP?

View Replies !
Skip Proxy Use
I'm developing a website that will work as intranet.

The user use a proxy for internet access.

Sometimes, the website is slow, I know that the reason is because the web browser has setup a proxy.

So, how can I develop a instruction that my website don´t use the proxy?.

View Replies !
Using A Http Proxy
I've been trying to get PHP to access all http data via a proxy server - this is the only way I can get anything from port 80 on my Uni connection. I've checked phpinfo() and the environmental variable http_proxy seems to be set, but fopen("http://...") isn't working... I really need to make this work.

View Replies !
Proxy Authorization
Has anyone done proxy authorization via PHP? I need to automatically authenticate through our squid proxy to go through the intranet and was wondering if this was possible via PHP. I've tried a small test by sending the Proxy-Authorization header with a base64 encoded user/pass according to the RFC, but I can't get it to work. PHP Code:

View Replies !

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