PHP Redirecting one page to another server without displaying a URL

Just by writing a title for this question, I know how dodgy it is!

I am writing a back end for storing information about volunteers for some friends, they have their own website where I can add a volunteer page. php.

I want this page to redirect the page on my server, showing a form to fill out by users, I would prefer that the ugly URL of my site does not show.

Is there an easy way to do this? How do I upload a page to a remotely hosted page?

Thanks,

Woof

+4
source share
4 answers

You can use <IFRAME> to display the page content of your sites without showing a URL.

+2
source

I assume that you only want to hide the URL for “ugly URL” reasons, not security (“what else is in this domain?”) Or bandwidth-related reasons). Some possible solutions ...

  • Download the form via iframe. Of course, if the user is generally inclined to technical analysis, he will be able to look at the source of the iframe and get your ugly URL.

  • Use reverse proxy. This will hide your server enough.

  • Download the application code into the contents of your remote file, and then display it on the page. See file_get_contents () .

Just remember: do you really want your friends to use your server bandwidth?

+1
source

mod_rewrite can be used if their server supports the use of [P] (proxy flag):

 ^/volunteer.php http://yourserver/volunteer.php?id=siteid [P] 

Something like this also makes it easy to determine which form you serve.

+1
source

An easy way is to use an iframe, as Josh K. said. An elegant way is to generate a form in the volunteer.php file and submit it to your server via AJAX so that the visitor never leaves his site. Iframes tend to ruin navigation.

0
source

Source: https://habr.com/ru/post/1307957/


All Articles