I installed the free script found here --http://www.digitalpoint.com/tools/search -- a few months ago at two sites and it had been working fine. When I checked one site yesterday, I found the script was returning an error: Warning: feof(): supplied argument is not a valid stream resource in xxxx Any idea why this is occuring? Could digitalpoint be blocking my site for some reason? Thanks.
OK, I removed the @ from fopen and now I get this error (with * masking the real key and site) Warning: fopen(http://search.digitalpoint.com/?q=test&key=*********************&site=**************&start=0&spell=1): failed to open stream: Bad file descriptor in *************\search.php on line 44
is allow_url_fopen set to "1"? you can check this with ini_get ('allow_url_fopen'); and change it with ini_set ('allow_url_fopen', '1'); Also, the DP servers will probably block you if you don't have the link back to digitalpoint.com as explained here
Thanks. I'm an asp developer and don't know php at all really. I do have the following code in the script- Is this what you mean: ini_set ("allow_url_fopen", "1"); if (!ini_get ("allow_url_fopen")) echo '<FONT COLOR=RED><B>Sorry, this PHP configuration does not allow for usage of <A HREF="http://www.php.net/manual/en/ref.filesystem.php#ini.allow-url-fopen" TARGET="_blank">fopen()</A>, which is required for this search engine script.</B></FONT><P>'; // Let's get the results $handle = @fopen ("http://search.digitalpoint.com/?q=" . urlencode ($q) . "&key=" . urlencode ($key) . "&site=" . urlencode ($site) . "&start=" . min (990, $start) . "&spell=" . $spelling, "r"); while (!feof ($handle) && $handle) { $line .= fgets ($handle, 1024); } fclose($handle);
Thanks Shawn. I tried fopen against another url and it seemed to work fine, so something is blocking access from my site to search.digitalpoint.com. My host says they are not blocking anything. I did put a link back to digitalpoint on my search results page, but now I see that your requirement is to put the link on the search input page. Could digitalpoint be blocking my ip for failing to adhere to this requirement?
hi, i have the same problem, i set the allow_url_fopen to 1 but still the same error Warning: feof(): supplied argument is not a valid stream resource Warning: fclose(): supplied argument is not a valid stream resource Parse error: parse error ... : eval()'d code on line 1 any help. Thanks
If the server admin doesn't allow fopen for URLs globally, you wouldn't be able to set it manually (unfortunately).
You are right, but the search was working before one week. maybe digitalpoint blocking my site because till now i didn't adhere to my search page. Can you check if my site is blocked or not. my site is: www.eschool.gov.sa Thanks
Actually I don't have experience in php, still search retrieve the same error. do you have any solution for that. Thanks in advance.
it return Warning: fopen(http://search.digitalpoint.com/?q=...): failed to open stream: Bad file descriptor in xxx on line 43
Yeah it's the fopen problem... need to talk to your server admin about letting you use URLs within fopen().