cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: please help

From: Mark E <mark_at_edwards.org>
Date: Sat, 27 Oct 2007 15:14:21 -0600

sunil kumar wrote:
> Dir
>
> how to redirect a url from one server to second server. and second
> server check the ip of first server from where the request comes.

Redirect - put this in the index file for the site with no other code in
the file:

<?php
header("Location: http://blah.com");
?>

Detect and print IP to the browser screen:

<?php
   $ip = $ip=$_SERVER['REMOTE_ADDR'];
   echo $ip;
?>

Mark
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2007-10-27