homepage Welcome to WebmasterWorld Guest from 54.167.41.199
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
pass user ip
nick patrick




msg:3835700
 3:36 pm on Jan 27, 2009 (gmt 0)

i am looking for some thing like fopen but i dont want to open file with my server ip i want to open file with visitor ip is there any way to do this
when fopen open a file so it open with the server ip what for user ip pass ?

 

coopster




msg:3835911
 7:16 pm on Jan 27, 2009 (gmt 0)

You are trying to use fopen on a url on your own site? Why do that? If you want to open a file on your own server just use the filesystem path.

whoisgregg




msg:3836090
 11:29 pm on Jan 27, 2009 (gmt 0)

fopen can be used with URLs as well (if allow_url_fopen is enabled). [ fopen [us.php.net] ]

I believe nick patrick is trying to have the requests to a third party server look like they are coming from the user who initiated the request to his server?

If that is the case, the answer is "it's not possible." Even if you spoof the IP address, that would just mean your server wouldn't receive the response. On the internet, the IP you send is the IP which receives the reply.

nick patrick




msg:3836111
 11:49 pm on Jan 27, 2009 (gmt 0)

thats not the case server is my and i want to fopen my own file in the same server i have but file must echo out some thing like 'done' and i dont want it on the page where fopen is that is the case :)

coopster




msg:3836891
 10:38 pm on Jan 28, 2009 (gmt 0)

You can always use output buffering.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved