PDA

Click to See Complete Forum and Search --> : file_get_contents and characters in a URL problem


bigtimslim
Apr 2nd, 2008, 03:53 PM
I use the file_get_contents function to get the html from a page. I parse through that page and get a specific url I want. It looks similar to this:

http://www.domain.com/index.cfm?action=blah&ID=5000

Now I want to file_get_contents the above url. I understand that the & is for html so I tried to convert the string to work as a url. I tryed both using urlencode function on the query of this url and just manually through php replacing with what I thought were the appropriate characters with no luck. Can anyone help, or point me in the right direction?

mendhak
Apr 2nd, 2008, 05:39 PM
Is it returning an empty string? How are you getting that URL which already has the & in it?

visualAd
Apr 2nd, 2008, 08:14 PM
& is the HTML equivalent of &. So why not convert & to &? Just a thought ;)

penagate
Apr 3rd, 2008, 03:44 AM
html_entity_decode