PHP Curl - debug

They have: 1 posts

Joined: Mar 2010

I'm working on an app that logs on to another page, enters some data and posts form, then I display that data on my page.

The basics of Curl are working great
However, there are many steps that are still missing to complete the app.

Is there some kind of a debug tool or an easier procedure, to see how and what exactly to do, to "hack" in to the site?
There seem to be sessions, cookies etc checkers that don't let curl pass some of the pages. What's the easier way to find out all the steps, before I even start coding?

Thank you in advance.

pr0gr4mm3r's picture

He has: 1,502 posts

Joined: Sep 2006

My recommendation is to install Firebug for Firefox which will give you a really good idea of what's going on in the backend when you navigate to a site and submit data.

With Firebug enabled, go to the desired website, and hit F12 to bring up the Firebug panel, go to the Net tab and activate it. Then, when you navigate through forms, Firebug shows you exactly what is posted as you go along, and will make it pretty easy to replicate it with Curl once you know what data you need to send.

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

Another good tool is Fiddler which on a windows machine will when turned on will show you all web calls, and even has a plugin for firefox.

-Greg

pr0gr4mm3r's picture

He has: 1,502 posts

Joined: Sep 2006

Also if you really need to see every packet that goes between you and a website, Wireshark is another cool program.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.