why i not getting return on file_get_contents($myurl) but i do get output for wget
updated:
i use curl to get the return header and result and discovery that the it is on the header instead in of the body
HTTP/1.1 200 Document follows
Transfer-Encoding: chunked
Content-type: text/plain
Server: XMS (724Solutions HTA XSAM_30_M2_B020 20070803.172831)
Date: Fri, 21 May 2010 10:48:31 GMT
Accept-Ranges: bytes
HTTP/1.1 404 ChargedPartyNotAvailable
Transfer-Encoding: chunked
Content-type: text/plain
Server: XMS (724Solutions HTA XSAM_30_M2_B020 20070803.172831)
Date: Fri, 21 May 2010 10:34:13 GMT
Accept-Ranges: bytes
How can i extract out only “200 Document Follow” and “404 ChargedPartyNotAvailable” ?
Do you have allow_url_fopen enabled in your php configuration?
However I would expect that you would get a warning generated if not – do you have errors/warnings displayed? You could add temporarily at the top of your script :
and then you might see why file_get_contents() doesn’t work.
Edit
You might just be able to use
get_headers()if you’re only interested in headers.