Help redesign a call tracking system, conceptaul question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Insyderznf
Forum Newbie
Posts: 11
Joined: Fri Sep 10, 2010 5:08 pm

Help redesign a call tracking system, conceptaul question

Post by Insyderznf »

Hello all,

I'm new to php/mysql but not new to programming or sql in general but I'd like some conceptual advice here from some people with experience.

My task is to try and create a better call tracking system than the one our vendor uses. They have a web based system that is just horrendous and looks like it was adapted from something else so many fields do not match up correctly. The first issue is we will still have to use this website to submit the call to the vendor but I also want to have a copy of the call submitted in our own local database so we can track information and updates that the current vendor's call system doesn't track. I'm not in any real time crunch right now and am working on this on my spare time at work so I want to try and do it right other than slap something together in one of the other languages I know.

Based on the above information how would you guys handle the duplicate posting of the information? I have a few thoughts on this, my first one is to write in JavaScript a redirect page that after the call information is entered into my own help call page it redirects the user to the vendor web page and fills out the information for them. I'm not sure if this will work though as it has been a very long time since I have wrote java script, and now that I think about it the vendor website has a password page at the beginning.

My other thought was to ask the vendor if I can connect to their database and submit the information directly just like they do in the help call system. I'm thinking that I would probably be told no to this.

What else can you guys think of to help avoid making a person enter the same help call twice?

Thank You for your time,

-Nick
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: Help redesign a call tracking system, conceptaul questio

Post by John Cartwright »

I most certainly would implement a job queue system, where you can queue requests (which would be processed in the background) to keep your remote service up to date. This would allow you to keep your local version interactively fast, and keeps you in complete control of the process flow.

A couple follow up terms: cron jobs, curl
User avatar
mecha_godzilla
Forum Contributor
Posts: 375
Joined: Wed Apr 14, 2010 4:45 pm
Location: UK

Re: Help redesign a call tracking system, conceptaul questio

Post by mecha_godzilla »

Ok, this may or may not work:

If you can manually access the vendor's site (via their web form) there's no reason why you couldn't create a script that runs on your system and connects to the vendor's script, provided that the 'request' looks like it's legitimate (IE it has properly formed headers, etc.) When you log-in to their system and report a call, take a look at the source code for their web form to see what the name of the script is and the name of the values that are being captured.

This approach might not work for two reasons:

1. The password process gets in the way
2. If the vendor's script checks to see where the request is coming from it may be refused (IE they've got a referrer check in their scripts)

If these issues aren't relevant, essentially what you're doing is creating a very basic API to the vendor's script. Wearing my 'borrowed' blackhat for the moment, this technique can be used to manually submit queries to almost any site - and indeed is used for penetration testing, etc.

Let me know what you think about this idea. Using JavaScript may or may not work - you'd need to check whether there are any cross-domain issues (because you're using a script on one site to submit data to another, and this wouldn't be a problem for a PHP script). Also, if you went with a JavaScript solution you'd need to look at implementing something in AJAX I would have thought - don't ask me about that though as I have zero knowledge of 'client-push' technologies :mrgreen:

HTH,

Mecha Godzilla
jarofgreen
Forum Commoner
Posts: 71
Joined: Sun Jul 11, 2010 12:40 pm

Re: Help redesign a call tracking system, conceptaul questio

Post by jarofgreen »

Insyderznf wrote: My other thought was to ask the vendor if I can connect to their database and submit the information directly just like they do in the help call system. I'm thinking that I would probably be told no to this.
Why? That's called an API. Most 3rd party vendors I know try to supply one for exactly this reason - so other people can interface one system to another. Before you get hung up on this black hat stuff* have a polite chat with them.

But phrase it carefully - you will never get direct access to their database. What you will probably get is a URL that you call with specified parameters that returns a bit of XML/JSON/whatever indicating success or failure.

* But if you do, you can fake Referrer headers ... but it's not a fun solution.
User avatar
mecha_godzilla
Forum Contributor
Posts: 375
Joined: Wed Apr 14, 2010 4:45 pm
Location: UK

Re: Help redesign a call tracking system, conceptaul questio

Post by mecha_godzilla »

jarofgreen - I suspect we're kind of saying the same thing here, but I was just trying to give a bit of background to the issue.

I'd agreed that you're almost certain not to get access to their database, but they should be willing to provide some form of support. If you were trying to do something that was obviously meant to 'move away' from their system then you can pretty much expect zero help, but otherwise you can at least make some general enquiries (after all, all you're trying to do is streamline your businesses processes).

The vendor's type of company will probably be the best indicator of how likely they are to help you - the company might be so big that it's not interested in providing any support to you at all (think Microsoft!), they might only be reselling a system for someone else, or they might be a small outfit that's willing to help. Conversely, some small companies are very secretive about what they're doing - either because they think you're trying to steal what they've got or they're not confident their systems stand up to close scrutiny (that's obviously a crude generalisation, but in my experience this has certainly been the case).

So then, which approach you want to take depends on how amenable the vendor might be. Also, I presume that 'historic' data is only available from the vendor's system, so you need to make sure you've got backups of this as well if you want to develop your own system.

HTH,

M_G
Post Reply