![]() |
Alternative code for Y! status
I've just moved to new server and got this error due to webmaster has disabled this function(because of security reasons):
PHP Code:
PHP Code:
------- More information: I put this code into index.html to call status.php PHP Code:
P.S. I've attached entire of /ym folder |
The easiest thing to do is to ask your host to open up the PHP directive allow_url_fopen. That is how PHP is able to issue an fopen (or any sub-variation of it including file_get_contents() and file()) over an http:// protocol instead of a file:// protocol. Baring that, you can use either curl library or directly invoking sockets to connect remotely. Curl can easily be disabled by simply not configuring it, while sockets are the least likely to be closed since they take explicit commanding on the denied functions list.
If they refuse to open the allow_url_fopen directive, than check if your sockets are available: PHP Code:
|
Quote:
I got this output: fsockopen is available? yes As i'm an amateur in coding, could you change the above code to sockes please? I would appreciate your help as i'm really stuck in it :( |
Yep, I can't test it out where I am though.
PHP Code:
|
Thank you very much. I did, but nothing happened(Still blank). I'm going to inbox you my server details.
I'm so sorry for bothering you but you're the only person who can help me out :( |
That won't really help me.
What will help is if you tell me what the $status is you can get back from them. I kinda forgot that with sockets you'll need to strip the headers out from the return result, so I doubt you have a status that looks exactly like this: Code:
HTTP/1.1 200 OK |
Quote:
|
I just need to know what directories you have since you use the status here:
$file = './icon/'.$status. . .. That $status is what the content body is of the file_get_contents, but with the socket run I have I don't have a valid messenger to give it so all it gives me back is 2\n00\n0, and I don't know what that means in combination with the $status directories you have. |
1 Attachment(s)
Here is the path:
The online icon is here /ym/icon/01/icon.gif And the offline icon is here /ym/icon/00/icon.gif I attached the entire of /ym folder |
Just the two expected?
Replace this: PHP Code:
PHP Code:
Try that. |
I did but still not working...
that's what i did: PHP Code:
|
k, put in some logging and attach to the script directly:
PHP Code:
|
I replaced above code with the previous one in status.php but still not working
The page source for ~/status.php is only number 1 |
Quote:
I'm not sure where the 1 is coming from though. The only output we have is textual. Edit: BTW, give it a valid id. You can remove it from the source that you post back, it'll be in the part that we're sending to the server. |
i'm using these codes in index.html to call ~/status.php but nothing's happening
PHP Code:
PHP Code:
|
| All times are GMT +1. The time now is 02:23 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.