sptrsn Posted February 29, 2012 Share Posted February 29, 2012 Can someone tell me why the first example works, but the second example does not? file_get_contents('http://pinalcountyaz.gov/Departments/Treasurer/Pages/TaxBillSearch.aspx?p=10006015E-*'); $url = 'http://pinalcountyaz.gov/Departments/Treasurer/Pages/TaxBillSearch.aspx?p=10006015E-*'; file_get_contents($url); Quote Link to comment https://forums.phpfreaks.com/topic/257964-help-with-file_get_contents/ Share on other sites More sharing options...
requinix Posted February 29, 2012 Share Posted February 29, 2012 You are paraphrasing your problem. Please don't. What is the actual code that's failing? Could it be that you're trying to put variables into singly-quoted strings? Because that doesn't work. Quote Link to comment https://forums.phpfreaks.com/topic/257964-help-with-file_get_contents/#findComment-1322212 Share on other sites More sharing options...
sptrsn Posted February 29, 2012 Author Share Posted February 29, 2012 ok. that whole single quote/ double quote thing is still a pain in my back side. I was able to build that url using double quotes and make it work. So Thank you for that. Is there something you're aware of that I could study, and at the end I would actually understand all the quirks surrounding quotes? Thanks again. Quote Link to comment https://forums.phpfreaks.com/topic/257964-help-with-file_get_contents/#findComment-1322216 Share on other sites More sharing options...
requinix Posted February 29, 2012 Share Posted February 29, 2012 This manual page covers everything. Also, whenever you're in the PHP manual, try to read the user comments too. They can give insights, workarounds, and explanations that the manual proper doesn't. Quote Link to comment https://forums.phpfreaks.com/topic/257964-help-with-file_get_contents/#findComment-1322239 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.