KillerBean Posted April 16, 2009 Report Share Posted April 16, 2009 Sveiki. Varbūt kāds var izskaidrot, kāpēc $url = "http://www.weblapa.lv"; $cont = file_get_contents($url); echo $url." saturs: ".$cont; Kods izpildās viss ok tik ilgi, kamēr dati fiziski atrodas uz viena un tā paša servera? Ja meklē kādā citā serverī kods nokarās Timeout'ā. Vaina firewallos jāmeklē? vai kaut kur citur? Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted April 17, 2009 Report Share Posted April 17, 2009 Jā, firewall varētu būt viens no iemesliem. Quote Link to comment Share on other sites More sharing options...
KillerBean Posted April 17, 2009 Author Report Share Posted April 17, 2009 PHP nav f-jas ar ko caur 80. portu pieconnecteeties? Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted April 17, 2009 Report Share Posted April 17, 2009 Nu, http jau pats par sevi nozīmē 80 ports, ja nav norādīts citādi. Palasot par file_get_contents() ir minēts, ka lai varētu attālinātos failus vērt vaļā ir: allow_url_fopen boolean This option enables the URL-aware fopen wrappers that enable accessing URL object like files. Default wrappers are provided for the access of remote files using the ftp or http protocol, some extensions like zlib may register additional wrappers. Note: This setting can only be set in php.ini due to security reasons. Note: This option was introduced immediately after the release of version 4.0.3. For versions up to and including 4.0.3 you can only disable this feature at compile time by using the configuration switch --disable-url-fopen-wrapper . Warning On Windows versions prior to PHP 4.3.0, the following functions do not support remote file accessing: include(), include_once(), require(), require_once() and the imagecreatefromXXX functions in the GD Functions extension Pārbaudi, vai ar šiem uzstādījumiem viss ir kārtībā. Quote Link to comment Share on other sites More sharing options...
KillerBean Posted April 26, 2009 Author Report Share Posted April 26, 2009 un kas vareetu veel buut, ja FWall tas nav? Quote Link to comment Share on other sites More sharing options...
marrtins Posted April 26, 2009 Report Share Posted April 26, 2009 DNS problēmas? Bet visticamāk, ka firewall. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.