Get JSON data from web service with PHP


From COBOL to SharePoint

In this case there is an .asmx web service that has a Login method, if the result is True (user has written correctly user and password) we can use other methods.

We use a GetHistoryTrucks method that returns a JSON string, the raw output is:

and this is a sample how to reads the couples key value from PHP:

The final output:

Key

Value

GTI_DIV_IDLoc

1

GTI_DIV_ID_Sector

888

GTI_DIV_ID_Vehicle

T0255

GTI_DIV_COMPANY

 

Key

Value

GTI_DIV_IDLoc

2

GTI_DIV_ID_Sector

888

GTI_DIV_ID_Vehicle

T1717

GTI_DIV_COMPANY

B

The raw stream can be readed with

View original post

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s