php forum
php mysql forum
php mysql smarty
 
Topic Options
#285875 - 08/01/05 11:16 AM I need help with an online.php mod
Dalantech Offline
Junior Member

Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
What I want to do is search the user agent string (contained in $Agent) for yahoo and then change the $Agent string to an image link. I think that the forward slashes in the $Agent string are causing stristr to fail, but I don't know how to remove them. A search and replce mabey?<br /><br />Here is my code:<br /><br />
Code:
  if (stristr($Agent, 'yahoo') !== false) {<br />      $Agent = "&lt;img border=\"0\" align=\"middle\" src=\"{$config['imageurl']}/yahoo.gif\" alt=\"Yahoo bot eating all our bandwidth\" /&gt;;<br />//} 
<br /><br />I'll try a search and replace first and see if that makes a difference -but any ideas are welcome!
_________________________
Da LAN Tech

Threads Dev Moderator

Top
#285876 - 08/01/05 11:45 AM Re: I need help with an online.php mod [Re: jacksonm99]
Dalantech Offline
Junior Member

Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
Nevermind: I made a typo. Can you find the missing " ?...<br /><br />I hate it when I do that! <img src="http://www.ubbdev.com/forum/images/graemlins/mad.gif" alt="" />
_________________________
Da LAN Tech

Threads Dev Moderator

Top
#285877 - 08/01/05 12:10 PM Re: I need help with an online.php mod [Re: jacksonm99]
Dalantech Offline
Junior Member

Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
Take a look at my who's online display <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
Da LAN Tech

Threads Dev Moderator

Top
#285878 - 08/01/05 01:34 PM Re: I need help with an online.php mod [Re: jacksonm99]
Medar Offline
Junior Member

Registered: 03/19/00
Posts: 571
Nice!

Top
#285879 - 08/01/05 01:43 PM Re: I need help with an online.php mod [Re: Intel -*RW*-]
Dalantech Offline
Junior Member

Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
Thanks -maybe a future mod... <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
Da LAN Tech

Threads Dev Moderator

Top
#285880 - 08/03/05 11:58 AM Re: I need help with an online.php mod [Re: jacksonm99]
DrChaos Offline
Coder

Registered: 09/12/03
Posts: 816
Loc: Hollywood Florida.
Oh please, oh please <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /><br /><br />thats a nice touch
_________________________
DrChaos
LeetGamers

Top
#285881 - 08/04/05 07:13 AM Re: I need help with an online.php mod [Re: Duck]
ScriptZ Man Offline
User

Registered: 01/03/05
Posts: 38
That would be an AWESOME enhancement HackMOD!!!

Top
#285882 - 08/04/05 10:16 AM Re: I need help with an online.php mod [Re: Pumpkihn]
StanCA Offline
Power User

Registered: 07/01/02
Posts: 71
Ok<br /><br />So what is a user agent????<br /><br />(said shyly and feeling dumb)

Top
#285883 - 08/04/05 01:07 PM Re: I need help with an online.php mod [Re: pdlang]
Dalantech Offline
Junior Member

Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
[]StanCA said:<br />Ok<br /><br />So what is a user agent????<br /><br />(said shyly and feeling dumb) [/]<br /><br />When someone surfs to your web site the http get packet (the request that they send for a specific page) has information in it that can identify the browser that they are using, their operating system (XP, NT, OSX, etc.) and some other odds and ends. The standard whos online display just shows the user agent text -kinda boring. The mod that I've done replaces the text with a graphic if the user agent is known. If it's unknown the standard text is still displayed -for now. I may change that to some sort of generic image since it's impossible to check for every possible user agent and may prove to be too slow if I tried.
_________________________
Da LAN Tech

Threads Dev Moderator

Top
#285884 - 08/06/05 09:39 PM Re: I need help with an online.php mod [Re: jacksonm99]
StanCA Offline
Power User

Registered: 07/01/02
Posts: 71
is the full code for that in the first post???

Top
#285885 - 08/08/05 07:24 AM Re: I need help with an online.php mod [Re: pdlang]
Dalantech Offline
Junior Member

Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
LOL! Nope -just a sample.<br /><br />I spent a lot of time hashing out the logic for that hack and to make it a little faster in determining what the user agent is. There are a couple of problems with the way I have it set up...
  • You'd have to have Josh's Who's Online User Info hack installed (I think that's what he called it).
  • If he didn't update it to make it more "template friendly" then you'd have even more hacking to do since I remember, a long time ago, hacking Josh's hack <img src="http://www.ubbdev.com/forum/images/graemlins/wink.gif" alt="" />
_________________________
Da LAN Tech

Threads Dev Moderator

Top
#285886 - 08/11/05 11:18 AM Re: I need help with an online.php mod [Re: jacksonm99]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
Does look good Dal, would be a nice mod <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
- Allen wavey
- What Drives You?

Top
#285887 - 08/12/05 10:03 AM Re: I need help with an online.php mod [Re: SurfMinister]
Dalantech Offline
Junior Member

Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
I'm almost finished with it. When I'm done I'll use Beyond Compare to compile the changes and package it as a mod.
_________________________
Da LAN Tech

Threads Dev Moderator

Top
#285888 - 08/14/05 01:48 AM Re: I need help with an online.php mod [Re: jacksonm99]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
That's pretty sweet. <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /> Especially the firefox logo.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks