Topic: Login via URL?

Thanks in advance for any help.  Is it possible to login by adding username and password to a URL?  I want to get some data into Excel using Excel's web query feature but Excel gets redirected to the login screen.  Excel needs its own login session.  Is this possible?

2 (edited by kensoftwares 05/06/2016 11:58:55 am)

Re: Login via URL?

Hi,

What you need is an odbc driver for mysql . connect to excell with the  odbc and get the information from fa database.

Tell me if it works

Re: Login via URL?

Hi Ken..  Thanks for your reply.  Yes, I am a bit familiar with that strategy.  I will try that if there is no simpler approach.  All I need for now is the data from the customer and supplier inquiry pages which I modified slightly in the code to default to exactly the way I need.  All I need is the webpage in excel and I can use the data on any platform.  Using ODBC requires more configuration and is less portable. 

So still wondering about my original question whether or not there is a way to skip the login or put it in the URL.

Thanks

Re: Login via URL?

Just looking around and found a post about how curl can use the login fields to pass username and password:

curl -F 'user_name_entry_field=<username>' -F 'password=<password>' -F 'company_login_name=<company number>' url

I don't even really understand what curl is but wondering if there's a way to use those field names in the url in the same way.

Re: Login via URL?

appelm wrote:

Just looking around and found a post about how curl can use the login fields to pass username and password:

curl -F 'user_name_entry_field=<username>' -F 'password=<password>' -F 'company_login_name=<company number>' url

I don't even really understand what curl is but wondering if there's a way to use those field names in the url in the same way.

Curl allows you to script a browser session from the command line. The snippet above logs in and creates a session. Once there is a session, the script could load a particular page and insert the data into the appropriate form fields before submitting the form.

It should be possible to call such a script from Excel with the appropriate parameters. As long as the form in question doesn't use AJAX, it should work.

Re: Login via URL?

Oh... You were trying to get data out of FA?

In that case, you'd be better off with a simple php script reading from the database directly. No need for ODBC, either. Just make sure you filter/escape all strings before embedding them into your SQL query.