I am really new to php, and this is what I am trying to do.
I have a form:
<form method="post" action="something.com/get.php">
<tr height="5">
<td valign="top" style='font-family:verdana;font-size:8pt;'><br/>
<br/>Number: <br/>
<input type="text" name="number" size="20" maxlength="100" />
<input type="submit" name="submit"/>
</form>
Now the get.php is located on some other sever
After sending the post data I get something like this on "get.php"
<table border="1" cellpadding="2" cellspacing="2" width="400">
<tr>
<td>33721</td>
</tr>
Now my question and problem is I don't want to reveal the location of get.php.
So since I am new to php or any type of web programing, I am not sure how to do this.
What I had in mind was if I could make a php file which will get the post data from.
My form then pass it to the main page and then extract the contains from main page.
And display it to the user, I tried bunch of stuff like header and curl.
But non really worked probably because I am new, now I can't make any changes to the main page which is "get.php", so I have to find a another solution.
I would suggest that you need to use Apache's mod_rewrite to rewrite the url to something else.
So you could then hide the location of the script by having the url your form submits to as something like:
something.com/get
which could then be rewritten by mod_rewrite, something like this:
RewriteRule ^/get$ /path-to-script/get.php
This way you can put the script anywhere. You could then deny access to the script via the url. So if someone tries to access get.php directly they will get a forbidden error message from apache.
So altogether in your vhost you would have something like the following:
RewriteEngine On
RewriteRule ^/get$ /path-to-script/get.php [L]
RewriteRule ^/path-to-script/get.php - [F,NS]
What this effectively does is say rewrite url's of the form '/get' to /path-to-script/get.php and if someone tries to access /path-to-script/get.php directly (through the address bar), forbid it.
This way you can put get.php somewhere that is not obvious and also stop people from accessing it.
I realise this may be quite complicated if as you say you are new, but it something you may want to look into.