URL의 내용을 잡고 붙여 넣기 상자에 게시 한 다음 사용자를 리디렉션하는 작은 PHP 스크립트를 작성할 수 있습니다. http://pastebin.com/
<?php
/* Get the contents of the url in the query */
$url = $_GET['url'];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
echo curl_error($ch);
$content = curl_exec($ch);
curl_close($ch);
/* Create a Pastebin from the contents */
$action = 'http://pastebin.com/pastebin.php';
$postdata = array(
'format' => 'text',
'paste' => 'Send',
'code2' => urlencode($content)
);
foreach($postdata as $key=>$value) {
$postdata_string .= $key.'='.$value.'&';
}
rtrim($postdata_string,'&');
$ch = curl_init($action);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata_string);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_exec($ch);
// *** Redirect to Pastebin ***
header("Location: ".curl_getinfo($ch, CURLINFO_EFFECTIVE_URL));
/*
Make sure that any code below
does not get executed when we redirect.
*/
exit;
?>
에 이 스크립트 포스트는 Bespin 제안에 대한 의견으로 판단하고 편집 패드, 같은 것하지 뭔가 http://pastie.org, http://pastebin.com 등을 언급 한 (http://en.wikipedia.org/wiki/Comparison_of_pastebins) 청구서에 부합합니까? 나는 당신이 당신의 최종 결과로 원하는 것을 완전히 확신하지 못합니다. – brianpeiris
안녕하세요. 답장을 보내 주셔서 감사합니다. 내가 원하는 것은 온라인 파일 (CSS)을로드하는 데 사용할 수있는 편집기/pastebin입니다. http://www.somepastebin.com?edit=http://www.mysite.com/mycss.css 그런 다음 편집 한 파일을 바탕 화면에 저장할 수 있습니다. 나는 그 목록을 보았고 (+1!) 오직 Paste-It.net과 Snipt.org만이 당신이 파일을 다운로드/저장할 수 있다고했지만 온라인 파일을 로딩하는 데는 아무런 운이 없었습니다. 다른 누구도 (내가 말할 수있는 한) 어느 쪽도하지 않을 것입니다. 다른 대안을 찾아야 할 수도 있습니다. – Mottie