Pure (dynamic) HTML5-website with Backend [closed] - php

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Couldn't find anything about this online so I'm giving it a try here. (Not sure what to look for in google so maybe that's why I couldn't find it).
My client wants (for some strange reason) a dynamic, pure HTML5-website with no PHP at all. The webpages can be created with PHP, but after he is done, he wants it to (automatically) generate HTML5-webpages so these can be put online on a server with no PHP.
Is this at all even possible? Writing an API myself that gets the content from the server and converts it to HTML5 is not really an option due to time ...
Thanks

FYI: If what you want is a Single Page Application, you're asking the wrong question.
Seems like what your client wants is a pure HTML site because he might have the idea that pure HTML sites are better for SEO.
What do to?
Alternative 1:
Create a different server to generate pages. Either local (with vagrant) or in another remote server. Have your content generated there by using a CMS of your choice.
Periodically generate a mirror of your site using a tool like HTTrack or wget. Hand this mirror to your client.
Alternative 2:
Use a static site generator like Jekyll. Have the server run a cron task to automatically generate HTML from the changes.
Alternative 3:
Be the expert and explain to him that his ideas are probably unfounded.

Yes, you could use the HTML5 Filesystem API and Javascript to read/write from a JSON file as a backend. It's definitely not ideal, but it would satisfy your requirements.

Related

SNMP monitoring & Web interface [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have read many articles, forums and informations about SNMP.
Even though I struggle with my project.
The goal of my project is to display data that I get from SNMP on a web page. (Nice designed interface). SNMP protocol is compulsory. And it should run on linux server (I want to add more devices in a final part of project e.g. router, switch.)
Could anyone tell me some quick info what has to be done (step by step review)?
I would be glad for every help. I am confused about what is the best way.
Ajax/database/websockets/traps?
I would like to use PHP or Node.js if it possible.
I'm doing a similar project for my internship :
I'm using Perl script for back-end with Net::SNMP for snmp request,
Perl CGI for front-end,
and JSON for DB.
I suggest using a framework to create the web interface, for example Django (https://www.djangoproject.com/) in python.
Then you could use a python library (pysnmp will be great) to retrieve the SNMP data, and create a custom View to show this data in a web page.
If you want to stick with PHP, you can use the functions described here http://php.net/manual/en/ref.snmp.php to access the SNMP server, and again using a framework will be great (Laravel, Symfony ...)

Can I mix PHP with other scripting language? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I made a NGO website that has customer service in it, means that clients are able to chat directly to the admin. I've built 30% of it with PHP. But, I thought it's difficult to make a chat application with PHP. I've been told that Node.js is the best web development to make chat application. Can I mix PHP with Node.js ?
Generally, people name files depending on what language the code inside is written in. For example, the .php extension is run by a PHP interpreter. Certain files can have other languages mixed in. For example, a .html file can contain CSS and Javascript. Another example is the .html.erb extension in a Rails app, which can contains both Ruby and HTML/CSS/JS code. This is accomplished by something known as a preprocessor.
You could use a preprocessor to mix mostly any language together, but I'm not sure that will make your life any easier making an app. It's probably a better idea to separate your app into microcomponents, which can all be written in different languages.
For example, a chat server could be written in Node and a REST API written in Rails. They might be hosted on separate servers and communicate with each other by sending HTTP requests.
As far as Node being "the best" for making a chat server, that's a totally subjective point and StackOverflow discourages opinion-based conjectures.
It's also worth considering whether an open-source chat project could be integrated with your existing code. I.e. something already made.

Why web servers are needed even for local web application [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I'm searching for a means to overpass the need for a web server when using a local web application. Why aren't there browser extensions or special browsers to do so? It seems very easy to code to me. The browser or extension would call a php interpreter to compose web pages from php files. Local urls (file:///) would be used. No web service or port would be necessary. Is this just nonsense? Or am I the first person to think about this? In fact, this does already work with static html files.
First edit: I was looking for a server for testing purposes, being able to compose output from php files, without the need to communicate through network ports. Maybe I should have started from here, but Stackoverflow does not allow this kind of posts.
That sounds nice, please go ahead and build that technology. I will also use it. But oh, for now that has nothing to do with SO.
Why web servers are needed even for local web application
Because they are web applications. Technically you don't need a web server for local stuff if all your application code relies on client side programming. You can just go ahead open your html files in browser.
Browsers know how to interpret client side code already, so why re-invent the wheel? If you ever wish to write 1 line of server side code then obviously you'd need a web server at that point.

Update users in realtime (Web) [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to make an application where users use their own computer together with a host, the host click ”Start” and then there shall automatically show a button on all users computers at the same time. Then the first person who click the button will win. I want this to happen in the browser, but I dont know wich technology to use. I already know PHP and mysql, but I dont know anyway to update users computers in realtime. Wich technology would be the best choice to make this happen?
The solution here is basically web sockets, likely with a pub/sub layer on top. It can be done relatively simply with a decent Javascript and server-side library. PHP isn't the ideal language for this, but it works just fine with the right tools. Ratchet is a decent PHP web socket server implementation, and Autobahn|JS a decent client-side library (note: at the time of writing the latest Autobahn|JS WAMP implementation is incompatible with the older WAMP implementation of Ratchet, use Autobahn|JS WAMP v1). Follow the Ratchet tutorial, then expand into setting up a pub/sub server as described here (you don't need the ZeroMQ components, you'll be triggering events by a publish action instead of an external ZeroMQ event).
That's a 30,000 foot overview, go forth and try it.
Pusher.com has the ideal solution for this. You can send events, listen to these events and then respond accordingly. They have a free plan which I think is way more than you will probably need. Pusher works with JavaScript and it's extremely simple to get started
I suggest reading up on the documentation at pusher.com/docs

No idea what to do with a pure php page [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am trying to implement an already coded image upload system which has been written purely in php. I have a html website but did not know that I could direct users to a pure php page. Surely it would just show in a browser as coding. How do I make this pure php webpage into a html webpage? I am new to web design so any help is muchly appreciated.
Would I have to implement it as an iframe within a html page?
Thanks
The output of the PHP program just needs to be an HTML document (unless you override it, it will output a text/html content-type so you only have to provide the HTML document itself).
There is no need to involve iframes.
Surely it would just show in a browser as coding.
No, unless you are using a server which does not support PHP or have not configured it correctly, the PHP will be executed on the server and the output delivered to the browser.
Install PHP with Apache. If you are feeling tough to install it manual, go to www.apachefriends.org, find the suitable version of XAMPP for you, download and install in in your machine.
Make sure you install the Apache service. This will make Apache to run whenever you boot your system.
Move your PHP, HTML and all associated CSS, JS files to the following folder path, C:\xampp\htdocs\YOUR_FOLDER_NAME
In your browser, you can open the files as http://localhost/YOUR_FOLDER_NAME/FILENAME.php.
Now you will see it as processed HTML page. This will work for both your HTML and PHP pages.

Categories