Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
peace
Worker
Worker



Joined: Mar 11, 2004
Posts: 209

PostPosted: Tue May 18, 2004 9:01 am Reply with quote

Hello

im lookin for a code but couldnt find it .İts not a bout php but i think so its a jawa code.
In yahoo games page http://games.yahoo.com at left top of page ,below sign in it says total players in yahoo servers and also near all games there it says how many ppl play that game at that moment and when u refresh browser it auto chances i did look to source and dont understand/find any Rolling Eyes is it possible to get that code if some guru's helps me
thanks
 
View user's profile Send private message
GanjaUK
Life Cycles Becoming CPU Cycles



Joined: Feb 14, 2004
Posts: 633
Location: England

PostPosted: Tue May 18, 2004 9:55 am Reply with quote

You want to display the total Yahoo players online, on your own PHP page?
I would just do it like this:

Code:


$address = "http://games.yahoo.com";

$begin = "<font color=\"FFFFFF\" face=arial size=-1>";
$end = "</font>";

ob_start();
$guk = readfile($address);
$guk = ob_get_contents();
ob_end_clean();

$ganjauk = explode($begin, $guk);
$ganjauk = explode($end, $ganjauk[1]);

echo $ganjauk[0];


If they ever re design that page, you would need to edit it a little.

I tested it and uploaded it, you can see it's working here:
http://www.magic-guk.com/recycle_bin/index.php

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
peace







PostPosted: Tue May 18, 2004 10:03 am Reply with quote

cool i see it works real ganja can u find /create me for how many players online for yahoo pool game too please Razz
 
GanjaUK







PostPosted: Tue May 18, 2004 10:08 am Reply with quote

Code:


$address = "http://games.yahoo.com";

$begin = "Pool</a></font><font face=arial size=-2>&nbsp;(";
$end = ")";

ob_start();
$guk = readfile($address);
$guk = ob_get_contents();
ob_end_clean();

$ganjauk = explode($begin, $guk);
$ganjauk = explode($end, $ganjauk[1]);

echo $ganjauk[0];


http://www.magic-guk.com/recycle_bin/index2.php
 
peace







PostPosted: Tue May 18, 2004 10:16 am Reply with quote

you da man Ganja Smile appreciate
 
GanjaUK







PostPosted: Tue May 18, 2004 10:20 am Reply with quote

Your welcome. Smile
 
peace







PostPosted: Tue May 18, 2004 11:55 am Reply with quote

well i wanted created a block which shows that numbers in it but i couldnt can you help me ganja or another one coz this is my first attempt for creating a block Embarassed
 
GanjaUK







PostPosted: Tue May 18, 2004 12:08 pm Reply with quote

Here is a simple example block with the stats you requested:

Code:


<?php

