Can I run a custom script/URL after ticket is submitted

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
curiosus
Posts: 11
Joined: Wed Oct 24, 2012 4:57 pm

Can I run a custom script/URL after ticket is submitted

Post by curiosus »

Can I run a custom script/URL after ticket is submitted?
For example if someone submits a ticket, a custom PHP script will get executed.

If this is currently possible how do I do it?
If not, I hope you can add it as feature. Thanks.
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Can I run a custom script/URL after ticket is submitted

Post by Klemen »

You would have to modify source code of submit_ticket.php file to do that and I'm afraid there are so many possible options and ways of doing it (you didn't say exactly what you wish to achieve) it's not planned for future versions at the moment,
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
curiosus
Posts: 11
Joined: Wed Oct 24, 2012 4:57 pm

Re: Can I run a custom script/URL after ticket is submitted

Post by curiosus »

Thank you.

Well basically, what I want to achieve was pretty much run an external URL (silently without interfering with the user experience) after a new ticket is successfully submitted.

Guess i'll play around with submit_ticket.php but if you have a tip on how can I best achieve this that'll be awesome thanks :D
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Can I run a custom script/URL after ticket is submitted

Post by Klemen »

There are many ways of doing it, depending on what you need.

For example one way is to include a hidden image with the link to your URL on the page that shows after a ticket is submitted.

Another way is to include PHP code to do a PHP POST/GET to an URL of your choice before the "ticket submitted" page shows. You should be able to find code samples in Google.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
curiosus
Posts: 11
Joined: Wed Oct 24, 2012 4:57 pm

Re: Can I run a custom script/URL after ticket is submitted

Post by curiosus »

We'll play around with it, thanks!
curiosus
Posts: 11
Joined: Wed Oct 24, 2012 4:57 pm

Re: Can I run a custom script/URL after ticket is submitted

Post by curiosus »

For anyone interested, I used:

Code: Select all

file_get_contents('http://example.com/test.php');
inside submit_ticket.php just above:

Code: Select all

// Print header
require_once(HESK_PATH . 'inc/header.inc.php');
Post Reply