User Name
Password

Go Back   Planetarion Forums > Non Planetarion Discussions > Programming and Discussion
Register FAQ Members List Calendar Arcade Today's Posts

Reply
Thread Tools Display Modes
Unread 2 Apr 2005, 16:21   #1
flikman
Idiot
 
Join Date: Jun 2004
Posts: 133
flikman can only hope to improve
http://jpaweb01.planetarion.com/ cannot be resolved to an IP Address

I'm having trouble resolving http://jpaweb01.planetarion.com/ to an IP Address.

I'm trying to send a GET request to the server for the page. My code works for a dummy html file, but its struggling with the subdomain I think.

Any ideas?
flikman is offline   Reply With Quote
Unread 2 Apr 2005, 17:39   #2
Phil^
Insomniac
 
Phil^'s Avatar
 
Join Date: May 2003
Posts: 3,583
Phil^ spreads love and joy to the forum in the same way Jesus wouldPhil^ spreads love and joy to the forum in the same way Jesus wouldPhil^ spreads love and joy to the forum in the same way Jesus wouldPhil^ spreads love and joy to the forum in the same way Jesus wouldPhil^ spreads love and joy to the forum in the same way Jesus wouldPhil^ spreads love and joy to the forum in the same way Jesus wouldPhil^ spreads love and joy to the forum in the same way Jesus wouldPhil^ spreads love and joy to the forum in the same way Jesus wouldPhil^ spreads love and joy to the forum in the same way Jesus wouldPhil^ spreads love and joy to the forum in the same way Jesus wouldPhil^ spreads love and joy to the forum in the same way Jesus would
Re: http://jpaweb01.planetarion.com/ cannot be resolved to an IP Address

what language are you using
what code are you using to try to get the page
have you tried it with other internet servers or just a test on localhost

( also be aware using bots gets your account closed if its for automating things on an ingame account. - i sincerely hope you`re trying to access the botfiles )
__________________
Phil^
Phil^ is offline   Reply With Quote
Unread 3 Apr 2005, 13:54   #3
flikman
Idiot
 
Join Date: Jun 2004
Posts: 133
flikman can only hope to improve
Re: http://jpaweb01.planetarion.com/ cannot be resolved to an IP Address

<?php

$fp = fsockopen("http://jpaweb01.planetarion.com", 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno) :S<br />\n";
} else {
$out = "GET /showscan.pl?scan_id=xxxx HTTP/1.1\r\n";
$out .= "Host: jpaweb01.planetarion.com\r\n";
$out .= "Connection: Close\r\n\r\n";

fwrite($fp, $out);
while (!feof($fp)) {
echo fgets($fp, 128);
}
fclose($fp);
}

?>

It produces output

Success (0)

but thats an error message :S

Trying to open scan pages

Last edited by flikman; 3 Apr 2005 at 14:00.
flikman is offline   Reply With Quote
Unread 3 Apr 2005, 15:21   #4
queball
Ball
 
queball's Avatar
 
Join Date: Oct 2001
Posts: 4,410
queball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so little
Re: http://jpaweb01.planetarion.com/ cannot be resolved to an IP Address

Just look at the difference between your code and the example code on http://uk.php.net/fsockopen
You're using http:// before the hostname. But you want a TCP connection. So leave it out.

You might find using PHP's curl support easier. Or learning Perl.

You're not allowed to access your account in any other way than through a browser. See 18.3 in the User Agreement.

Last edited by queball; 3 Apr 2005 at 15:28.
queball is offline   Reply With Quote
Unread 3 Apr 2005, 16:49   #5
Banned
Banned
 
Banned's Avatar
 
Join Date: Jul 2003
Location: ******
Posts: 2,326
Banned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so little
Re: http://jpaweb01.planetarion.com/ cannot be resolved to an IP Address

Quote:
Originally Posted by queball
You're not allowed to access your account in any other way than through a browser. See 18.3 in the User Agreement.
The resource he is using, show_scan.pl, doesn't require an account to access.
Banned is offline   Reply With Quote
Unread 3 Apr 2005, 19:22   #6
flikman
Idiot
 
Join Date: Jun 2004
Posts: 133
flikman can only hope to improve
Re: http://jpaweb01.planetarion.com/ cannot be resolved to an IP Address

Quote:
Originally Posted by Banned
The resource he is using, show_scan.pl, doesn't require an account to access.
Indeed
flikman is offline   Reply With Quote
Unread 3 Apr 2005, 20:30   #7
Structural Integrity
Rawr rawr
 
Structural Integrity's Avatar
 
Join Date: Dec 2000
Location: Upside down
Posts: 5,300
Structural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriend
Re: http://jpaweb01.planetarion.com/ cannot be resolved to an IP Address

Still, what queball said is right. Prefixing with "http://" will break stuff. "jpaweb01.planetarion.com" it should be, without trailing slash even.
Anything behind the slash is done by the HTTP protocol.
However, can't you do a file open in PHP to retrieve pages from other servers?
__________________
"Yay"
Structural Integrity is offline   Reply With Quote
Unread 3 Apr 2005, 20:34   #8
Structural Integrity
Rawr rawr
 
Structural Integrity's Avatar
 
Join Date: Dec 2000
Location: Upside down
Posts: 5,300
Structural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriend
Re: http://jpaweb01.planetarion.com/ cannot be resolved to an IP Address

This should do the trick too I believe. I use it for parsing a POTD page.
Code:
$website = $website = "http://japanese.about.com/";
$page = "index.html";

$f = fopen($website . $page,"r");
while (!feof($f)) 
{
	$text .= fread($f, 8192);
}

fclose($f);
__________________
"Yay"
Structural Integrity is offline   Reply With Quote
Unread 3 Apr 2005, 20:43   #9
flikman
Idiot
 
Join Date: Jun 2004
Posts: 133
flikman can only hope to improve
Re: http://jpaweb01.planetarion.com/ cannot be resolved to an IP Address

Thanks,

the fopen may indeed work but I wanted to try out a manual GET request.
flikman is offline   Reply With Quote
Reply



Forum Jump


All times are GMT +1. The time now is 18:24.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2018