I'm working on core php. I want to use recaptcha for my form. I downloaded recaptcha from this link. It works fine but when I switched off my internet connection it's invisible on my local.
Is it possible to use recaptcha on my local server?
https://www.google.com/recaptcha/api.js is the reCaptcha js controller that makes all the reCaptcha management.
It is loaded from google server once and you might pre-load it and plug in locally. Yet, all the verification is done server-side by google, so you can't actually click recaptcha off-line, nor verify human-bot, neither submit a form.
Read more on reCaptcha v2.0
Recaptcha is a service. Each request is handled by a foreign server, so no chance without an internet connection.
btw: A website without internet connection is not a real scenario ;)
If you use external services, you must have a chance to reach them.
The only solution I could think of is to provide a configuration or environment variable what would disable the use of recaptcha entirely. When you are working without Internet connection you would simple enable that configure option and develop your application without recaptcha.
Well recaptcha is basically a google service and ofcourse it requires internet connection,wehreas if you want to work with captcha on your local server then try this link Captcha.
It works on your local server too :)
Your Question is somehow strange. I think you have not the slightest idea what recaptcha is. Recapcha is a defense tool to block access to a online content to bots and other not human clients. If you switched off your internet connection you have absolute closed any possibility that a bot access your online content.
On the other hand if the bots and the automatic non-human visitors are inside your intranet you are a very special case, and probably you should tell us more about your very special case.
I think if we are able to download the recaptcha/api.js file, and then store it on our local machine as we do with some of other js file, then can we still not able to use the service without internet.
during using google recaptch we say this in the head section.
https://www.google.com/recaptcha/api.js'>
but from where to download the js file and to like this
Related
I’m making new a static website for a client, and they are wanting a contact form that a user could fill out and it will send the enquiry to the clients email.
The client is currently using cPanel as their web host manager, on what I believe is an Apache server. I don’t actually know what server side language that it would be using as I don’t have access to their cPanel account.
I was initially thinking I could create a PHP script that would use the mail() function, and I would put that into the public_html folder with the rest of the static site, and so when the user submits a POST request, the forms action will call that PHP script.
But from what I’ve read, that isn’t the best way to go about it and instead I should be using an Simple Mail Transfer Protocol (SMTP). I have a vague idea of what this is from googling, but have no idea how to implement such a thing.
I’m typically used to creating sites with React.js/ Gatsby.js, Node.js, Netlify, and so I’ve had no experience with cPanel and the like.
Has anyone done something similar or has any advice? Any thing will be much appreciated!
I think the first step is to get many information as you could about the available server structure. It is very hard to elaborate on any good solution without having control and/or knowledge about the server-side: maybe a tool or resource you use for implementing an SMTP-based solution could not be available to you when deploying it.
You could try to argue with your client on the importance of knowing the server structure. Use arguments on quality of service, security, among others.
If you get the server information, consider use PHPMailer if the server provides you with the required resources and dependencies.
If you could not have that information, the solution you think first ( use mail() ) will probably work. Great discussions about the topic occurred here.
However, firstly ensure that the server offers email sending service. It would be hard if it does not offer that service, but it is a possibility.
I'm trying to use a HTML/PHP form on my website. The problem is submit just opens a new page displaying my php as text, this is when I open the html file on my computer using Google Chrome. When I uploaded to my hosting service, TK dot com, I get a 405 error when using the form. I've tested on working/downloadable php forms and the same thing happens.
From my understanding, I can't just use php on my site without setting up an environment. I've read I need to use some sort of program to do this (apache). Which kind of confuses me further, how would I enable this type of service, which installs to my computer, to run on my website when my computer is off?
Any tips or guides on how to do use apache for PHP forms on my website or similar that I can be redirected to would be really helpful. Please let me know if any extra information is needed.
E.g. I am selling a WordPress or Joomla plugin and after the user installs and activates this plugin, but it still remains not vworking, because he needs to click on some "verify" button so the status of the plugin changes to became working.
This button will trigger a function that will connect to some "service" where I will previously add his website URL e.g. http://myclientsweb.com plus maybe some verification code attached in the url matched with the data on my serrver, the status of the plugin change to activated.
I can do the programming stuff on both sides (client's web and server for verification) basically, but the problem is I need some solution as server where verification urls and codes are stored is available all the time , something like CDN, so even one server is off, the client can always verify his plugin somwhere else.
So, the best solution would be some kind of CDN service that specialize for that. It could be free or paid. Do you know about something of that nature? Or do you suggest some better solution?
I am thinking you need something else than a CDN for that purpose. I would suggest you look to the cloud for a solution. I think, if you want the most uptime for your verification app, with the simplicity of a CDN, you should go for something like Pagodabox or Heroku.
Those two services host your code for you, much like a regular server, but they automaticly scale and handle requests. I theory it should make your app available 100% of the time, with minimal resources spent from you.
Both services offer free plans to get going, and test out if it's something for you.
I hope this helps, this is my suggestion to your problem at least.
If your server host is good, they usually offer 99% up time guarantee. CDN is required if you are getting large number of verification requests causing delay in processing.
Here, I would suggest, when someone tries to verify plugin and if server is down (couldn't reply), send an email to admin (you). So that you instantly know that the server is down and you can manually process the verification.
CDN stands for content delivery network a large distributed system. Which is mostly used to serve content. And does not seem to fit what you are looking for. If i understand correctly you are looking to offer 99.x% uptime. So client can always register their plugins.
This could require settings up multiple virtual hosts / dedicated servers behind a load balancer. In that way when one node goes down. The load balancer could redirect the traffic to a new node to handle requests. You really need to find a good hosting company. That's all!
I'm developing a project using Javascript, PHP and OpenLayers. A lot of maps are loaded using and HTTPS connection against an external OGC server.
When I try to load the map using HTTPS, they doesn't load (instead of, they show me an "Error loading the map, try again later").
I think that the problem is because of Digital Certificate. If I load directly from the server (using a WMS call) like this (look the last parameter):
https://serverurl/ogc/wms?service=WMS&version=1.1.0&request=GetMap&layers=ms1:lp_anual_250&styles=&bbox=205125.0,3150125.0,234875.0,3199875.0&width=306&height=512&srs=EPSG:4326&format=application/openlayers
The browser ask me for my authorization to see it. If i accept the Digital Certificate, I can see the map. After that, and because of my browser now accepts the certificate, I can see my own map from my own application.
So, the question is: Is there any way to ask for the Digital Certificate mannually when the user access to my web?
Thanks in advance!
PS: solutions using PHP are welcome too because I'm using CodeIgniter to load views
You could try opening the WMS URL in a div or perhaps a hidden iframe - that may cause the browser to pop up its 'Unknown cert' dialogue.
Im going to quote another user (geographika) from gis.stackexchange. I hope can help to someone with my issue:
You can use a proxy on your server so
all client requests are made to your
server, which deals with the
certificate, gets the request and
passes it back to the client. For PHP
have a look at
http://tr.php.net/manual/en/function.openssl-verify.php
If you are also using WMS software
(MapServer, GeoServer) you could
implement the same technique using a
cascading WMS server.
For details on how to do this in
MapServer see
http://geographika.co.uk/setting-up-a-secure-cascading-wms-on-mapserver
I am new to php, I can do a simple login page, e.g create form, submit form, process and authenticate in a php page and so on.
I read somewhere on the internet, and saw some big companies like banks, google and yahoo, their login form is in "https" not "http". So I try google what is "https" thing. Well, I could not say I fully understand what that thing is, but I think I know the concept, i.e. create a more secure login page.
I believe php could do it (cause I saw wordpress using https, and wp is using php). Is there any tutorial or can you guys give a sample code on how to do a secure login https page with php? Not necessary full code ( cuz I dun want to trouble you guys ), but if can give a full code, would me most appreciated :)
You need to buy a SSL certificate from a company like Verizon or InstantSSL. Then, you will need a web host who has Open SSL or another software for processing SSL certifcates installed.
When you purchase a certificate from Verizon/Instant SSL, they will give you some encrypted code using which you could configure your Open SSL software, and then having https:// urls will work.
This isn't something you can do using plain php.