Jump to content

Send data to external site, then retrieve the results.


w1zzerd

Recommended Posts

I have been given a task, and I gotta say it is kicking my butt.

 

Here is what I have to do.

 

1. Have user fill out and submit a form.

2. Data gets sent to: http://www.ffiec.gov/geocode/Default.aspx

3. Data is set as values for input fields in the sites form.

4. Form executes.

5. Retrieve result data.

6. Display data back to my site.

 

I have no idea how to do this.

 

Usually when I have done something like this I use an API.

 

Hope my question is clear.

 

Thanks for the help.

I am mainly stuck on how I am going to send the parameters from my form to the form fields on the external site and then  submit the form to get the response data after form submission so I can then display the results in a result page on my local site. I was able to use curl to get the site and echo things like the title and different tags but that is as far as I got. 

I looked at the source code on the site I am trying to scrape, I found the form once submitted calls a Default.aspx as the action file in the form. I can get the input names for each input field.

 

Is there a way I can go to the Default.aspx file and set the appropriate post data.

 

For example:

 

if the Default.aspx takes POST data with the names of "city" and "state"

 

Can I set the post data like this:

$_POST['city']="San Diego";

$_POST['state']="CA";

 

then send that post data to the Default.aspx when I call the www.site.com/Default.aspx  

 

Is that possible? 

  • 2 weeks later...

This ended up being a complete mess of a project. After I finally figured everything out, I was told this was no longer needed and that I was going to be given a spreadsheet to convert into a database and then create the app using two API's and then grab the results from the DB. I had no problem going this route but I spent a long while figuring out how to crawl a site. 

 

Thanks for the help guys.

Archived

This topic is now archived and is closed to further replies.

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