Jump to content

How to transfer information A-web to B-Web


Aman22

Recommended Posts

Hi there, 

How to work out??

We have our web page where we enter our client information.. Part A

Than same information we have to enter third party web page. Part B

How can we transfer same information fr our web page to third party web page like .. Input in text field instead of type each box…

Please if someone can guide us or any link to follow…
Link to comment
Share on other sites

Not something I have done before but I would say in the html file where your form is located you would but something like <form action="submitted_info.php" method="POST"> perhaps its possible to put two actions inside the quotes separated by a comma but then you would also need to find out what their "submitted_info.php" if looking for within a form, you can do this by viewing the source code and looking at what the id is on each  field.

Or perhaps store the results in a database then write some php that will loop through and pick out the persons details and submit them to the 3rd party then add a value for everyone that has been submitted to them so it won't submit it again?

Or depending on how well you know the 3rd party you could just update their database from your form?

 

These are all just theories though :)

Link to comment
Share on other sites

If you need to secretly send the information to a 3rd party site but keep that user your own site.

 

Use curl and send it POST with the information from your form.

 

This is the basic idea, if you need to filter or sanitize any post data can do that before and pass your new array.

<?php
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "http://somesite.com/");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, count($_POST));

$fields = http_build_query($_POST);

curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);

$contents = curl_exec($ch);

curl_close($ch);
?>
  • Like 1
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.