Save web data into PostGIS - postgis

Is it possible to store harvested data from a website(Nestoria) upon implementing their APIs using PHP?
I am able to extract the data using PHP and it displays the result on a web browser, but I need to dump or save them into my PostGIS database. (I am using XAMPP and PostGIS on windows 7)

Most companies wouldn't have a problem with you doing that, for instance Ebay's API. However, as Mapperz pointed out - Nestoria's terms require you not to compete with them for originality of the content. So, any data that comes from their API and stored in your database should not be able to be indexed by search engines.
This isn't as difficult to comply with as you might think. You could have the content loaded through an iframe that uses the "NoIndex, NoFollow" meta tag attribute in the HTML of the page being loaded, or pull the content from the database to your page's DOM using AJAX/JavaScript after the page has loaded.
I personally would go with the second option (AJAX).

Related

Content Management Api to POST media files from external source

I am looking for a solution in episerver to add media files from external sources into episerver.I am aware that episerver has recently released Episerver Content Management API to post contents within Episerver.Is it possible to use this for media files as well.As this is newly introduced in episerver, i cant find any references other than the documentation within epi which has more of CRUD operations on Content.Can someone please point out some reference links for me to get this started?
Any input is appreciated.
Regards,
The content management API is useful if you want to create a headless website that talks to Episerver via an API to get content.
Depending on what you want to use the media for will depend on the optimal approach. I assume you want the content editors to be able to pick these items from within the CMS? If so there are two main appraoches:
You could write a scheduled task using the content repository API to import the media into the Episerver media library
The other option is to create a content provider, so the media is available in the editor, read this to learn how to do it. This option is more fidley so I would go with option 1 if possible.
If you just want to render images on a web page, then call the API using AJAX. Job done!

How can I pull remotely stored PDFs to be viewed in Ionic?

I have a site where PDFs are uploaded and stored (all exactly the same way) as (publicly available) attachments on a web page.
Using an Ionic app, I want to query the site and pull in the PDFs as a list where each item can be opened and read in the app. The PDFs would remain on the site/server, but would be available through the Ionic interface to be read as pages.
What kind of setup or services would I need for something like this?
It seems to me like you'd want an API that simply lists the available PDFs and the URL/Location for them. That would be better than the ionic app trying to parse HTML from your existing site (which is what it sounds like you're considering). Then the ionic app can call this service and get the PDF listing in JSON, which is very natural.
Then if the PDFs are externally accessible (meaning no token/security required), the display of the PDF should be a simple window.open() call.

A similar tool of odk but with search and retrieve data features

We are working on survey's using ODK, by creating xls files and transform it into forms, and then we collect data offline.
When employees comeback from the field, they upload data.
What we need now is that they work online from the field, so they can search a specific ID or name, and see the data existing before adding new data.
What I mean is that we need to let them search the database by specific field, and that is not available in odk.
We upload data to ONA then the data are cleaned on the laptop and the searches are done on the laptop too.
Is there a tool that do that process ?
As far as I know, the closest you can get with existing tools is this: https://help.ona.io/faq/filtered-datasets
If you use Enketo (webforms), when the source dataset is updated (via new submissions) the webform will also be automatically updated (may require page refresh and there will be a delay). You could use both offline-capable or online-only webforms with this reference to external data and query it with select_one_from_file, select_multiple_from_file (in XLSForm terminology), or with pulldata, or with regular XPath.

Mobile app with data from TYPO3

I don't know anything about TYPO3.
I have a potential client who pushes content on a website through TYPO3 and now wants to expose some of this content in a mobile application I'm supposed to develop.
I use to implement mobile apps with Ionic.
So I have two questions:
1) Is there a way to read TYPO3 content as a web service so I can call it in my Ionic app ?
2) Is TYPO3 able to expose some part of his content in a responsive website so I just have to configure it and show that website in my webview?
In TYPO3 you can configure any kind of output. That can be the same content in the same structure as the original website.
You can configure additional pagetypes.
jsonPage = PAGE
jsonPage {
typeNum = 1234
config {
disableAllHeaderCode = 1
:
}
:
}
Often this is done for a print-view or a pure text view without tags.
In this way you can output the page content as e.g. JSon or XML.
I even did an output once as PHP includes which had the pagecontent in php-variables.
So you can request abstract data, or the same data with another rendering than the normal page like a special responsive rendering.
Even if you do not want to use TYPO3 at all, you can still make your own queries using php/mysql as all content and page related data (at least should be)is stored in the database and is well sorted there.
(Which is much more work than defining a new pagetype as mentionned above - but could also be an option)

Database search field database

I'm looking for a way to create a search box in wordpress, where visitors can search a number from the database. Is this possible? I have several package numbers in my database. I want to give my visitors the ability to search for their package number and request the information that comes with the number.
What you want to do can be done.
I suggest a different approach than using wp-exec. (I just looked at wp-exec website, and that plugin was created for WordPress 1.5, which means it hasn't been updated in about 5 years).
The content you want to display exists entirely outside of WordPress. I suggest you use a custom page template - see
http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates
In this case you would not use WordPress posts or pages or custom post types. On the custom page template you would write (or have written if you don't have the knowhow to do it yourself) PHP code to extract the info from the database and display it on a page.
For pages like that you would be using WordPress only as a container within which to display the results - they custom page would appear in the site Nav, The page of results would use the site's theme to display so it looks like the rest of the site.
But the code to display from the database would not use the WordPress loop. It would be PHP / MySQL data retrieval and display code.
I really doubt you will find a plugin that lets you display results from an external database, formatted the way you want them to appear. The reason is every external database is different, has different tables and table structures. And no two sites will want the external data visually displayed in the same way. So there is little generalization to encapsulate in a plugin as everyone wants it different.
I've created pages on some sites along the lines of what you want to do thus I know it can be done. But it requires writing custom code.

Resources