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.





Real IP Address From Behind Proxy Or NAT


How to get the real IP address of a user, not that of their proxy server or the external NAT address. I was quite sure that this wasn't possible without some kind of process getting the address on the client machine.

I have suggested that these sites could be using Java to get the real IP address, however, I could be wrong and for me the script that I found always returns 127.0.0.1 . This suggests to me that any script attempting to obtain the hosts real IP address infarct rely s on the HTTP-X-FORWARDED-FOR header sent by the proxy server...




View Complete Forum Thread with Replies

Related Forum Messages:
Real Ip Behind A Proxy
is there any way to know the real ip, for people behind a proxy?

View Replies !
Checking If Email Address Is Live And Real?
There's all kinds of ways to validate an email address to make sure
it's well formed and whatnot, but what about checking to see if it's a
valid e-mail account?
Like how you can use checkdnsrr() to check to see if a URL is valid.

I know finger used to be used at one time, no? But server block finger
requests, and I'm not sure many e-mail accounts out there are even
fingerable type accounts anyway.

View Replies !
Cannot Get IP Address Behind A Proxy Server
I got a parse error from this code... what did I do wrong?

<?
if (getenv(HTTP_X_FORWARDED_FOR))
$ipaddress = getenv(HTTP_X_FORWARDED_FOR);
else
$ipaddress = getenv(REMOTE_ADDR);
?>

View Replies !
User's "real" IP Address
I log a user's IP address into my database once they have voted on a specific item. Before voting, it checks to see if their IP address is in the database for the item.

This works fine, but there is a problem. AOL users seem to have a masked or "fake" IP address. If a user votes on the item from their AOL browser, it will let them vote multiple times because it doesn't doesnt seem to see that their real IP address is in the database. AOL users tell me that it lets them vote multiple times in their AOL browser but it works fine and only lets them vote once when they vote in their IE browser.

Is there any way of detecting if a user's "real" IP address is already in my database, so they cannot vote multiple times?

View Replies !
A Real Challenge For Real PHP Programmers
<?php
/*
A challenge to every PHP programmer.The one who's gonna solve this
problem would be deemed as

PSP(PHP Supreme Programmer).The problem is this : You have to write a
script that displays a list of

categories and subcategorieslike this one:

<select name="category">
<option value="1">Main</option>
<option value="2">Main > Computers</option>
<option value="4">Main > Computers > Hardware </option>
<option value="8">Main > Computers > Hardware > PC</option>
<option value="7">Main > Computers > Hardware > Mac</option>
<option value="9">Main > Computers > Hardware > Atari</option>
<option value="11">Main > Computers > Hardware > PC > History of
Pc</option>
<option value="">etc...</option>
</select>

The categories and subcategories details are stored in these two
tables in a MySQL database.
-categories : the categories names and ids.
-cat_relations : the relations between categories.It shows which
subcategory belongs to which category.
The belongings between categories can go very deep and the number of
categories is unlimited. This script will create the two tables and
fill them with sample data. All you need to do is to change the four
variables below. You can send the script back to this email :
yasbergy@yahoo.com.
*/

//Here starts the script. Please change the values of these variables
to fit your settings
$user = "prospective_PSP";
$database = "db";
$server = "localhost" ;
$pwd = "" ;
//Connection to the database that you created
mysql_connect($server,$user,$pwd) ;
mysql_select_db($database);
//Creation of the two tables : categories and cat_relations
$categories = " CREATE TABLE `categories` (`id` INT not null
AUTO_INCREMENT, `name` VARCHAR(100) not null , PRIMARY KEY (`id`),
INDEX (`id`), UNIQUE (`id`)) comment = 'The categories details' ";
mysql_query($categories) ;
$cat_relations = "CREATE TABLE `cat_relations` (`id` INT not null
AUTO_INCREMENT, `daughter_id` INT not null, `mother_id` INT not null ,
PRIMARY KEY (`id`), INDEX (`id`), UNIQUE (`id`)) comment = 'Which
category is the daughter of which category'";
mysql_query($cat_relations) ;

