redirect based on text on an external website

  • one2one
  • Novice
  • Novice
  • one2one
  • Posts: 24
  • Loc: Lancaster, PA

Post 3+ Months Ago

Scenario: I have a chat application (NTR) that uses code to generate text on an external page to tell if an agent is logged into the chat program or not. Example: If there is an agent logged in, the external page displays: ONLINE. If there is no agents logged in, the external page displays: OFFLINE.

What I was wondering was; is there a way for me to capture that text into an script (javascript, asp classic, php, whatever) and turn it into a variable in order to create a redirect based on that variable.

Therefor if an agent is online, and that page is displaying the text: ONLINE, I can have code that will redirect a user to the chat login page, but if it says OFFLINE it will redirect to a different page.

Thoughts?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Zealous
  • Guru
  • Guru
  • User avatar
  • Posts: 1240
  • Loc: Sydney

Post 3+ Months Ago

Well then by the sounds of it you have no programming experience and also you don't even know what language the software is using so your missing some details here.

But if i had to guess it would be php from web based software and then i would find where that external page is located and find out what is really behind door no.1

But you would extend the online function to if online then load redirection function to X.php and if online idle on index.php.

There is a lack of information, Never used that software either.......
  • one2one
  • Novice
  • Novice
  • one2one
  • Posts: 24
  • Loc: Lancaster, PA

Post 3+ Months Ago

No, not at all, but thanks for being condescending.

NTR provides us with a URL: http://na.ntrsupport.com/inquiero/inter ... asp?login= <our UID>

Which provides a simple output based on if one of our users is logged intot he chat application. Offline or Online. Plain text.

Other companies (Connectwise for example) have used this to create a redirect on thier own site when people click on thier support chat link. If one of thier agents is online, it checks that URL, and rediects them appropriatly.

I'm just wondering what they used, or what I could use, to make that happen. I've programmed in a few different languages, but better than that, I can easily outsoarce this project to a better developer, I am just looking for advise from folks who may have had to do this before or are familiar with NTR.
  • Zealous
  • Guru
  • Guru
  • User avatar
  • Posts: 1240
  • Loc: Sydney

Post 3+ Months Ago

oh dude just found a email about the reply and must of been a bad day of post. Sorry mate


But i have taken another look at this and i am unsure of external checking but as far as i know your going to need a variable in the external script for the chat script to detect but then again there has to be a snippet somewhere that could do it.

been a month or so? how did u go with it?
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

The language is ASP, it says so in the URL. However, it doesn't matter if it's ASP, PHP, Perl, Ruby or whatever else you can think of. In order for the browser to display the information, it has to be HTML, XML or something similar. What this means to you is that you need a script (running in whatever language you want) that pulls that page down, then parses the contents of it to pull out the online/offline information, associating it properly to the agent to which it belongs. Once you've done this, the rest is fairly straightforward and you can set up redirects, enable your own profiles for these people, or whatever it is you're trying to do based on this.

Given that you're going to have to know how to at least use wget, curl or something similar and that you're going to have to know how to parse this data, and that you didn't know it was an ASP script, I'd have to say you don't have the required skill set to do this too. That's not being condescending, it's being realistic. If you're going to do this yourself, it means you're going to have to pick a language and at the very least learn how it uses regular expressions and that you have a long way to go before you're going to know how to do this. However, this is a place where people can come to get help in doing just those things. That being said, this is not a place where people generally come to post about problems that they're just going to outsource because whoever they hire will make it such that they never have to even think about things like this (which is why you hire them). If you're just going to farm the job out, it probably would have been better posted on a freelancer site or some such as nobody here will be able see how you came to a solution and hence nobody else will learn from your issue, which is what this site is all about.
  • one2one
  • Novice
  • Novice
  • one2one
  • Posts: 24
  • Loc: Lancaster, PA

Post 3+ Months Ago

this213 wrote:
What this means to you is that you need a script (running in whatever language you want) that pulls that page down, then parses the contents of it to pull out the online/offline information, associating it properly to the agent to which it belongs. Once you've done this, the rest is fairly straightforward and you can set up redirects, enable your own profiles for these people, or whatever it is you're trying to do based on this.


That's the info i am looking for. Does anyone know of a script that can grab a page like that and parse the content?
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

No, because a script like that has to be custom written for the page your pulling data from, and if that page ever changes anything in its layout, you'll have to change your parsing script to match.
  • one2one
  • Novice
  • Novice
  • one2one
  • Posts: 24
  • Loc: Lancaster, PA

Post 3+ Months Ago

gotcha, well, i'd ask if anyone wanted the job, but based on your responses, this isn't that kind of site. Thanks all.
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

There's a section for that here job-opportunities/

Post Information

  • Total Posts in this topic: 9 posts
  • Users browsing this forum: No registered users and 132 guests
  • 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 post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.