Deploying custom website onto clients hosting - php

I have developed a website application that includes a custom built CMS and PayPal payments etc...
My client already has hosting for his main website via the developer of that site.
I wish to host the new application under a subdomain such as:
application.website.com
I have reservations about storing my complete source code on the other web designers server.
Is there a way that the code can remain on my server but with the required subdomain or somehow password protect the folder?
Thanks for the help.

You might be able to store your source code on your server and use the PHP include function to get the pages on your client's website to use the code on your server. I've not tried this so it may not be possible for PHP to communicate between two servers like this, but give it a go and see what happens.

Related

Simple php login for static Godaddy website

I am building a website using html, css and javascript. It's a Godaddy domain and also hosted there. The company I'm working for does not want the site to be accessible by anyone until they are ready to launch. I need to create a very simple php login (just 1 user) where my colleagues can enter the credentials to view the progress of the site in production. I have no experience with php and minimal mysql experience. How would I go about creating such an authentication?
I think instead of adding login feature you can restrict it using .htaccess.
Here is the link which can help to password protect the site using .htaccess
http://www.htaccesstools.com/articles/password-protection/

Can I simulate a DNS failure from PHP?

I am currently building a multi-site content management system for a client which will support a separate domain name per web site. When the web site the domain is pointing to is not found, the client would like to simulate a failure in the browser as evidenced in the screenshot below.
I'm not sure if this is possible to do in PHP. Does anybody have details on this or any advice?

Move wp-admin to a subdomain on separate server wordpress

I have a wordpress site, foo.com. For various reasons, mainly caching, I need to move the wp-admin area to a subdomain admin.foo.com which is hosted on a separate server.
What's the best way to approach this, would a straight .htaccess rewirte work? I've seen that you can set WP_ADMIN_URL in wp-config.php but how do you separate the site in such a way that the amin sits on a different server than the rest of the site.
You can make use of two different installation of wordpress but the database will be same. One for staging and another for live
There isn't a way to separate the frontend and admin area of a Wordpress site onto two different servers. Wordpress is a web application. You get the whole thing as a package.
If you've seen something like this before, the site owner is doing one of two things:
They are running Wordpress on the admin site only, then using a plugin or some other technique to generate static HTML snapshots of the pages that form the public website.
They are using a staging site plus live site type architecture. Many of the new WP-specific hosting services include a staging site and a simple synchronization option.

Extraction of connection string from web config using web service

I have this tricky scenario and want so advice to you. My client have a website built in WordPress and a web application that was built in .Net 3.5 now they want me to integrate this too site by querying some information from the database that .Net is using and display the output on the said website.
Communication between the two site is complete and working fine using some DLL for PHP to integrate to MSSQL now the problem arises here, my don't want to expose he connection string on the website built on WordPress for security reason. Without this, I can't connect to the database and made some query so I propose some bright idea, using a web service to extract connection string from the web config of ASP.Net web application. Consuming of web service to PHP is working fine but the last issue is that the web service is expose in public. what I mean once the site launch online, the said web service is open to public and anyone can see thru the web config that my boss want to keep in secret (hehehe).
I'm already confuse on how to make the web service to be more secure. Below are some specification of the two websites.
WordPress Site
PHP based
Mysql
installed with php_pdo_sqlsrv_53_ts_vc9.dll and php_sqlsrv_53_ts_vc9.dll
nusoap (use to consume ASP.Net webservice)
Mysql for database using by WordPress
.Net Site
web service to extract connection string from web config
web reference added
MSSQL for database
Please let me know if you need more information regarding my problem.
TIA
you don't have to setup a web service for this. Just store the connection string in a php file outside of your web servers root directory (probably public_html) and then include that file within you plugin. You should hard-code the path, so that people with access to the setting can't use that functionality to spy on other files. Also make sure the web server service account has read access to that file.
That is a pretty safe setup as the file can't be directly accessed through the web.

Is it possible to host a PHP web application under my own domain, but rewrite the url to another domainname?

I'm currently building a simple web application in PHP that other company's can use as one of their services. I want to host the application myself and not install it on one of their servers, but i do want the accessibility that that would offer. Example:
www.mywebapp.com is where i would host the web application.
www.company.com would be the domain name of the client.
webapp.company.com should redirect to www.mywebapp.com/?c=company. Upon navigation, webapp.company.com/view.php?v=test would also be redirected to www.mywebapp.com/view.php?c=company&v=test and so on upon further using the web app.
Can someone explain how i can achieve this and if this is the best option considering my requirements?
I recommend that you switch to implementing an API. That's how this problem is solved by many corporations. They simply have an API key that will let your server know what client they are and therefore what to serve them.
Resources on API's:
Google Tech Talk: http://www.youtube.com/watch?v=aAb7hSCtvGw [1:00:19 long]
http://blog.programmableweb.com/2011/01/06/from-the-trenches-web-api-design-best-practices/
Directory of some existing API's: http://www.programmableweb.com/apis/directory
I think your idea IS possible if both servers are set up correctly, but doesn't it feel wrong to you?
You would need to have an 'a' record for both domains pointing to the same server
http://corz.org/serv/tricks/htaccess2.php?page=all#section-rewrite_sub-domains

Categories