//Filling the two tables with sample data
$cats = array('Main','Computers','Countries','Hardware','S oftware','Programming
languages','Mac','PC','Atari','Winamp','History of the
PC','IBM','Components','High
level','USA','NYC','LA','Manhattan','India','Winzi p');
for ($i=0;$i<count($cats);$i++){
$sql = mysql_query("insert into categories (name)
values('".$cats[$i]."')");
}
mysql_query("insert into cat_relations (daughter_id,mother_id) values
(2,1),(3,1),(4,2),(5,2),(6,2),(7,4),(8,4),(9,4),(1 1,8),(12,8),(13,8),(10,5),(20,5),(14,6),(15,3),(16

,15),(17,15),(18,16),(19,3)");
//Now you can have a look on them through phpMyAdmin
?>

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 !
Use A Script That Has A Mail() Function And The Address Is To An Address Of The Same Domain As The Site
I just moved my php site to a new host. The previous host and the new one are both running the PHP 4.3.11. The sendmail path is the same.

If I use a script that has a mail() function and the address is to an address of the same domain as the site, it works ok. If it is to an outside address, it disappears. Though it returns it was a successful send.

View Replies !
Mail() Bounces To Server Address Instead Of From Address
All email sent from php mail() that bounces is being returned to my servers admin email address instead of the "From" or "reply-to" address.

What needs to be put in my header code to ensure that this does not happen?

View Replies !
Email Address Is Invalid Address
we are trying to use it andwe give it a perfectly valid "From address" and it comes back saying  the email address is invalid  address. Any ideas?

View Replies !
Getting The REAL Directory?
Is there any way to get the directory/path of the file running the script, not the directory you're inside (Via dir())? I'm allowing the user to navigate through directories, and that part works great - but whenever I attempt to used getcwd(), it returns the directory the user is in - not the directory of the php file - is there any way to get the directory of the .php file the user is using?

View Replies !
Real Estate MLS/IDX
I am trying to program an MLS/IDX search feature to be integrated into a real estate website. This progrom will allow MLS/IDX searching/browsing (searching by MLS #, house variables, etc) and browsing by property location, etc.

I have come accross RETS and have tried to go about it, but wow, maybe MLS/IDX is just some mythical database that doesn't exist? If anyone can help me out here. show some code, point me to a resource, tutorial, something that would be some assistance, I would bow down to them, and mail them one, yes, one ice cold root beer.

View Replies !
Resolve Real IP
I can get the apparent IP from $_SERVER['REMOTE_ADDR']; . However, how can I find the real IP if the user is behind a proxy? I know it must be possible as some "whatismyip" sites do it.

View Replies !
Mysql Real
I found this which I think calls for an indepth brain storming. A very good reading

[edited by: eelixduppy at 1:06 pm (utc) on Sep. 12, 2007]
[edit reason] fixed typo as per request [/edit]

View Replies !
Real-time Output?
I'm a relative PHP newbie, so I apologize if this is a simple question.

Anyway, here's my problem. I'm using a PHP script to pre-render a bunchload of insert files for an HTML page. Right now there's about 1,600, but that number could get much, much higher when the site goes live.

I'll only need to re-render the whole batch once or twice a year (if that) but it's still something I'd like to be able to do in case I have to move the site to a different server, or there's a hard drive crash or etc.

Basically what the script does is grab a whole bunch of information from a database and write the insert file. It does this for every single one.

The problem of course, is that PHP by default does all this server-side, and then sends it to the browser. Because this process takes like ten or twenty minutes to do, the browser times out long before it's finished.

Is there a way to get progressive output with PHP? Or do I need to re-do this in another language like Perl?

View Replies !
Real Length Of Arrays
Sometimes, I want to know how many elements are really in an array (php3).

The count() and sizeof() functions apparently return the number of non-empty array elements, and if you do a while loop checking for empty will stop on the first empty element.

I have been using the following function:
function truecount($theArray) {
if (is_array($theArray)) {
end($theArray);
return key($theArray);
}
}
but if the key is non-numeric, won't that trip me up?
Anyone have a better solution?

View Replies !
Md5 / Sha1 - Any Real Difference?
I use md5 hash with some of my cookies and occassionally a hidden form
field - I know the physical data on my network is insecure (unless being
served via https) but I was wondering if there are any advantages to using
md5 over sha1 or versa vicea... I know md5 gives me a unique 32bit hash
while sha1 I've read is 'secure' (?) and gives a 40bit hash... Since The
technical webpage on sha1 is lengthy and for the most part over my head...
and other than today, I've never heard of it before... I was wondering if
anyone could offer any comments on it...

View Replies !
Real Time Chat
There's anyone out there that can give me a light on real time chat using sockets. I've seen some using push technics but they all hang up after an elapsed amount of time.

View Replies !
Htmlspecialchars/real Escape
I'm creating a BBCode parser, and everything's working but one thing; I need code tags, but I will need to real_escape/htmlspecialchars the post to make sure it isn't malicious. The only problem is if I real_escape with code tags that contain php, the php will be removed. If I specialchars the post with php, I can't have syntax highlighting (or, not easily). How do I get round this?

View Replies !
Real-time Clock
Where should I start to write a Real-time Clock? I want it be dynamic, not static. I know how to get the time and display it but how do I keep changing it ?

View Replies !
My Real Estate Scripts
I have been writing a real estate agency program and its coming on well but taking longer than I thought. Also I think I am just re-inventing the wheel as I guess like BB scripts there are probably good free ones already writen in php and using mysql ? Can anyone recommend one.? can then continue learning while adapting it to my purposes.

View Replies !
REAL E-mail Validation
if there is a way to actually send an e-mail to the server and see if it bounces or not? What I'm trying to do is require users to enter a valid e-mail address on the front page before entering the site. I don't want to do simple character validation (check for @ and no special chars, etc, etc) but actually see if the e-mail account truly exists before letting them into the site.

View Replies !
Real-time Chat
I wrote a PHP chat system similar to gChat which simply uses constant ajax calls to update the chat. This system is fine for a few users, but with potentially thousands of users, it is much too hard on the server. I've been considering taking the 'Comet' route, but have heard that PHP can't handle Comet very well. What would be the best language/API to perform real-time chat for a large user-base?

View Replies !
Date In Real Time
It is possible to create a program which get the date in real time using PHP.

View Replies !
Real Time Sql Query
I am making a web-based chat but to get the msg from the database i need to refresh the page and that will make load and extra bandwidth on the server so i want to make the query in real time ( only the new msg to be received without refresh the whole page ), Any one in here knows how to get data from sql database without having to refresh page.

View Replies !
Real Media Player Pop Up
Does anybody have any idea on how to make a pop up player for playing streaming real media files like Code:

View Replies !
Mysql Real Escape
Upon entry into the database, I first clean form input data with html special characters, strip tags, and mysql real escape string. When I retrieve this data from the db, single quotes aren't coming out right on the pages. Some browsers display a question mark, others a blank space, and another (FireFox) totally screws up the text formatting.

View Replies !
Real Escape String
How can i add a escape string to this php mysql query.

mysql_query('insert into times (code, date, time, duration) values ("'.$course_code.'","'.$date_inSQL.'","'.$time_inSQL.'","'.$duration.'" )');

View Replies !
Real Audio Download Limiter
i'm running a site with .ra and .ram files, when some visitor download or stream all these files at the same time it causes an huge bandwidth consumption.

so i'd like to limit the download per each IP to a certain number of .ra and .ram files at time.

i wonder if i can use some php script with cookies session but i'm new to this and i don't know where to start.

View Replies !
Real Time Echo'ing Of Var In A Loop
i have a big loop, and rather then waiting until its done for me too see what happened, every time it runs, how can i get the browser to echo the result, and proceed to keep running the loop.

basically this loop takes a long time to finish, and i had to set my max runtime past 30 seconds. i guess incorporating a refresh of some sort like this would eliminate the need for the time extension too?

View Replies !
PHP Template Redirecting To Real Video
I've developed a RealVideo content management system w/ PHP and MySQL. On the back end is a form that sends a Real Video file (.rm) and writes the filename to a database. On the front end is a PHP template that pulls the filename from the database and outputs a string that is read in by a Flash movie. The Flash movie reads in the file location and places HTML-encoded text inside a text field that says "Launch Video."

All works fine -- the Flash movie launches the Real Video file, and the file plays correctly. There's only one problem: the Real Video doesn't stream.

In order for a Real Server to stream a Real Video file, a "stub" file with the extension .ram needs to be placed in the root directory. The only content in these .ram files is a URL pointing to the actual .rm file, and it's written in this format: pnm://ra.domainName.com/realvideoFile.rm

My problem: The form is sending a Real Video file and the receiving page is copying it to the server as well as inserting a record into my database, but it can't write a .ram file to the root directory because to do so I'd have to adjust permissions accordingly (PHP is part of group Apache). That's unacceptable; I won't adjust permissions on the root directory. My solution was to create a redirector that acts as the stub file:
PHP Code:

View Replies !
Real World Singleton Class Example?
Anybody can show me real world singleton class example?
Something that works (is implemented) as part of working solution.
Does it make sense to create database handler class that way?

View Replies !
Is Gmail Homepage Real Ajax?
I saw gmail's storage size on mail.google.com. It was counting size like "Over 2728.845439 megabytes". then increasing... but my dialup connection disconnected I don't understand howto count storage size, when my pc disconnected internet. is it real 2728.845439 MB? or only text?

View Replies !
Stripping Commas From Real Numbers
I have an HTML form in a PHP script which queries the user for a dollar amount of sales.
If a user enters "1,000,000" rather than "1000000" for 1 million, PHP (or MySQL?) treats the commas as a decimal and "1" is entered in the database.

A simple work-around is to simply advise the user "Please enter numbers only, no commas or $'s" but this seems awkward. Is there a built in function or another easy way to have commas and currency signs stripped out of form-entered data?

View Replies !
Can Curl Pretend As Real Browser?
Is curl can pretend to real browser when it get content and how set the browser that it pretend to?

View Replies !
Exploding At Real Breaks Not Wraps
I am working on reading my  pop3 email , and I am trying to return the header data using the function, I get this fine. The question I have is since there is no consistency to the rows, I want to take each row of data, not a wrap of a long line, any idea beyond checking if it has a : in it???

View Replies !
Creating A Real Estate Site
I am intereted in creating a real estate where I can place house for people to view. I would like to have each room viewable, customer login area, quote for house, 360 degree view of the room, slick looking site. Is there a script that will enable me to do such a thing, or do I need it created from scratch?

View Replies !
Real Time Form Update
i have a script that i wrote for my clan/guild/linkshell in this online game i play that keeps track of members, the points they receive from events, items etc. in the admin panel of the script where you can update peoples points i want to know if i can add a button or something similar that if you push it updates the points which is currently in another text box in the same form in real time.

I'm sorry if i'm not being clear, what i'm trying to do it make it quicker to update a members points because usually after each event they receive either 10 or 20 so i want to add a button where if you push it then it will put 10 or 20 in the 'add' box in real time. right now when you edit a member it shows their current points in a text box and under that two text boxes, one if you want to add points and another if you want to subtract points.

if this isnt possible then i assume that i'd have to make it update the points in the box and keep all the values from before and just reload the page with the new value inside the box. wow, i'm sorry if i'm not very clear, please ask questions if you dont understand what i'm trying to say.

View Replies !
Real-time Action Ala Games??
What would be a proper solution for automated decision making in a PHP script, like a game? That is, without an external application, or any human input. For example, any random event that happens when the player is away from the game. How would one go about implementing that?

View Replies !
Real Time Listbox Update
I have one listbox that I populate with

while($row = mysql_fetch_array($result, MYSQL_ASSOC)

I need to in real time populate another listbox from a related table based on what they have currently selected in the first listbox. Is this possible with php and if so.

View Replies !
Degugger On 5.2.2 (xampp 1.6.2) Real Brainer
I tried to get php dbg debugger working on my machine but it doesn't work at all. Ok, what i did:

copied php_dbg-5.2.x.dll (for PHP 5.2.x version) into my xampp/php/ext directory next, modified /xampp/apache/bin/php.ini file appending: Code:

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 !
How Convert Http:// Text To Real Hyperlink?
I have some texts in MySQL databases. When I show this texts in webpages using PHP, I need to convert every ocurrence of

http://blablabla.com

to

<a href='http://blablabla.com'>http://blablabla.com</a>

, so my text will really became 'active'. The people who wrote the texts don't know HTML tags so I can't ask them to write explicity <a...> </a> commands. The problem is the same with text that contains the @ charactere, as

name@mailserver.com

. I have to change this to

<a href='mailto:name@mailserver.com'>name@mailserver.com</a>.

Please, I don't know how to use regular expression. I think It can make this replacemments very easy..

View Replies !
Session - Store The Real Name And Username Of Somebody When They Have Logged In
All I want to do is store the real name and username of somebody when they have logged in, so when they want to change their details, they don't have to type in their real name and username. I thought about doing a global file then calling it in every php page, but that doesn't work. So I then thought of cookies, but everyone seems to hate cookies. So I then heard about sessions, I did a few tutorials, but I still can't get the hang of them.

All I want is the code that makes it so when they login to the database it pulls there stuff down (I can do that) but then store it in a session, so it can be used even when the go to a different page (I can't do that).

View Replies !
MySQL Result To Real Array In Function
I'd like to create a function which input is the result of a mySQL
query.
The output should be exactly the same, only not a mySQL result array,
but a 'real' array.
So it should also get the fieldnames returned by mySQL and use those as
keys.

I can't get things to work properly: it should return a
multidimensional array,
like

$result_array[1] = array(
[field1] => field1 value,
[field2] => field2 value,
etc.
)

somehow my result is (with code below)

$result_array[1] = array(
[0] => field1 value,
[field1] => field1 value,
[1] => field2 value,
[field2] => field2 value,
etc.
)

+++++ code ++++++

$get_res= mysql_query(QUERY);

if( $res = mysql_fetch_array( $get_res ) )
{

do{

$result[] = $res;

}while( $res = mysql_fetch_array( $get_res ) );

};

foreach( $result as $key => $value ){

print_r($value);

};

View Replies !
Real Good Content Management System ?
I'm getting somewhat annoyed about how many cms's
there are in PHP/MySQL while so few are really good.
Yesterday I started to like ezPublish, until I decided
the template language is ugly and the process for creating
a maintenance template for a content class is not logical.

I'm starting to think I should write my own cms, but that
will increase the leadtime for my site enormously.
So I would like to know from you if you know a cms that ..

- Is free and open source
- Is PHP/MySQL based ( usable with just about any host )
- Doesn't enforce site/navigation structure
- Has a WYSIWYG editor or one can easily be plugged in
- Has a forum module
- Is also an application framework with good
separation of content, code and layout.
- Does not have its own insane template language
- Supports a moderation process for content
- Has an intuitive process for creating maintenance forms
for posting and maintaining content.

I think Zope comes close, but that's Python :-(

View Replies !
Real Audio Http Streaming Without .ram File
I wanted a way to (http) stream Real Audio files without the need to use
..ram files. In case there are others interested in this, the following is
the solution that worked for me:

<?php
Header("Content-Type: audio/x-pn-realaudio");
echo "http://www.domain.com/audiofolder/track1.rm";
?>

View Replies !
Photo Gallery For A Real Estate Site
I am doing a photo gallery for a real estate site. I have one small question.  Each house is going to have 6-7 pictures being displayed. I am going to create an image table. The fields are image_id, image_url, image_name. The site will be able to upload the pictures themselves. 

My question is how should the insert work? Meaning, on the upload, the pictures need to be tied together. Should I have 5 upload buttons on the site rather than 1 button? I hope this makes sense.

View Replies !
Real Life Examples Of Mysql+session_set_save_handler
In my test setup using my own session handlers with session_set_save_handler and mysql, the session handler opens and close mysql connections.

But what if my page also requires some mysql queries? Should I open a new connection or use the already opened one (opened by the session handler)?

I have made it a good practice to close a connection after a query but if I do it with only connection open no session data will be written to my mysql table.

I have seen some scripts using persistent connections but are not sure what would be the best for a real world environment.

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 !

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