Home Backend Development PHP Tutorial PHP express query interface

PHP express query interface

Jul 29, 2016 am 09:03 AM
break quot

PHP express query interface

function kuaidi100_scan($getcom,$invoice_sn) {
    
	switch ($getcom) {
        case "EMS":
            $postcom = 'ems';
            break;
        case "中国邮政":
            $postcom = 'ems';
            break;
        case "申通快递":
            $postcom = 'shentong';
            break;
        case "圆通速递":
            $postcom = 'yuantong';
            break;
        case "顺丰速运":
            $postcom = 'shunfeng';
            break;
        case "天天快递":
            $postcom = 'tiantian';
            break;
        case "韵达快递":
            $postcom = 'yunda';
            break;
        case "中通速递":
            $postcom = 'zhongtong';
            break;
        case "龙邦物流":
            $postcom = 'longbanwuliu';
            break;
        case "宅急送":
            $postcom = 'zhaijisong';
            break;
        case "全一快递":
            $postcom = 'quanyikuaidi';
            break;
        case "汇通速递":
            $postcom = 'huitongkuaidi';
            break;
        case "民航快递":
            $postcom = 'minghangkuaidi';
            break;
        case "亚风速递":
            $postcom = 'yafengsudi';
            break;
        case "快捷速递":
            $postcom = 'kuaijiesudi';
            break;
        case "华宇物流":
            $postcom = 'tiandihuayu';
            break;
        case "中铁快运":
            $postcom = 'zhongtiewuliu';
            break;
        case "FedEx":
            $postcom = 'fedex';
            break;
        case "UPS":
            $postcom = 'ups';
            break;
        case "DHL":
            $postcom = 'dhl';
            break;
        default:
            $postcom = '';
    }
    if (empty($postcom)) {
        return false;
    }
    $curr_time = time();
    $url = 'http://m.kuaidi100.com/query?type='.$postcom.'&id=1&postid=' .$invoice_sn. '&temp='.$curr_time;
    $res = file_get_contents($url);
    $res = json_decode($res,true);
    if ($res['status'] == 200) {
        return $res['data'];
    }
    return false;
}


kuaidi100_scan("中通速递","375590702050");
Copy after login

The above introduces the PHP express query interface, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1666
14
PHP Tutorial
1273
29
C# Tutorial
1252
24
php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 Jun 13, 2016 am 10:23 AM

php提交表单通过后,弹出的对话框怎样在当前页弹出php提交表单通过后,弹出的对话框怎样在当前页弹出而不是在空白页弹出?想实现这样的效果:而不是空白页弹出:------解决方案--------------------如果你的验证用PHP在后端,那么就用Ajax;仅供参考:HTML code

Let's talk about not using break in PHP switch statement Let's talk about not using break in PHP switch statement Mar 20, 2023 pm 04:55 PM

It is very common to use switch statements to select multiple branches in PHP. Usually, a break statement is used to exit the switch statement after each branch. However, there are situations where we do not want to use the break statement. This article will introduce the situation of not using break in the PHP switch statement.

What is the usage of break in php What is the usage of break in php Jan 31, 2023 pm 07:33 PM

In PHP, break is used to jump out of the current syntax structure and execute the following statements; it can be used in statements such as switch, for, while, and do while. It can terminate the code of the loop body and jump out of the current loop immediately, and execute the following statements after the loop. code. The break statement can take a parameter n, which represents the number of levels to jump out of the loop. If you want to jump out of multiple loops, you can use n to represent the number of levels to jump out of. If there is no parameter, the default is to jump out of the current loop.

What is the function of break keyword in Java? What is the function of break keyword in Java? Apr 23, 2023 am 10:13 AM

Note 1. The function of break is to jump out of the current loop block (for, while, dowhile) or program block (switch). 2. The function of the loop block is to jump out of the loop body currently in the loop. The function of the program block is to interrupt and compare the next case condition. Use break in a switch statement to terminate the switch statement. When break is used in a loop, it breaks out of the loop. There is no point in using break elsewhere. Example intsum=0;inti;for(i=1;i

JS loop learning: break out of loop statements break and continue JS loop learning: break out of loop statements break and continue Aug 03, 2022 pm 07:08 PM

In the previous article, we took you to learn several loop control structures in JS (while and do-while loops, for loops). Let’s talk about the break and continue statements to jump out of the loop. I hope it will be helpful to everyone!

What is the use of break stop statement in Go language? What is the use of break stop statement in Go language? Jan 18, 2023 pm 03:46 PM

In the Go language, the break stop statement is used to jump out of the loop in a loop statement and start executing the statement after the loop. The break statement can end the code blocks of for, switch and select. In addition, the break statement can also add a label after the statement to indicate exiting the code block corresponding to a certain label. The label requirement must be defined on the corresponding code block of for, switch and select. .

The function and precautions of break statement in PHP The function and precautions of break statement in PHP Mar 20, 2024 pm 05:33 PM

The role and precautions of the break statement in PHP In PHP programming, the break statement is a control statement used to interrupt the execution of a loop or switch statement. The break statement can immediately jump out of the current loop or switch statement, allowing the program execution flow to jump directly to the code part after the loop or switch statement, thus improving the efficiency and flexibility of program execution. In actual programming, the break statement plays an important role, but it also requires attention to some details and precautions. 1.b

不用数据库来实现用户的简单的下载,代码如下,但是却不能下载,请高手找下原因,文件路劲什么的没有关问题 不用数据库来实现用户的简单的下载,代码如下,但是却不能下载,请高手找下原因,文件路劲什么的没有关问题 Jun 13, 2016 am 10:15 AM

不用数据库来实现用户的简单的下载,代码如下,但是却不能下载,请高手找下原因,文件路劲什么的没问题。

See all articles