Sigx

We are the future in the past.
It is currently Mon Dec 09, 2019 11:23 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 39 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: Mon Jan 26, 2004 1:35 pm 
Offline

Joined: Sun Jan 25, 2004 2:49 am
Posts: 3
That worked a treat. I know have a counter.

THANK YOU!!!!! :P


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 30, 2004 7:58 pm 
Offline
Site Admin

Joined: Thu Jul 03, 2003 1:59 pm
Posts: 454
Location: Los Angeles
show it off Midget


Top
 Profile  
 
 Post subject: modified mid function.
PostPosted: Mon Feb 09, 2004 5:47 am 
Offline

Joined: Wed Jan 21, 2004 3:43 am
Posts: 23
I modified the mid function to allow it to start at a certain string. So that you can keep getting the next data in the row. I know i put iString, when it should be sString... but I didn't feel like changing it. Anyway here is the modified one if anyone wants it.

Code:
function GetMid($TheStr, $sLeft, $sRight, $iStart){

   if(!$iStart==0){
      $pStart = strpos($TheStr, $iStart, 0) + strlen($iStart);
   }else{
      $pStart = 0;
   }
   $pleft = strpos($TheStr, $sLeft, $pStart);
   if ($pleft !== false){
      $pright = strpos($TheStr, $sRight, $pleft + strlen($sLeft));         
      If ($pright !== false) {
         return (substr($TheStr, $pleft + strlen($sLeft), ($pright - ($pleft + strlen($sLeft)))));
      }
   }
   return '';
}


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 09, 2004 10:52 am 
Offline
Site Admin

Joined: Thu Jul 03, 2003 1:59 pm
Posts: 454
Location: Los Angeles
what do YOU personally do with that, im just curious.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 14, 2004 9:54 am 
Offline

Joined: Sun Feb 08, 2004 7:23 am
Posts: 38
Hey IVIaniac...I was wondering if there was a way to change the position of the counter (there has to be, and i must just be blind)
Im using your script, and made my graphic but I feel limited to making it look the same way all the time, since I can't figure out how to move the counter.
I went through the whole code, but not good enough I guess.
Please tell me where to change it.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 14, 2004 12:03 pm 
Offline
Site Admin

Joined: Thu Jul 03, 2003 1:59 pm
Posts: 454
Location: Los Angeles
the line of code your looking for is

Code:
imagestring ($im, $font, 480, 114, "Hits:$counter", $fontColor2);


it should be on line 210.


all you need to do is change the X and Y coordinates (x=480, y=114)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 14, 2004 1:44 pm 
Offline

Joined: Fri Feb 13, 2004 8:25 pm
Posts: 17
cant get this to work at all.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 14, 2004 1:46 pm 
Offline
Site Admin

Joined: Thu Jul 03, 2003 1:59 pm
Posts: 454
Location: Los Angeles
does your server provide GD and php support?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 14, 2004 3:04 pm 
Offline

Joined: Fri Feb 13, 2004 8:25 pm
Posts: 17
lol, yeah, that all works fine, i can get the remotex working, i just cant add a counter, or have other text in there. i cant get that counter working, and ive looked at that other one someone has on their ftp, and thats all messed up.

i mean i can set a string, i just cant get it to print it, no idea where im looking.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 14, 2004 9:24 pm 
Offline

Joined: Sun Feb 08, 2004 7:23 am
Posts: 38
admin wrote:
the line of code your looking for is

Code:
imagestring ($im, $font, 480, 114, "Hits:$counter", $fontColor2);


it should be on line 210.


all you need to do is change the X and Y coordinates (x=480, y=114)


Gosh im dumb...I was looking for something that had the part to say Hits: but never saw that line. Thanks much Mr. Admin Sir.

_________________
See. Spot. Save.

Slowly Coming Together Click for a preview of the layout!
Image


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 18, 2004 2:46 am 
Offline

Joined: Wed Jan 21, 2004 3:43 am
Posts: 23
I was working on grabbing stats from 2 diffrent sites. The output that SigX gives me, and statistics for an online game called Outwar. I revised the mid function to grab diffrent data from within the page, since it's not a nicely formed chunk of data like the remoteX you offer, I have to find diffrent strings, and start from there... The modification of that mid function dosn't make execution time any worse, and dosn't detour the use already setup.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 15, 2004 2:55 pm 
Offline

Joined: Sat Mar 06, 2004 4:17 pm
Posts: 276
Ok, i posted this yesterday, but the db was restored.

Well, i tried everything to get the hit counter to show up, and i failed. Everytime i tried I either got a total Yellow/orangeish Box, or a Black box with red text with my specs. I read through the thread multiple times and came up with the same results... I'm not good at PHP, i know small things, but nothing major.

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 15, 2004 10:16 pm 
Offline

Joined: Wed Jan 21, 2004 3:43 am
Posts: 23
Ok how to get a counter....

Find this:

Code:
$fz = GetMid($alldata,"<fz="," \fz>"); // font size


Then on the next line add:

Code:
$counter = GetMid($alldata,"<counter="," \counter>"); // counter


Now go down about 5 lines and find this:

Code:
if( $data ){ // if we get the data ok
   drawIt(...);


Then add $counter, between the ( ) marks


Code:
// cool functions
////

function drawIt(...){


NOTE: drawIt will have text between the ( ) marks, not ...

Then modify drawIt(...) with this text

Code:
$counter="0"


It'll look something like:

Code:
function drawIt($data, $counter="0", $Xoffset=2, $Yoffset=2, $backIMG){


NOTE: drawIt(...) will look diffrent for you as I altered mine, and don't have the origional sigx.php file. There should be more data.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 16, 2004 5:03 am 
Offline

Joined: Sat Mar 06, 2004 4:17 pm
Posts: 276
Thanks alot maniac, i'll try that in a few mintues, if i have the time. Hopefully this will work. So the placement of my Counter, will be from the Xoffset and Yoffset in the fucntions drawit(..) ??

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 16, 2004 8:37 am 
Offline
Site Admin

Joined: Sun Mar 14, 2004 6:43 pm
Posts: 18
you'll have to add

Code:
imagestring ($im, $font, 480, 114, "Hits:$counter", $fontColor2);


this is where the X,Y comes from... you add this somewhere inside the draw it, after the output occured.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 39 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group