Jump to content

Get WebPage Internally


2tonejoe

Recommended Posts

I have a web server that on an internal network that is available to the outside world. We will call it server A. I also have web servers B,C,D,E on the internal network and are not available to the outside world.

 

I want to be able to have a visitor, from the outside word, visit the server A and view the contents of pages on servers B,C,D,E via a DIV or iFrame. How can I do this via php?

Link to comment
https://forums.phpfreaks.com/topic/82079-get-webpage-internally/
Share on other sites

This is difficult to do without handling your firewall. You need to access to the internal servers for inbound call. But you can change the to a different port than using the default port 80(http) and then call the URL using the port no in the server A:new_port in your iframe scr parameter.

Let me know this helps.

 

Regards

Rajesh R R

________________

www.rajeshrr.com

-------------------

Dreams are for ever

-------------------

  • 3 weeks later...

can someone give me an example of how to use this with with a dynamic link. . .I mean. . . .example:

 

i have a LAN address of 'http://111.111.111.111/searchImage.php?img='. This is only accessible internally. I want to be able to have a user to the website, from an external network, enter in an image name (ie: bigbeercan) that I will route internally as 'http://111.111.111.111/searchImage.php?img=bigbeercan'. Then show the results of the web request to the external user. . .

 

I think mod_proxy is right, I am just confused on how to go about getting this to work. .

Put the following in a .htaccess here:

 

externalserver/websiteroot/searchfolder/.htaccess

 

#########

RewriteEngine on

Rewriterule ^(.*)$ http://111.111.111.111/$1 [P]

#########

 

Then accessing via the URL:

http://externalserverip/searchfolder/searchImage.php?img=bigbeercan

will behind the scenes return:

http://111.111.111.111/searchImage.php?img=bigbeercan

 

-steve

 

 

is there something I need to turn on in apache? I have it setup like the following:

 

.htaccess inside of folder 'image':

#########

RewriteEngine on

Rewriterule ^(.*)$ http://111.111.111.111/CGI/findphoto/$1 [P]

#########

 

outside url:

http://production.tradermediausa.com/scripts/image/34123890239

 

this is returning a 404 error.

 

am I doing something wrong?

1. Make sure mod_proxy is enabled in httpd.conf

2. Make sure mod_rewrite is enabled in httpd.conf

3. Check access.log and error.log on BOTH http://111.111.111.111 and http://production.tradermediausa.com

 

On your private lan/111.111.111.111 server make sure the following works:

http://111.111.111.111/CGI/findphoto/34123890239

If the above ^ doesnt work locally, then it wont work externally.

 

Try it first with a simple image with no script.

Put "image.jpg" in http://111.111.111.111/CGI/findphoto/

Try and access it via: http://production.tradermediausa.com/scripts/image/image.jpg

 

-steve

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.