Send parameter details to remote URL and get results in xml xcode - xcode

I am doing a Flight booking app. The user will enter the details like
FROM CITY and DESTINATION CITY details, along with departure date, passenger information like no of adults and no of children fields. One the use clicks the Search button, the app needs to send the details to a remote url and do an INNER JOIN of two tables
airport master and City will return the available flights details in
XML format.
In my past experience, I have only created sqlite table locally and
have copied it to my app folder and manipulated to populate a table
view. This is a very new process for me and I am kind of struck
having searched the net and many books with no proper leads.
My request is how to send the user entered details to a remote
url, where should I write the query with inner join(the data is
stored in a remote sqlite for which we will send the url request) and
get the result in xml format.
Any examples or tutorial would really be of great help. Thanking you
in advance.

You have to bind the userdetails in the url like #"www.abcd.com/user.php?usename=userna&password=pw". You have to write the php file in the server.In that php file you have to connect to database and check whether the user existing or not.

Related

Multiple sites link to one back end, how to track which site traffic came from in laravel?

I have this web service that I'm trying to offer to multiple businesses of the same genre. They are all individual businesses not affiliated with each other but they can all use one database for submitting info. I basically want to put a link on each separate website that these businesses already have that will point a user to a generic login form that will dump their info into my database and track which company they came from. So if a user goes to Company A and clicks "sign up", i want it to take them to the sign up form but on the back end I'll know to put Company A's credentials with the user affiliation. Likewise if they went to Company B, i'd associate them with Company B. I don't know how to go about doing this in Laravel. Can i generate a custom URL for each company? if so, how do i do that so that i can track the company info? Side note: every company who uses this would also have a company profile with all their info already in my system. Could i create a database column for "company URL" and throw an if statement saying "if url==company A, do 'this'"? I just need a good direction to start in. thanks in advance.
You can add a header to the request going to Laravel says which company the request came from
Company model has many users and User model belongs to company change your routes of Login and Register Controllers to add company on your requests
https://laravel.com/docs/5.6/eloquent-relationships#one-to-many

Yammer REST endpoint to get user by full name

I'm working on a migration Product that migrates data in to yammer. I want to match the user on source to user on target based on full name. How do I retrieve user from Yammer based on Full Name? There is one REST endpoint to get user by email. Is there something similar to this for user Full Name ?
It's not possible to do this with the User API as it only supports getting a user by ID or email. You might want to look at the Autocomplete API, but it might be quicker to use the Data Export API and find the user in the users.csv file. It's hard to provide recommendations when you don't explain what you app does.

how open specific account record by customerid / telephone no in Dynamic CRM

i need to open a specific account based on url. i have a requirement that open a account against telephone no/customer id using query string. i try these urls
http://ef.crm/EFCRMDB/main.aspx?etn=account&pagetype=entityrecord (this open a create new account form)
http://ef.crm/EFCRMDB/main.aspx?etn=account&extraqs=etc%3d1%26expert_test%3dabcdef&pagetype=entityrecord (pass query string value and i successfully get this value on form)
In database AccountBase table i find unique id for record that is 'AccountId'.
this works fine for me
http://ef.crm/EFCRMDB/main.aspx?etn=account&pagetype=entityrecord&id=A3D57E8C-87F6-E111-8BF8-000C29E2596B
now problem is that how i get 'AccountId' against telephone no or customer id received form url? can i open account by dialog or workflow if yes then how?
Maybe you can also make a HTML+JS Web Resource and upload it to the Dynamic CRM. You then can access the web resource through URL.
The web you upload must do things as follows:
Fetch the telephone no from the query string
Do Fetch XML call from JavaScript. Pass the telephone no as a parameter and than get the Id of the account.
Open the account window you want by passing the account Id in the query string.
Hope it helps :)
So I'm not sure there is anything out of the box that will give you the Id. But you could try:
Dialogs and Workflows now have an option for getting the url of a record.
You could create a custom workflow activity (for use in dialogs and workflows) to get the Id
If your in JavaScript you can do: Xrm.Page.data.entity.getId()

Save form to display it after a redirect to other page

I have a page where the user insert some information about a client. He may need to add a new contact (this contact had a lot of information ), so the user will be redirected to the create contact action.
My problem is how to save the first information about the client which are not submitted yet and display it after adding of the contact?
Create a mock client or a temporary ID, and then come back to it and fill it with real data.

Updating App with Web Information

Hey everyone, I am sorry if this question has already been asked/answered
But I have a Cocoa program that has different arrays of models. Each model hold just Strings and one Image. Archiving and Loading works great.
Each model represents a web account, that is, it holds the username and password, and some other information related to the website. Moving forward I would like to be able to update information in each model by accessing the information from the website. For example updating a balance ($). I am wondering if there is a way to do that programatically that is:
Automatically log into web account using the entered username, pass, and website url
Update the balance based on the information following log in.
Thanks for the help in advance!
Tamara
There is no single approach to log into any arbitrary website. You will need to know what the API for the given website is. If the website provides a web service to query things like balance, then you would connect using that web service (REST-based if at all possible; SOAP is more of a pain in Cocoa), and update your model based on the results. If the website provides no web service, then you would have to scrape through the HTML responses looking for what you want, and this is generally very complex and fragile. There is no general answer to this question; you'd have to know what form the website is in.
On another note, make sure that you are not storing user passwords in unencrypted files. User passwords on Mac should always be stored in Keychain. There are many posts on SO about how to best use Keychain.
Rob, isn't it possible to just look through the login page's html source and see what are the names of the fields for user and pass, and then just send a POST request to that page from code ?

Resources