I'm currently making an app with React Native and I need to perform some HTTP requests on PHP files, that are hosted on a CPanel file manager.
So I need to put the link in my request, but the problem is that it includes a security token when I sign-in on the website to see these files.
As it is changing every time, I guess that I need to get this token in my app and use it to perform the requests.
I browsed the documentation of CPanel to find a way but I can't figure it out.
Thanks in advance for your help
The easiest method without domain-pointing is access by hosting IP and your username account on that hosting. Example:
http://XXX.XXX.XXX.XXX/~username/yourapifile.php
where XXX.XXX.XXX.XXX is your hosting IP and username is your username account (with ~ prefix).
Related
I was implementing API (without JWT) where user login is not needed. So, I choose basic authentication but, now anyone can stole it from Network (tab browser) because credentials are available during sending the request.
After the lot of the research I think it's better to whitelist domains ( 75 total in my system ). I tried it in CodeIgniter 3 but I am not getting a way to get the domain name via referrer or origin.
Now, the last solution to white list the domains in server. I have Plesk with Ubuntu installation but I don't know what should be the best solution for whitelist the domains in server. Also, I never did this type of the work in server.
I hope I have explained the question better!
Using the simple php curl function for Facebook user-account control, I pull out the site and do the detection according to the incoming data.
But because I have multiple queries, Facebook blocks and php codes are disabled. How can I show each browser function as if it was entered from a different computer by modifying the browser ip-user agent (if there is a proxy) before running it?
Thank you.
Your trying to ask that your ip is blocked to get data through API so that you are trying to fetch data from different ip[proxy]. If this is your concern then try to find why your ip has blocked and get whitelist your ip from FB!!!!!
First, access canhazip.com or jsonip.com from the server to make sure it has the public IP you think.
Second, make sure that IP address is in "Server IP Whitelist" for the app's Settings > Advanced section in the Developer console (https://developers.facebook.com/apps/[APP ID]/settings/advanced/).
I've built a Slack App for our team.
I was able to create a Slack Button and used that to authorize the app with oauth.access
My Slack App adds a Slash Command to a channel in Slack
So far so good.
The Slash Command needs a Request URL which is simply the page that will receive the slash command payload and optionally, send a response back to the Slack channel.
Here's the rub, the server that host the page I need to use for the Request URL is on our internal network and only accessible to users on our VPN.
Our main site accessible to the world at, https://example.com
The server on which this page is hosted is at, https://slack.example.com which is only accessible to users on our VPN (both are apache 2.4 servers)
Anyone not on the VPN that requests slack.example.com is instead served https://example.com
It is not possible for me to move the php page to a server that is accessible outside our VPN (it's part of a larger application that can't be moved) but I can add a php page the serve that hosts https://example.com.
I'm thinking that I might be able to add a php page to example.com that could act as a proxy recieving messages from slack.com, passing them to slack.example.com then getting the response from slack.example.com and sending that response back to slack.com.
Is this possible, and if so, how would I go about it? I'm open to other solutions as well, possibly using Apache to do the proxying?
I would run the request page on a separate server in your DMZ functioning as proxy to the internal application server. Here is a brief description:
The php script for the request url (=request page) needs to be accessible to the public internet, so that Slack can call it. I would put it on a separate server and I would put that server in the DMZ of your company. That is usually the best place for servers that need to be accessible from the outside, but also need to access servers on the inside of your company. Make sure to use SSL and the verification token to secure your calls from Slack.
The request page can run on a small server and will need to have a webserver (e.g. apache) and php. If you planning to have more complex requests you may also need a database. It will also need to run SSL, so you will need a certificate. You can also use your existing webserver to the outside (example.com) if is meets these requirements.
The request page needs to have access to your application server, e.g. via VPN. It would need to function as proxy: receive the request from Slack, make requests to the application server based on the specifics of the slash command and then return the info back to Slack.
Another important point is user authentication. I read from your question that not all users on your Slack team should have access to the application server, so your request script needs to have a method to distinguish which users are allowed access and which are not. It would be easiest, if these users could be identified by membership of a specific Slack group. In any case you probably would need an additional bot that ensures mapping of Slack users to VPN users.
I am trying to use a basic PHP page to create a new user in a Windows 2008R2 domain. However when ever I try to specify a password I receive a error stating that the server was unwilling to perform my request.
I was wondering if there is any other way to create a new domain user with PHP that will allow me to set the password of the user.
Thank you for your time!
It's completely possible. You need to connect to the Active Directory domain using LDAP(s), and authenticate with it using a user account that has enough privileges to create/modify user accounts within that domain. There are third party libraries/projects that exist that could take care of some of the leg work for you, but without that credentialed account, you'll never be able to accomplish this.
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.