stormx Posted August 30, 2008 Share Posted August 30, 2008 Hello All, I am currently running a script to strip an .xml file and get the contents, that part of my script works. The part that doesn't is the FSOCK open to get the .xml This is my code: <?php $link = "https://www.exetel.com.au/members/usagemeter.php?username,password"; $http_response = ""; $url = parse_url($link); $fp = fsockopen($url[host], 443, $err_num, $err_msg, 30) or die("Socket-open failed--error: ".$err_num." ".$err_msg); fputs($fp, "GET /$url[path]?$url[query] HTTP/1.0\n"); fputs($fp, "Connection: close\n\n"); while(!feof($fp)) { $http_response .= fgets($fp, 128); } fclose($fp); $str = $http_response; $tmp_explode = explode("<br>", $str); $data = array(); foreach($tmp_explode as $line){ $tmp_line = explode("=", $line); $data[$tmp_line[0]] = $tmp_line[1]; } echo "<pre>"; echo $data['data_down']; echo "</pre>"; ?> Whats the issue? Link to comment https://forums.phpfreaks.com/topic/121975-fsock-on-ssl/ Share on other sites More sharing options...
stormx Posted August 30, 2008 Author Share Posted August 30, 2008 ..Or could anyone provide me with a script to get remote .xml scripts via FSOCK or CURL, that is compatible with SSL? Thanks. Link to comment https://forums.phpfreaks.com/topic/121975-fsock-on-ssl/#findComment-629632 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.