Skip to main content
New Participant
February 10, 2014
Question

Accessing a tab of a specific web page using <cfhttp>

  • February 10, 2014
  • 1 reply
  • 1472 views

Hello, CFers!

I need to access a remote page using the cfhttp. To be more specific, I need to access this page: https://sistemas.dnpm.gov.br/SCM/Extra/site/admin/dadosProcesso.aspx?numero=861738&ano=2013 (Sorry, Brazilian government sites works better only in the I.E.)

This is a site of the Brazillian government that supervises mining areas all over the country. Each mining area has its own "numero" (number) and the "ano" (year) when it was registered at the National Department of Mineral Production - DNPM agency. As you can see (if you clicked the link to the DNPM website) there's a tab "Poligonal" at the top of it. Clicking on it will start a function created probably by the ASP.NET and it will generate a PNG image showing the area and some other processes near it. Example of the link above:

So here is the problem: Can I get the data from the "poligonal" tab using the CFHTTP, knowing the poligonal page doesn't have a direct link? I tried all I could to find a way to get this image, checked I the sourcecode, but I couldn't find any way to solve my problem. That's why I came here to see if somebody can help me with this.

Sorry for my bad English. I hope you guys undertand me.

Being sure of your pacience and attention, since now I thank you.

This topic has been closed for replies.

1 reply

Brainiac
February 10, 2014

CFHTTP can only request a single URL; it cannot "interact" with pages or access tabbed content, unless that tabbed content has a unique URL that generates the data. In your case the tabs both call the same URL but they POST different data. If you examine what data that post, you will be able to access just the content that the second tab generates. I'd hazard a guess that each tab does a form submit and then the server replies with different content depending on the data posted to the ASP script. If you install a proxy on your PC, like the free Burp proxy, you can intercept and see all the HTTP requests. Good luck.

New Participant
February 10, 2014

That's how the page works, Tribule!

I'll try the Burp proxy to check what's being submited and try to access the content that the "Poligonal" tab generates.

Thanks, man!

Inspiring
February 10, 2014

Just wondering, but have you tried contacting the developer of the site to see if a publicly accessible web API that provides that functionality you're looking for is available?  Could allow you a direct path to a solution.