PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 7th, 2013, 02:40 AM
Sarath_PHP Sarath_PHP is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 20 Sarath_PHP User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 11 m 46 sec
Reputation Power: 0
PHP-General - Ip address

Hi,

I have domain quinnstheprinters.ie. Iam redirect this domain to quinnstheprinters.com. How can i get the ip address of quinnstheprinters.ie and quinnstheprinters.com Please help

Regards,
Sarath_PHP

Reply With Quote
  #2  
Old February 7th, 2013, 02:47 AM
Jacques1's Avatar
Jacques1 Jacques1 is online now
pollyanna
Click here for more information.
 
Join Date: Jul 2012
Location: Germany
Posts: 1,882 Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 2 Days 10 h 16 m 3 sec
Reputation Power: 813
Let me google that for you, dear friend:

http://lmgtfy.com/?q=php+get+ip+domain

Reply With Quote
  #3  
Old February 7th, 2013, 04:45 AM
Sarath_PHP Sarath_PHP is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 20 Sarath_PHP User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 11 m 46 sec
Reputation Power: 0
Ipaddress

Hi friend,

I checked in google, iam getting ip address of quinnstheprinters.com, but not getting ip address of quinnstheprinters.ie.

I used command prompt, for checking ip address of domains.The result is 78.153.212.173 (quinnstheprinters.ie) and 174.123.213.184 (quinnstheprinters.com).

The php code i used:

1 : In the case of quinnstheprinters.com

<?php
$IPaddress = $_SERVER['SERVER_ADDR'];
echo $IPaddress;
?>

Result is : 174.123.213.184


2 : In the case of quinnstheprinters.ie

<?php
$IPaddress = $_SERVER['SERVER_ADDR'];
echo $IPaddress;
?>

Result is : same as quinnstheprinters.com


How can i get ip address of quinnstheprinters.ie?

Regards
Sarath_PHP

Reply With Quote
  #4  
Old February 7th, 2013, 04:50 AM
Sarath_PHP Sarath_PHP is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 20 Sarath_PHP User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 11 m 46 sec
Reputation Power: 0
Hi Jacques1,

I checked in google, iam getting ip address of quinnstheprinters.com, but not getting ip address of quinnstheprinters.ie.

I used command prompt, for checking ip address of domains.The result is 78.153.212.173 (quinnstheprinters.ie) and 174.123.213.184 (quinnstheprinters.com).

The php code i used:

1 : In the case of quinnstheprinters.com

<?php
$IPaddress = $_SERVER['SERVER_ADDR'];
echo $IPaddress;
?>

Result is : 174.123.213.184


2 : In the case of quinnstheprinters.ie

<?php
$IPaddress = $_SERVER['SERVER_ADDR'];
echo $IPaddress;
?>

Result is : same as quinnstheprinters.com


How can i get ip address of quinnstheprinters.ie?

Regards
Sarath_PHP

Reply With Quote
  #5  
Old February 7th, 2013, 06:13 AM
Jacques1's Avatar
Jacques1 Jacques1 is online now
pollyanna
Click here for more information.
 
Join Date: Jul 2012
Location: Germany
Posts: 1,882 Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 2 Days 10 h 16 m 3 sec
Reputation Power: 813
It's not possible -- at least there's no reliable way to do it with your current setup.

What this "redirect" actually does is tell the user's browser that the page is now at a different location. The browser will then typically request the page at the new location. But there's no connection between the two request. There's no information about the original page (like the referrer).

What you could do is append this information to the new URL:
PHP Code:
 header('Location: http://quinnstheprinters.com?origin=ie'); 

But I'm pretty sure that's not what you want.

You'll need a more advanced technique like a proxy to keep the information about the original page. But I'm no expert on that topic.

Reply With Quote
  #6  
Old February 10th, 2013, 10:50 PM
Sarath_PHP Sarath_PHP is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 20 Sarath_PHP User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 11 m 46 sec
Reputation Power: 0
hi Jacques1,


Thanks for your reply.

Reply With Quote
  #7  
Old February 12th, 2013, 03:03 AM
Sarath_PHP Sarath_PHP is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 20 Sarath_PHP User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 11 m 46 sec
Reputation Power: 0
Hi Jacques1,

Actually i didn't get the result so i was add another post. So please let me know, do i need to host quinnstheprinters.ie as seperate website.

Reply With Quote
  #8  
Old February 12th, 2013, 10:39 AM
Jacques1's Avatar
Jacques1 Jacques1 is online now
pollyanna
Click here for more information.
 
Join Date: Jul 2012
Location: Germany
Posts: 1,882 Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 2 Days 10 h 16 m 3 sec
Reputation Power: 813
I gave you two possibilities: Either you use a URL parameter to pass information about the original site, or you set up a proxy (and use the X-Forwarded-For header field to get the original IP).

Which one you use is up to you. If you go with the proxy, I cannot help you, because I don't know how exactly that works. Read that up yourself and use the Apache forum if there's something you don't understand.

Reply With Quote
  #9  
Old February 13th, 2013, 03:20 AM
Sarath_PHP Sarath_PHP is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 20 Sarath_PHP User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 11 m 46 sec
Reputation Power: 0
Hi Jacques1,

Thank u so much, i got it. I use URL parameter.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > PHP-General - Ip address

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap