PHP: how to access whois server through proxy ?

This is a discussion on PHP: how to access whois server through proxy ? within the PHP General forums, part of the PHP Programming Forums category; Hi, I need to connect to whois server through proxy in PHP. I know how to use HTTP proxy and ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-08-2006
fastneasy@gmail.com
 
Posts: n/a
Default PHP: how to access whois server through proxy ?

Hi,

I need to connect to whois server through proxy in PHP.
I know how to use HTTP proxy and i know how to access whois
server, but i don't know how to combine both.

Below is code i use, i will be very thankful for any help:


----------
$proxy_sock = "68.250.64.89";
$sock_port = 8941;

$proxy_http = "195.246.155.194";
$http_port = 80;

$request_url = "http://www.google.com/";
$whois_server = "whois.verisign-grs.com";
$domain = "domain google.com";


//WORKING SHOW HTTP THROUGH PROXY
/*
$proxy_fp = fsockopen($proxy_http, $http_port);

if (!$proxy_fp) {
echo "error opening proxy";
}
else {

fputs($proxy_fp, "GET $request_url HTTP/1.0\r\nHost:
$proxy_http\r\n\r\n");
while(!feof($proxy_fp)){
$line = fgets($proxy_fp, 4000);
print($line);
}
echo "Success !";
}

fclose($proxy_fp);
*/


//WORKING GET WHOIS INFO DIRECTLY
/*
$whois_server = "whois.verisign-grs.com";
$domain = "domain google.com";
$connection = @fsockopen($whois_server, 43);

if (!$connection) {
unset($connection);
$this->msg = "Can't connect to the server $whois_server !";
return;
}
else
{
sleep(2);
fputs($connection, "$domain\r\n");

while (!feof($connection)) {
$line = fgets($connection, 4096);
echo $line."<BR>";
}
}

fclose($connection);
*/
---------------

Thanks!

Reply With Quote
  #2 (permalink)  
Old 02-09-2006
fastneasy@gmail.com
 
Posts: n/a
Default Re: PHP: how to access whois server through proxy ?

anyone ?

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:39 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0