PHP running a session through a proxy? - php

Basically, what I have is an account checker that needs to be ran through the use of proxies. The way I need it to work is, the user can place a proxy list into the site and the PHP script will connect through a proxy, gradually going down the list as 1 proxy for ever 2 accounts.
Account list format: email:password
Proxy list format: IP:Port
Is this possible?
If so, where do I start to look as I have no clue at the moment, I thought maybe someone on here could help?
Regards,

Related

White list domain in PHP or Apache/Nginx server

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!

How to best secure my home automation webserver?

I have set up a small raspberry pi home automation from scratch along with some ipcams to surveil my house.
All those are controlled by a small webpage (with relay switches and video feeds) i have set up that works very well within my home network.
I was thinking of setting up a dyndns account (as i dont have a static ip) in order to be able to access all those things remotely through 4G.
Obviously i dont just want to point an open port to my web page and just make it accessible online.
How to i make this secure? Here are my thoughts:
Do i set up a quick Joomla! site inside my network that ill have to log in every time? (or something similar - im just familiar with Joomla!)
Is there some way to password protect the website with .htaccess? Is it safe? could you point me out to a guide?
Is there some way to restrict access only to my cellphone's 4G mac address?
Is there some way to set up some vpn or other "tunnel" between my phone and home? (I wouldnt want it to apply to all my phone's traffic though)
Do i have this all wrong and there's some other awesome way to do what i need?
Please keep in mind that i would appreciate simplicity and ease of connection every time ill access the website. ie. i wouldnt want to log in every time i need to open my garage while driving near the house.
Lastly i was thinking of posting this in some other stack subforum but i ended up here, if you think there is some more suitable community please let me know.
Thanks in advance
Password protect it. However, hackers can hack the IP cameras. Find vulnerabilities in the software and patch them. Port forwarding to IP cameras should be safe. You can use Hamachi for a tunnel but it requires you to have a computer. You can restrict access by IP address. There will be guides on the Internet. Google is the best option for you.

Not able to connect Php application with SharePoint

I am a php developer have no experience with Share Point. I have follow these two links to get Data from Share Point into my Php application.
stackoverflow question here.
A Library for Share Point here.
Share Point team give me 2 IP address. What they said is, I have to login at Forti Client with first IP then second IP is used to access application in browser which is also prompted for Credentials. If I not login in Forti Client with first IP, Web Application will not work at all. One more thing is, this process is working well in windows system but not working on ubuntu (Linux).
So, My Php applications are running on AWS linux ( ec-tier ). I have to get data from Share Point.
I just want to know is it possible to get data from Share Point into my application.
If it is possible then what is the process that I should follow in order to get data.
Kindly help me with your suggestions/answers. Thank you.
Hope these links help you out.
Forti Client CLI for Linux click here.
Shell Script To Use CLI click here.
Is it a SharePoint List or Document library?
If it's a list, use web API to call for the required info.
Refer to my answer in this post:
how to add a connection to a sharepoint list to a word addin

A proxy php script for one website

I'm looking for something that I'm not sure it exist.
If not I'm happy to get directions to do it.
I rent a proxy from a proxy company, so I have an IP, username and password to use it.
I would like to put those informations in a php script, then be able to surf through the proxy using this php script.
This will give me the opportunity to give the link to other person without them to have to change the config in them browser.
Thanks in advance
Something like this may be what you are looking for
http://freshmeat.net/projects/phpproxy/
Do a search in Google for PHP Proxy, there are many for your needs.

PHP - Is possible to find if user is browsing from beind a Router and get Router Info

Hello guys.
I think it isn't possible just using PHP, but just to be sure.
Is it possible for PHP to know if the
user is accessing the web from behind
a Router?
And if yes, how can i get some
information about that router, like:
Router Name, Brand, Serial Number, ...
Users connected in the same network.
Can PHP also find the Local IP
Address for the visitor in that
Network?
A few simple questions. To which i haven't found a solid answer, and i tough that some PHP genius could tell me. And teach me.
Thanks for your help.
EDIT: Motives for this privacy invasive question
I didn't thought that i had to say this... But i guess i do
I was writing a couple functions that would get the browser preferred languages and finding out from which Country the user comes based on the IP, to deliver my website content in the right language to the visitor.
Then i started to think, most people browse from behind the router, can i find out if they are indeed?
Then it just came to my mind to do one of those simple programs that display network details, people connected on your network. My idea was to do that, but Web App Based not Desktop App Based as all other programs of this kind.
I appreciate privacy above everything as most developers do, so i kind of understand the Down Votes, i would probably Down Vote myself.
I'm sorry if you misjudge me due to my weird question, i have nothing to do so.. These things just popped up on my head.
First, are you talking about finding out information about users visiting your website? Keep in mind that this implies an intrusion into their privacy (you can try it with yourself though ;))
Is it possible for PHP to know if the user is accessing the web from behind a Router?
No you cannot. Only when you know that e.g. you have a lot visitors from one company and they all have the same IP address, they might be behind a router but it could also be a proxy.
And if yes, how can i get some information about that router, like:
Router Name, Brand, Serial Number, ...
If you have the IP you might be able to discover various things about a host with tools such as nmap. You might be able to find out the brand of a router and host system but definitely not serial number and such stuff. nmap is not PHP though.
Note: The use of such tools without permission to do so is illegal in some countries. In any way, the use of such tools without permission is morally questionable .
Users connected in the same network.
As I mentioned in the first question, if you have different users with the same IP address they might be in the same network. They could also be in different sub-networks. Anyway you cannot get their local IP addresses.
Can PHP also find the Local IP Address for the visitor in that Network?
See previous answer.
You see, everything is very vague and mostly based on assumptions. You cannot get reliable information and I am very glad that we are not totally transparent yet.
Once we all use IPv6, the whole story is a different one.
I have no idea what you're trying to do, but it worries me a little.
So I'm glad that (as you suspected) it's not possible.
All the details you're asking about is information that there's no reason for anyone outside the local network to need, it would be a huge security problem if a router was broadcasting this to the world.
It is not possible, by the design of the network protocols.
However, some routers uses special builds of PHP in its admin control panels.

Categories