php and .htaccess

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

i wanted to check if that certain url is active or not, and ive used
fopen, file_get_content()..however these functions didnt worked out
because allow_url_open to our webserver is set to off.

someone recommended that i can modify it or achieve the same goal
through .htaccess. is this possible? how?

Re: php and .htaccess

shotokan99 napisaƂ(a):
Quoted text here. Click to load it

You cannot set this value in .htaccess file.
(but you can try put your own php.ini file in your directory)

My advice - use curl library instead

Wiktor Walc

Re: php and .htaccess

actually that's the major problem..because my hosting co. wont allow
me or won't edit the php.ini file. the main reason is we are on a
shared server. regarding curl i did try it using this code:

$buffer = curl_exec($curl_handle);
if (empty($buffer))
    print "Sorry - no content.<p>";
    echo "<h1>HERE IS CONTENT:</h1><hr> $buffer";

still faild ;-)
is there something wrong with my code or simply it doesnt support curl
as well?
is there another workaround to attain my goal? some folks suggested i
try snoopy.

Re: php and .htaccess

At Tue, 12 Jun 2007 19:43:59 -0700, shotokan99 let h(is|er) monkeys type:

Quoted text here. Click to load it

If they've disabled all kinds of stuff, don't offer cURL suppport (quite
commonly used I'd say) should you not consider switching hosts?
Don't know any details about snoopy, can't help you there I'm afraid.

Or is the failure of above code not caused by curl being unavailable?

Schraalhans Keukenmeester -
[Remove the lowercase part of Spamtrap to send me a message]

  "strcmp('apples','oranges') < 0"

Site Timeline