I need to send information to another page outside my server. Let's say the URL is www.site.com/theme.asp?ACTION=EDIT&DETAIL=1013 Now on my server, what would I have to make to send and post information to that page to a textbox called "username"? It would kinda be like a remote controller... The submit code on the page: <input type=hidden name="FORMACTION" value="SAVEEDITED"> <input type=hidden name="FORMDETAIL" value="1013"> <input type="submit" name="submit" value="Save Modifications" alt="Save Modifications"> </form> HTML: So basically it let's me set a username on that other page but I'd like to be able to set it by not going to that page, by doing it on my own server. Edit: I was going to copy the page's source code and put it on my site, and when I submit info it will post to the URL of the original site. Some simple form trick in the end or something difficult? It's probably pure html...
First you need to collect exact form fields, then make sure the remote site accepts another domain. another solution is use CURL to do everything transparently. Here is your code purified: <form method="post" action="www.site.com/theme.asp?ACTION=EDIT&DETAIL=1013"> <input type=hidden name="FORMACTION" value="SAVEEDITED"> <input type=hidden name="FORMDETAIL" value="1013"> <input type="submit" name="submit" value="Save Modifications" title="Save Modifications"> </form> HTML: Btw, use proprty "title" instead of "alt" for non-image items. I hope it helps.
Easy way, look into cURL and pay special attention to the curl_setopt page of the PHP cURL manual. Tough way, create HTTP requests manually starting with fsockopen.
There are a million different pre-existing classes for performing this task so you don't need to spend time writing your own. cURL is one, but I find the PEAR HTTP_Request package (http://pear.php.net/package/http_request/redirected) cleaner and easier to use. Snoopy (http://sourceforge.net/projects/snoopy/) isn't bad either, and it's probably the simplest of the 3.