小编Fra*_* Ly的帖子

cURL和etag用法?

我如何通过cURL发送etag?也可以像COOKIEJAR那样用cURL保存etag吗?

从标题我看到了这一点

我的GET请求

GET /Vpreviews/p/8b329b598fcdad4fd33432e78128da48f7219882.fll?    e=1332973900&ri=4500&rs=75&h=bca0ce28998e637f27cf1d5c7042e7a0 HTTP/1.1
Host: veoh-139.vo.llnwd.net
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0.1) Gecko/20100101 Firefox/8.0.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
DNT: 1
Connection: keep-alive
Run Code Online (Sandbox Code Playgroud)

服务器响应

HTTP/1.1 200 OK
Server: Veoh-1.5 (lighttpd-1.4.18)
Content-Type: video/x-flv
Accept-Ranges: bytes
Etag: "8b329b598fcdad4fd33432e78128da48f72198829640882"
User-Header: X-llnw-rate-limit: ri=4500, rs=98
Age: 162476
Date: Wed, 28 Mar 2012 22:06:41 GMT
Last-Modified: Sun, 01 Jan 2012 13:29:44 GMT
Expires: Mon, 27 Mar 2017 06:02:35 GMT
Content-Length: 9640882
Connection: keep-alive
Run Code Online (Sandbox Code Playgroud)

curl http-headers

16
推荐指数
2
解决办法
3万
查看次数

MySQL CREATE TABLE IF NOT EXISTS in PHPmyadmin import

I have the following code

CREATE TABLE IF NOT EXISTS `abuses` (
  `abuse_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL DEFAULT '0',
  `abuser_username` varchar(100) NOT NULL DEFAULT '',
  `comment` text NOT NULL,
  `reg_date` int(11) NOT NULL DEFAULT '0',
  `id` int(11) NOT NULL,
  PRIMARY KEY (`abuse_id`),
  KEY `reg_date` (`reg_date`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='Table with abuse reports' AUTO_INCREMENT=2 ;
Run Code Online (Sandbox Code Playgroud)

this table already exists in the database, but when i import an sql file with phpmyadmin, the following error occurs

-- …
Run Code Online (Sandbox Code Playgroud)

mysql phpmyadmin

8
推荐指数
1
解决办法
11万
查看次数

PHP和SQL:在这个查询中'am'和'w'是什么意思?

我在这里有一个关于这个PHP函数的快速问题.amSELECT查询后的内容是什么?w此查询中的含义是什么?

function download_redirect_torrent($winner_id)
{
    global $db, $setts;
    $output = array('url' => null, 'redirect' => false, 'display' => null);
    $winner_id = intval($winner_id);
    $media_details = $db->get_sql_row(
        "SELECT 
            am.*, w.is_dd, w.dd_active, w.dd_active_date 
        FROM  
            " . DB_PREFIX . "auction_media am, " . DB_PREFIX . "winners w 
        WHERE 
            am.auction_id=w.auction_id AND w.winner_id=" . $winner_id . " AND am.media_type=4"
    );
}
Run Code Online (Sandbox Code Playgroud)

php sql

2
推荐指数
1
解决办法
118
查看次数

SignatureDoesNotMatch使用Amazon Web Services时出错

下面的代码导致SignatureDoesNotMatch错误,并且在他们的论坛或支持上没有太多运气 - 有关以下代码有什么问题的任何建议?

<?php
error_reporting(E_ALL); 
ini_set("display_errors", 1); 
$AWS_ACCESS_KEY_ID = "";
$AWS_SECRET_ACCESS_KEY = "";

$base_url = "http://ecs.amazonaws.com/onca/xml?";
$url_params = array('Operation'=>"ItemSearch",'Service'=>"AWSECommerceService",
 'AWSAccessKeyId'=>$AWS_ACCESS_KEY_ID,'AssociateTag'=>"",
 'Version'=>"2011-08-01",'Availability'=>"Available",'Condition'=>"All",
 'ItemPage'=>"1",'ResponseGroup'=>"Images,ItemAttributes,EditorialReview",
 'Keywords'=>"Amazon");

// Add the Timestamp
$url_params['Timestamp'] = gmdate("Y-m-d\TH:i:s.\\0\\0\\0\\Z", time());

// Sort the URL parameters
$url_parts = array();
foreach(array_keys($url_params) as $key)
    $url_parts[] = $key."=".$url_params[$key];
sort($url_parts);

// Construct the string to sign
$string_to_sign = "GET\necs.amazonaws.com\n/onca/xml\n".implode("&",$url_parts);
$string_to_sign = str_replace('+','%20',$string_to_sign);
$string_to_sign = str_replace(':','%3A',$string_to_sign);
$string_to_sign = str_replace(';',urlencode(';'),$string_to_sign);

// Sign the request
$signature = hash_hmac("sha256",$string_to_sign,$AWS_SECRET_ACCESS_KEY,TRUE);

// Base64 encode the signature and make it URL …
Run Code Online (Sandbox Code Playgroud)

php curl amazon-web-services

1
推荐指数
1
解决办法
1525
查看次数

逃脱后的正确语法?

逃脱后写的正确语法是什么?

("SELECT torrent_download
FROM " . DB_PREFIX . "auctions WHERE
                auction_id='" . $item_details['auction_id'] . ); 
Run Code Online (Sandbox Code Playgroud)

我得到的错误是意外的')'

我尝试了各种各样的"和",但似乎没有工作

php sql syntax

0
推荐指数
1
解决办法
41
查看次数

标签 统计

php ×3

curl ×2

sql ×2

amazon-web-services ×1

http-headers ×1

mysql ×1

phpmyadmin ×1

syntax ×1