PoRToSS Posted July 21, 2003 Report Share Posted July 21, 2003 Panjeemu no php.net sorsi: <code><font color="#000000"> <font color="#0000CC"><?php $fp </font><font color="#006600">= </font><font color="#0000CC">fsockopen </font><font color="#006600">(</font><font color="#CC0000">"www.delfi.lv"</font><font color="#006600">, </font><font color="#0000CC">80</font><font color="#006600">, </font><font color="#0000CC">$errno</font><font color="#006600">, </font><font color="#0000CC">$errstr</font><font color="#006600">, </font><font color="#0000CC">30</font><font color="#006600">); if (!</font><font color="#0000CC">$fp</font><font color="#006600">) { echo </font><font color="#CC0000">"$errstr ($errno) n"</font><font color="#006600">; } else { </font><font color="#0000CC">fputs </font><font color="#006600">(</font><font color="#0000CC">$fp</font><font color="#006600">, </font><font color="#CC0000">"GET / HTTP/1.0rnHost: www.delfi.lvrnrn"</font><font color="#006600">); while (!</font><font color="#0000CC">[url=http://lv.php.net/feof]feof[/url]</font><font color="#006600">(</font><font color="#0000CC">$fp</font><font color="#006600">)) { echo </font><font color="#0000CC">fgets </font><font color="#006600">(</font><font color="#0000CC">$fp</font><font color="#006600">,</font><font color="#0000CC">128</font><font color="#006600">); } </font><font color="#0000CC">fclose </font><font color="#006600">(</font><font color="#0000CC">$fp</font><font color="#006600">); } </font><font color="#0000CC">?> </font> </font> </code> Izmet sekojoshus errorus: Warning: fsockopen(): php_network_getaddresses: gethostbyname failed in D:UsersApacheApache2htdocscountergen_bilde.php on line 4 Warning: fsockopen(): unable to connect to http://www.delfi.lv:80 in D:UsersApacheApache2htdocscountergen_bilde.php on line 4 The operation completed successfully. (0) Kaadeelj taa? Link to comment Share on other sites More sharing options...
PoRToSS Posted July 21, 2003 Author Report Share Posted July 21, 2003 Tiko arii pasham pieleca, ka kodu sheit uzrakstiiju pareizi, vienkaarshi nevajadzeeja url priekshaa rakstiit http. Atvainojos par liikajaam rokaam. Link to comment Share on other sites More sharing options...
Recommended Posts