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

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

Notices


Closed Thread
 
Thread Tools Display Modes
  #1  
Old 11-04-2008, 01:51 AM
alexander7567's Avatar
alexander7567 alexander7567 is offline
Junior Member
 
Join Date: Nov 2008
Posts: 4
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!
  #2  
Old 11-06-2008, 06:45 PM
thapame
Guest
 
Posts: n/a
Default

Code:
<?php
$var = file_get_contents('http://www.whatismyip.com/automation/n09230945.asp');
print $var;
?>
  #3  
Old 12-03-2008, 02:15 PM
Andrew Spencer Andrew Spencer is offline
Junior Member
 
Join Date: Dec 2008
Posts: 1
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'];

?>
  #4  
Old 12-16-2008, 12:01 AM
romantic romantic is offline
Junior Member
 
Join Date: Dec 2008
Posts: 12
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
http://nadeausoftware.com/articles/2...g_curl#Example
  #5  
Old 12-16-2008, 12:02 AM
aziernest's Avatar
aziernest aziernest is offline
Member
 
Join Date: Sep 2008
Location: @.whatismyip.com
Posts: 36
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 http://us3.php.net/language.variables
Closed Thread

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 12:47 AM.


What Is My IP - IP Command Lines - What is an IP Address - Speed Test - IP Address FAQ

Need IP address location detection service? Get it from IP2Location.com now.

Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright - WhatIsMyIP.com