DeeKay Posted February 16, 2009 Share Posted February 16, 2009 What I want to do is to extract or turn the information stored in a page like this, to a PHP value. Something simple like this: $info=http://theURLabove.com/page Problem is I've no idea where to start. I tried the fopen() method, but the hosting service apparently disabled this function. I believe it's manageable with AJAX (seeing as JScript is less limited), but I'd like to try it in PHP first, especially if it's simpler. Link to comment Share on other sites More sharing options...
Wander Posted February 16, 2009 Share Posted February 16, 2009 u cant do it with ajax, because browsers limit the access with ajax till the same domain, for security reasonsyou can try file_get_contents, but i think ur host has blocked that one as well, u can also try using cURL, if that is blocked too i dont think theres an easy way, or any way at all, so the only solution would be switching to another host Link to comment Share on other sites More sharing options...
jeffman Posted February 16, 2009 Share Posted February 16, 2009 Try this way: $info = file_get_contents('http://theURLabove.com/page') Link to comment Share on other sites More sharing options...
DeeKay Posted February 16, 2009 Author Share Posted February 16, 2009 Both of the methods are disabled as well. I guess I'll just use Javascript to get and format the content instead (no AJAX involved, I got a bit confused there). Thanks for the help in any case. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.