I’ve been asked to program a small section of code that allows other websites to call our page with this code and dump a string of data. After looking at a series of tutorials, I came up with the following:
$sock = fsockopen(“ssl://www.awebsite.com”, 443, $errno, $errstr, 30);
if (!$sock) die("$errstr ($errno)n");
$exportstring .= fgets($sock, 4096);
Does this look correct for what i’m trying to accomplish? Is there anything i’m missing? Feel free to improve upon it if there it is not up to snuff. I will be unable to test it for a couple of days but would like to make sure it’s in correct format before I do.