From jan at sportz.co.za Wed Nov 12 10:48:57 2003 From: jan at sportz.co.za (jan@sportz.co.za) Date: Mon Aug 2 21:40:02 2004 Subject: [Za-pm] HTTP requests from PERL Message-ID: I hope that someone can give me some advise or direct me to further information: I am currently working on a MOD that will enable SMS (Short Message Services) from a PERL based portal solution. In the process I have to interrogate a SMSC (Short Message Service Center) Server of one of the local Mobile Operators for available credits, routing path etc. All this interrogation is done via normal HTTP requests/commands. My problem is that my knowledge of PERL and HTTP is not enough (yet), so I am having quite a tough time. If anybody can put me on the right track, then I will be grateful: When I send the command directly from a browser: http://mobile.net:5544/api/submission/credits/get_credit.mc?usr=XXXX&pass=XXXXX&msg_id=XXXXXX then the SMSC responds in the format CREDIT_COUNTAVAILABLE_DAYSREFERENCE for example: 200.225FDH889H How do I execute this HTTP command from within my PERL code (without using a HTML form), and how do I capture the response from the SMSC in a variable? Any/all advice will be appreciated! Regards Jan From nick at cleaton.net Wed Nov 12 11:10:50 2003 From: nick at cleaton.net (Nick Cleaton) Date: Mon Aug 2 21:40:02 2004 Subject: [Za-pm] HTTP requests from PERL In-Reply-To: References: Message-ID: <20031112171050.GE484@lt1.cleaton.net> On Wed, Nov 12, 2003 at 11:48:57AM -0500, jan@sportz.co.za wrote: > How do I execute this HTTP command from within my PERL code (without > using a HTML form), and how do I capture the response from the SMSC > in a variable? The LWP::UserAgent module does that stuff. -- Nick From christiaan at jib.co.za Wed Nov 12 11:12:43 2003 From: christiaan at jib.co.za (Christiaan (JIB)) Date: Mon Aug 2 21:40:02 2004 Subject: [Za-pm] HTTP requests from PERL In-Reply-To: Message-ID: Jan hi This is quite an easy process - if I dare so myself You would want to use LWP::UserAgent or LWP::Simple I use it in conjunction with HTML::Form and HTML::Parser Read up about these 4 and you will get a clear idea If you don't come right give me a shout Cheers Christiaan Engelbrecht Just Intelligent Business (PTY) Ltd Tel: 021 686 1620 ext 206 Fax: 021 686 8385 Cell: 083 395 6787 -----Original Message----- From: za-pm-bounces@mail.pm.org [mailto:za-pm-bounces@mail.pm.org] On Behalf Of jan@sportz.co.za Sent: 12 November 2003 06:49 PM To: za-pm@mail.pm.org Subject: [Za-pm] HTTP requests from PERL I hope that someone can give me some advise or direct me to further information: I am currently working on a MOD that will enable SMS (Short Message Services) from a PERL based portal solution. In the process I have to interrogate a SMSC (Short Message Service Center) Server of one of the local Mobile Operators for available credits, routing path etc. All this interrogation is done via normal HTTP requests/commands. My problem is that my knowledge of PERL and HTTP is not enough (yet), so I am having quite a tough time. If anybody can put me on the right track, then I will be grateful: When I send the command directly from a browser: http://mobile.net:5544/api/submission/credits/get_credit.mc?usr=XXXX&pass=XX XXX&msg_id=XXXXXX then the SMSC responds in the format CREDIT_COUNTAVAILABLE_DAYSREFERENCE for example: 200.225FDH889H How do I execute this HTTP command from within my PERL code (without using a HTML form), and how do I capture the response from the SMSC in a variable? Any/all advice will be appreciated! Regards Jan _______________________________________________ Za-pm mailing list Za-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/za-pm