[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

address server

marco

1/2/2007 1:20:00 PM

Hi
Do you know a method for find address of the server ?
I have to do an "if" to find if I am in localhost:3000 or in
mydomain.com

Thank you an happy new year.
Marco

4 Answers

Robert Klemme

1/2/2007 1:34:00 PM

0

On 02.01.2007 14:19, marco wrote:
> Do you know a method for find address of the server ?
> I have to do an "if" to find if I am in localhost:3000 or in
> mydomain.com

In what kind of application?

robert

marco

1/2/2007 2:11:00 PM

0

In a web application

On Jan 2, 2:34 pm, Robert Klemme <shortcut...@googlemail.com> wrote:
> On 02.01.2007 14:19, marco wrote:
>
> > Do you know a method for find address of the server ?
> > I have to do an "if" to find if I am in localhost:3000 or in
> > mydomain.comIn what kind of application?
>
> robert

Robert Klemme

1/2/2007 3:01:00 PM

0

On 02.01.2007 15:11, marco wrote:
> In a web application

Often you can get this information from the URL of the current page.

Other than that you can derive this from the socket if you have access
to it:

http://ruby-doc.org/stdlib/libdoc/socket/rdoc/classes/Socket.ht...

And, please don't top post. Thank you!

Kind regards

robert

Tim X

1/3/2007 6:36:00 AM

0

"marco" <marco.burlando@gmail.com> writes:

> In a web application
>
> On Jan 2, 2:34 pm, Robert Klemme <shortcut...@googlemail.com> wrote:
>> On 02.01.2007 14:19, marco wrote:
>>
>> > Do you know a method for find address of the server ?
>> > I have to do an "if" to find if I am in localhost:3000 or in
>> > mydomain.comIn what kind of application?
>>
>> robert
>

I'm suspecting your asking the wrong question. Can you expand a bit more on
what exactly you need to do and/or why you need to know this. Also, are you
talking about working this out from the client perspective or from within your
code on the server?

Tim


--
tcross (at) rapttech dot com dot au