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.

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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? 

Link to comment
Share on other sites

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

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.