if (eregi("block-YahooGames.php",$_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}

$address = "http://games.yahoo.com";

$begin = "<font color=\"FFFFFF\" face=arial size=-1>";
$end = "</font>";

ob_start();
$guk = readfile($address);
$guk = ob_get_contents();
ob_end_clean();

$ganjauk = explode($begin, $guk);
$ganjauk = explode($end, $ganjauk[1]);

$content .= $ganjauk[0];

$address = "http://games.yahoo.com";

$begin = "Pool</a></font><font face=arial size=-2>&nbsp;(";
$end = ")";

ob_start();
$guk = readfile($address);
$guk = ob_get_contents();
ob_end_clean();

$ganjauk = explode($begin, $guk);
$ganjauk = explode($end, $ganjauk[1]);

$content .= "<br>Pool: ";
$content .= $ganjauk[0];

?>


Save that as block-YahooGames.php
 
peace







PostPosted: Tue May 18, 2004 12:21 pm Reply with quote

tyvm Ganja but it dont works i only have a block which says in it pool:
i only chaged arial font with Verdana.

i just want it says in block like ;
(total)players online:blabla and pool players online:blabla Rolling Eyes
 
GanjaUK







PostPosted: Tue May 18, 2004 12:27 pm Reply with quote

The reason is does not work now, is because you changed the font face. That is not the font face used to display it on your page, its only there to locate the start position in the source on the yahoo games site.
Your css should control your block fonts without problems, there's no need to put a font face in the block itself.

At the bottom, you can edit this bit:
Code:
$content .= "<br>Pool: "; 

to
Code:
$content .= "<br>Pool players online: "; 
 
peace







PostPosted: Tue May 18, 2004 12:38 pm Reply with quote

tyvm Ganja but it dont works i only have a block which says in it pool:
i only chaged arial font with Verdana.

i just want it says in block like ;
(total)players online:blabla and pool players online:blabla Rolling Eyes
 
GanjaUK







PostPosted: Tue May 18, 2004 12:48 pm Reply with quote

Some double post detail going on. Laughing
 
peace







PostPosted: Tue May 18, 2004 12:55 pm Reply with quote

i tho there is a post u psted is it deleted ? Rolling Eyes
 
GanjaUK







PostPosted: Tue May 18, 2004 1:04 pm Reply with quote

Sorry, I don't understand. I responded to you regarding the block not working. It will work fine if you do not change that font face.
 
peace







PostPosted: Tue May 18, 2004 1:31 pm Reply with quote

yes i know u did Ganja i red it but now i cant see it .you were tellin me at the end u can play with it bit Rolling Eyes .

Ok block works now it says

174,484 Players Online
blabla Online: 33866

i want it says ;

total yahoo games players online: 174,484
and 33866 of them blabla
 
GanjaUK







PostPosted: Tue May 18, 2004 2:12 pm Reply with quote

Code:


<?php

if (eregi("block-YahooGames.php",$_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}

$address = "http://games.yahoo.com";

$begin = "<font color=\"FFFFFF\" face=arial size=-1>";
$end = "&";

ob_start();
$guk = readfile($address);
$guk = ob_get_contents();
ob_end_clean();

$ganjauk = explode($begin, $guk);
$ganjauk = explode($end, $ganjauk[1]);

$content .= "Total Yahoo games players online: ";
$content .= $ganjauk[0];

$address = "http://games.yahoo.com";

$begin = "Pool</a></font><font face=arial size=-2>&nbsp;(";
$end = ")";

ob_start();
$guk = readfile($address);
$guk = ob_get_contents();
ob_end_clean();

$ganjauk = explode($begin, $guk);
$ganjauk = explode($end, $ganjauk[1]);

$content .= "<br>";
$content .= $ganjauk[0];
$content .= " playing pool.";
$content .= "<br><br><center><a href=http://www.ganjauk.com target=_blank>GanjaUK</a></center>";

?>


You mentioned in PM you would like to link to my site in the block, so I added that to the bottom, feel free to delete that line if you prefer. I personally think credits in blocks are unnecessary.
 
peace







PostPosted: Wed May 19, 2004 2:37 am Reply with quote

ty for all help Ganja Razz

i finished it and before make it public want to show you for your permission coz i removed your link from footer but added to header ( i dont like that kind of links in blocks including mine) plz pm me your mail
regards
 
GanjaUK







PostPosted: Wed May 19, 2004 3:36 am Reply with quote

No problem, I misunderstood what you meant when you said you wanted the link there. Send me a private message with your URL.

Thanks
 
peace







PostPosted: Wed May 19, 2004 3:47 am Reply with quote

i tho u misunderstod coz of my poor english Embarassed i lots times say something which i didnt mean to say Sad apolagize

as i said i dont wanna activate it or share to others ( respecting your job and want your permission ) till you see all folder so do you still see it on my site or can i mail it to you ?and if i activate it how you ll see the code in block Shocked

Thanks

p.s: ill open a new post about that sigs hoping you help me again Cool
 
GanjaUK







PostPosted: Wed May 19, 2004 4:39 am Reply with quote

Hey, no need to apologise. You speak English a lot better than I can speak any foreign language.
Just click email below my post, send me the details, I will take a look at it.
 
peace







PostPosted: Wed May 19, 2004 4:56 am Reply with quote

GanjaUK wrote:
Hey, no need to apologise. You speak English a lot better than I can speak any foreign language.
ty for your patience Razz


GanjaUK wrote:
Just click email below my post, send me the details, I will take a look at it.

where Shocked

you only have site addy , pm and profile and i also checked your site but there is only feedback in contact as usual Smile
 
GanjaUK







PostPosted: Wed May 19, 2004 5:05 am Reply with quote

My email is: webmaster(AT)ganjauk.com
 
peace







PostPosted: Wed May 19, 2004 6:26 am Reply with quote

Ganja i have a question hope it will be last lol

its possible i miss something when chance it bit problem is it shwos total visitors like 96,000 but pool users i cant see comma it says only 17456 Rolling Eyes
 
GanjaUK







PostPosted: Wed May 19, 2004 6:32 am Reply with quote

Using that method, you can only display those figures in that block the same as Yahoo displays them on: http://games.yahoo.com

You could always email yahoo and ask them to change it. Some how I dont think they would help though. Laughing
 
peace







PostPosted: Wed May 19, 2004 6:40 am Reply with quote

oh k ty Ganja

i can learn to rewrite php nuke while waiting yahoo answer me mean 20 years Mr. Green
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©