|
-
Jun 12th, 2002, 04:52 PM
#1
Thread Starter
Hyperactive Member
CGI script blocked by proxy. Need help!
I have a CGI script that contacts another website to retrieve some information. I have now moved my website internally instead of on a virtual host. I am running Apache web server 1.3 and have EVERYTHING working except this one part of the script, because we use a proxy server here and it is blocking the script from contacting the other site. Here is the code:
Code:
$port = 80;
$remote = "www.anothersite.com";
$iaddr = inet_aton($remote);
$paddr = sockaddr_in($port,$iaddr);
$function = "GET"; #Type of HTTP
connect(S,$paddr) or die $!;
It dies everytime... because the proxy server won't let it out. How can I configure this to work with my proxy server??
Thanks for any help!
"If I had known it was going to be that kinda party, I would have stuck my disk in the mash potatos!"
-
Jun 20th, 2002, 04:09 PM
#2
Thread Starter
Hyperactive Member
Cool! Thanks!
I am setup just like you are, localhost... everyone at the office just types my internal ip address and the site pops up.
Thanks again... I am looking forward to what you find!
"If I had known it was going to be that kinda party, I would have stuck my disk in the mash potatos!"
-
Jun 20th, 2002, 09:37 PM
#3
is inet_aton a subroutine you built?
-
Jun 21st, 2002, 07:57 AM
#4
Thread Starter
Hyperactive Member
No, it is a function within Perl I am asssuming. I looked it up on the internet by putting inet_aton in google and it tells what it does.. can't remember off hand though.
"If I had known it was going to be that kinda party, I would have stuck my disk in the mash potatos!"
-
Jun 21st, 2002, 12:19 PM
#5
well mine said undefined function so I was curious
-
Jun 21st, 2002, 12:44 PM
#6
Thread Starter
Hyperactive Member
ok.. yeah i think it is a function of the Socket library??? i have this at the top of the script as well
use Socket ();
"If I had known it was going to be that kinda party, I would have stuck my disk in the mash potatos!"
-
Jun 21st, 2002, 12:50 PM
#7
oh ok i will try that as well.I will get back to you bu tI think I will still stand with what I said the first time.
-
Jun 21st, 2002, 03:43 PM
#8
Thread Starter
Hyperactive Member
cool.. thanks.
i have been reading a little more in depth and i think you are correct about it not allowing outside the intranet...
oh well... i have red hat 7.3 on the way... then we will see if i can get it working.
thanks for your advice.
looking forward to your response.
"If I had known it was going to be that kinda party, I would have stuck my disk in the mash potatos!"
-
Jun 21st, 2002, 11:12 PM
#9
I still get this error
Undefined subroutine &main::inet_aton called at c:\PROGRA~1\APACHE~1\APACHE\HTDOCS\CGI-BIN\OUT.PL line 6
and that is the $iaddr = inet_aton($remote); line
-
Jun 24th, 2002, 08:08 AM
#10
Thread Starter
Hyperactive Member
Hhhmmm... I think my experience is not good enough to figure this out easily.
I am going to try it on the other side of the proxy server and verify that it is Apache not letting me out and not the code.
Thanks so much for your help!!
"If I had known it was going to be that kinda party, I would have stuck my disk in the mash potatos!"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|