I’m trying to use the PHP function file_get_contents(). But the URL I’m trying to open use a port, for example:
file_get_contents("http://212.21.323.32:8010")
I’m not able to open this URL, how can I do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Personally I’d use
cURLand useCURLOPT_PORTto set the port you want to connect on.