Pyrozz Posted November 5, 2008 Share Posted November 5, 2008 I need to read a file from a site that requires me to login. More specifically... I would like to design a php script that retrieves information from my cell phone provider's website. My old cellphone provider allowed me to do this: fopen("www.my_old_cell_provider.com/infopage?user=username&pass=password","r"); fread, etc.... But my new service provider's website won't take the GET data, so it requires it to be by POST. And it get's more complicated... There is a login page that the username and password needs to be sent to, and then there is an info page the script will be retreiving info from. So I can't figure out how to make a php script "browse" another site and sign in etc. I know how to read offsite files, but how do I send information to the site and then have the site recognize my server as a logged-in-user? Since this is the only way to retrieve confidential information. I think it can be done with cURL, I don't know. Can someone point me in the right direction? Thanks! Quote Link to comment Share on other sites More sharing options...
Stephen Posted November 5, 2008 Share Posted November 5, 2008 You can post to the site using cURL then show the information it shows after that. I've done things like that, but it's sort of a pain if you need cookies. I can't explain it too well right now. But yes, cURL can do it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.