473,326 Members | 2,337 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

PHP Script - How to track courier service using tracking number from my website.

aveeva
33
I need like,

http://www.trackcourier.in/

The customer chooses selected courier service and enters tracking id then clicks its redirect to the appropriate courier service website.

eg: If tracking id 12345 the redirect link should be https://www.fedex.com/apps/fedextrac...&cntry_code=in

How to do for India courier services?

My code:

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE HTML>
  2. <html>  
  3. <body>
  4.  
  5. <form action="#" method="post">
  6. Select Courier :
  7. <select name="courier">
  8.   <option value="">--Please choose an option--</option>
  9.   <option value="professional_courier">Professional Courier</option>
  10.   <option value="india_post">India Post</option>
  11. </select>
  12.  
  13. Trackingid: <input type="text" name="trackingid"><br>
  14. <input type="submit">
  15.  
  16. </form>
  17.  
  18.  
  19.  
  20. <?php 
  21. if (!empty($_POST)): header("Location: https://www.tpcindia.com/Tracking2014.aspx?id=".$_POST["trackingid"]."&type=0&service=0");
  22. endif;
  23. ?>
  24.  
  25. </body>
  26. </html>
  27.  
Now I have added only one courier service, how can i add more than one courier service URL
Nov 29 '19 #1
1 2742
aveeva
33
Final Code :

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE HTML>
  2. <html>  
  3. <body>
  4.  
  5. <form action="#" method="POST">
  6. Select Courier :
  7. <select name="courier">
  8.   <option value="">--Please choose an option--</option>
  9.   <option value="professional_courier">Professional Courier</option>
  10.   <option value="india_post">India Post</option>
  11. </select>
  12.  
  13. Trackingid: <input type="text" name="trackingid">
  14. <input type="submit">
  15.  
  16. </form>
  17.  
  18. <?php
  19. if(isset($_POST['courier']))
  20. {
  21.     if(isset($_POST['professional_courier']))
  22.     {
  23.         if (!empty($_POST)): header("Location: https://www.tpcindia.com/Tracking2014.aspx?id=".$_POST["trackingid"]."&type=0&service=0");
  24.     }
  25.  
  26.     else(isset($_POST['india_post']))
  27.     {
  28.         if (!empty($_POST)): header("Location: https://www.dhl.com/en/express/tracking.html?AWB=".$_POST["trackingid"]."&brand=DHL");
  29.     }    
  30. }
  31. ?>
  32. </body>
  33. </html>
  34.  
Any help, Thanks.
Dec 4 '19 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Harry Hudini | last post by:
Is it possible to restart a service using ASP ? I have some code here to restart a service using vbscript, but it doesnt translate into asp at all. I also have a script here that displays the...
4
by: pjac | last post by:
I need assistance in creating an Automatic tracking number that appears in a textbox that looks like: 2004-001. The first part of the number is based on the year, the second part is generated from...
2
by: raghavendra | last post by:
Hi, How to run automatically windows service by using setup deployment insatllation script using visual studio 2003.? What i did is :-- 1. created a windows service & tested the same. 2....
1
by: John Lee | last post by:
Hi, I have two web services and they are setup as "Integrated Windows Authentication" only and they are both assigned to application pool with Domain Account. I can use ws.Credentials =...
3
by: Jim Lewis | last post by:
I have read several things that state accessing a Web Service through a Query String should work. However, when I try to execute http://localhost/webservice1/service1.asmx/HelloWorld I get the...
5
by: David Lozzi | last post by:
Howdy, I wrote a web service in .Net for my customer. My customer has another vendor who now has to consume it but they are not using Visual Studio. Most of their pages are jsp, and they said...
0
by: JDF | last post by:
I am trying to create a Windows service using SimpleXMLRPCServer and win32serviceutil. The service itself seems to be working properly (starts, stops, etc) and I can connect using an XMLRPC client...
6
by: Ravi Shankar | last post by:
Hello, I have written a service using VB.Net which is basically a asynch socket listener. I have been able to install it successfully. Using the Service Control Manager I am able to start & stop...
3
by: =?Utf-8?B?RGFuZGFuIFpoYW5n?= | last post by:
Now I have a web application, a web service and a SQL Server database. The Web application will invoke the web service, the web service invokes the SQL Server stored procedure. I let the web...
0
by: dippy2050 | last post by:
Hi, I get an undefined sub routine error at the line in bold. But I can consume the same service using SOAP UI #!/usr/bin/perl #!/usr/bin/perl -w #use SOAP::Lite +trace =>'debug';...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.