how to move data from one webpage to another

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
manxman
Forum Newbie
Posts: 1
Joined: Wed Jan 23, 2008 7:21 pm

how to move data from one webpage to another

Post by manxman »

I have tried researching this but the obvious terms (post, get) are too common. (the search on this site refuses those terms) They all mention doing it with forms. I have successfully used a form to post data to another webpage.

What I really want to do is post that data without using a form. Basically straight from a database to another website. I have read that using the http://www.webpage.com/?variable1=something method will not work for large amounts of data (say, several large paragraphs of text)

Can someone give me a head start on this? If I can just find some decent references or even better search terms, I can probably put together the code.

thank you

Richard
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Re: how to move data from one webpage to another

Post by Kieran Huggins »

There are 2 decent options for what you're trying to do:

Connect to the foreign database and insert the rows directly. You'll likely have to grant SQL connection access to the remote client, but then it would be just the same as having a local DB. This is likely the simplest option.

Another option is to set up a REST interface on the server with the DB and hit it with a POST request, which is essentially like submitting a form. You'd use the CURL functions to access the REST interface from the client.
Post Reply