php实现连续ping远程服务器脚本 代码段

脚本作用:持续ping该类服务器,保证中转路由能在业务使用时能够快速响应请求。

jopen 2015-07-10   1310   0
PHP  

Java实现的一个超轻量级 HTTP 服务 代码段

这是一个直接用 Java 自带的 API 实现的超轻量级的 HTTP 服务器,没有使用第三方类库 import java.io.IOException; import java.io.OutputStream;

yb25 2015-01-29   7348   0
Java  

C#分页显示服务器上指定目录下的所有图片代码 代码段

分页显示服务器上指定目录下的所有图片代码 <%@ Page Language="C#" EnableViewState="false" %>

pb44 2015-05-02   2755   0
C#  

php一句话下载文件到服务 代码段

超级简单易用 可用于备份、下载、保存小型文件等功能。 <?file_put_contents("a.txt",file_get_contents("http://www.chinaz.com/program/2009/0913/91443.shtml"));?>

ef4w 2015-02-09   1188   0
PHP  

java实现向服务端发送GET和POST请求 代码段

package com.hongyuan.test; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.HttpURLConnection; import java.net.U

nepe 2015-04-29   1870   0
Java  

python urllib从远程服务器下载文件到本地 代码段

#!/usr/bin/env python #-*-coding:utf-8-*-' #Filename:download_file.py import sys,os import urllib def urlcallback(a,b,c): """ call back function a,已下载的数据块 b,数据块的大小 c,远程文件的大小 """ print "callback" prec=

ex7n 2015-09-13   1868   0
Python  

通过socket 提供数据到其它web服务器的PHP代码 代码段

php通过socket post数据到其它web server function post_request($url, $data, $referer='') { // Convert the data array into URL Parameters like a=b&foo=bar etc. $data = http_build_query($data); // parse the give

ded3b 2015-01-23   1386   0
PHP  

C# 实现一个简单的 HTTP 服务 代码段

using System; using System.IO; using System.Net; using System.Text; using System.Threading; class MainClass { private static int maxRequestHandlers = 5; private static int requestHandlerID = 0; privat

n342 2015-04-29   1528   0
C#  

纯C语言实现的一个简单的web服务 代码段

/* * WebServer.c * * Created on: Nov 3, 2012 * Author: pavithra * * A web server in C language using only the standard libraries. * The port number is passed as an argument. * */ #include <stdio.h> #i

jopen 2015-06-30   3862   0
C/C++  

java服务端 客户端(非阻塞 多线程) 代码段

public class MultithreadJIoSocketTest { @Test public void testMultithreadJIoSocket() throws Exception { ServerSocket serverSocket = new ServerSocket (10002); Thread thread = new Thread (new Accptor (s

ye34 2015-01-06   1638   0
Java  

通过代理服务器访问FTP的Python代码 代码段

import urllib2 # Install proxy support for urllib2 proxy_info = { 'host' : 'proxy.myisp.com', 'port' : 3128, } proxy_support = urllib2.ProxyHandler({"ftp" : "http://%(host)s:%(port)d" % proxy_info}) o

b573 2015-01-24   1960   0
Python  

C# 实现一个多线程的 Web 代理服务 代码段

/** C# Programming Tips & Techniques by Charles Wright, Kris Jamsa Publisher: Osborne/McGraw-Hill (December 28, 2001) ISBN: 0072193794 */ // Proxy.cs -- Implements a multi-threaded Web proxy server //

n342 2015-04-29   2079   0
C#  

关于go语言中http做服务器使用正则的实例 代码段

package main import ( "net/http" "regexp" ) func main() { http.HandleFunc("/", route) http.ListenAndServe(":8080", nil) } var num = regexp.MustCompile(`\d`) var str = regexp.MustCompile(`\w`) func rou

jopen 2015-06-02   807   0

自动同步服务器vm文件的shell脚本 代码段

#!/bin/sh if [ $# -lt 1 ]; then echo "[FAILED]please input project name." else if [ -d /home/admin/work/$1 ]; then cd /home/admin/work/$1 svn up > files find -name "files" -exec grep ".vm" {} \;|while

jopen 2015-12-03   3382   0
Shell  

android连接服务器下载文件工具类 代码段

public static File downLoad(String serverPath,String savedPath,ProgressDialog dialog){ try { URL url=new URL(serverPath); HttpURLConnection _conn=(HttpURLConnection) url.openConnection(); _conn.setReq

f25p 2015-01-13   3184   0
Android  

android连接服务器下载文件工具类 代码段

public static File downLoad(String serverPath,String savedPath,ProgressDialog dialog){ try { URL url=new URL(serverPath); HttpURLConnection _conn=(HttpURLConnection) url.openConnection(); _conn.setReq

gxw6 2015-05-03   662   0
Java  

Java服务器获取客户端的ip 代码段

[Java]代码 /** * 获取登录用户IP地址 * * @param request * @return */ public static String getIpAddr(HttpServletRequest request) { String ip = request.getHeader("x-forwarded-for"); if (ip == null || ip.length() =

lai123 2016-01-30   4009   0
Java  

php上传单个文件到ftp服务器的演示范例 代码段

// FTP access parameters $host = 'ftp.example.org'; $usr = 'example_user'; $pwd = 'example_password'; // file to move: $local_file = './example.txt'; $ftp_path = '/data/example.txt'; // connect to FTP

ded3b 2015-01-23   1597   0
PHP  

Android获取系统正在运行的后台服务列表 代码段

//RunningServicesInfo public static String getRunningServicesInfo(Context context) { StringBuffer serviceInfo = new StringBuffer(); final ActivityManager activityManager = (ActivityManager) context .g

g2b4 2015-03-24   3366   0
Android  

监测网络状态(AFNetworking) 服务端 客户端 代码段

[operationManager.reachabilityManager startMonitoring]; } //服务端 #import #include

jopen 2015-12-11   1993   0
1 2 3 4 5 6 7 8 9 10