What Is My IP Address? - IP Address Lookup, Bandwidth Speed Test, IP Info, plus more

WhatIsMyIP.com: The fastest, easiest way to determine your IP address.



Go Back   What Is My IP Forum > All About Code > Coding Problems


Reply
 
Thread Tools Display Modes
  #1  
Old 11-04-2008, 02:51 AM
alexander7567's Avatar
alexander7567 alexander7567 is offline
Junior Member
 
Join Date: Nov 2008
Posts: 6
Default PHP help

ok so i noticed that there is a automation page. i like that.. but there is one problem.. i code most of my pages in php, but i am fairly new at it, so idk how to make that turn into a variable in php. all i need is jus a little snippet of code if some one knows! this will unlock so many new abilities 4 me in php.

In case u didnt catch on, im one of those ppl who likes to learn new things about coding and what not.. so any help would be appreciated.

Oh, also, if someone could look at my website AlexRiggs.com and tell me any suggestions that would be great. Im trying to make my own login system, and i think i have it, but i jus need advice from a expert!

Any help is greatly appreciated! Thx ahead of time!
Reply With Quote

  #2  
Old 11-06-2008, 07:45 PM
thapame
Guest
 
Posts: n/a
Default

Code:
<?php
$var = file_get_contents('http://www.whatismyip.com/automation/n09230945.asp');
print $var;
?>
Reply With Quote
  #3  
Old 12-03-2008, 03:15 PM
Andrew Spencer Andrew Spencer is offline
Junior Member
 
Join Date: Dec 2008
Posts: 4
Default

so you're trying to get the IP address of the server executing the script? why are you using this service when there's a predefined variable to give you the IP anyway?

PHP Code:
<?php

$wimi 
$_SERVER['SERVER_ADDR'];

?>
Reply With Quote
  #4  
Old 12-16-2008, 01:01 AM
romantic romantic is offline
Junior Member
 
Join Date: Dec 2008
Posts: 18
Default

If you have curl then try this coding
$result = get_web_page( $url );

if ( $result['errno'] != 0 )
... error: bad url, timeout, redirect loop ...

if ( $result['http_code'] != 200 )
... error: no page, no permissions, no service ...

$page = $result['content'];

or read this page
[url]http://nadeausoftware.com/articles/2007/06/php_tip_how_get_web_page_using_curl#Example[/url]
Reply With Quote
  #5  
Old 12-16-2008, 01:02 AM
aziernest aziernest is offline
Member
 
Join Date: Sep 2008
Location: @.whatismyip.com
Posts: 50
Send a message via MSN to aziernest Send a message via Yahoo to aziernest
Default

I think WIMI is using

Quote:
<?php
$wimi = $_SERVER['REMOTE_ADDR'];
?>
instead of

Quote:
<?php
$wimi = $_SERVER['SERVER_ADDR'];
?>
One good resource for showing php ip related variable is at [URL]http://us3.php.net/language.variables[/URL][URL="http://www.adamek.biz/php.php"][/URL]
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 08:28 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright - WhatIsMyIP.com