2012-06-02 2 views
3

나는 이것이 무엇을 의미하는지 알아 내려고하고 있습니까? 나는 Instagram의 API에 뭔가를 게시 할 수 있기를 원하지만 curl -F가 무엇을 의미하는지 확신 할 수 없습니까? 나는 그것을 구글에서 검색해 보았지만, 나에게 많은 것을주지 않았다. 어쩌면이 문제를 가진 사람이 약간의 빛을 비출 수 있습니까?컬 - F 무엇을 의미합니까? php instagram

또한이 방법으로 Instagram에 게시하는 가장 좋은 방법은 무엇입니까? 설명서에 묻습니다.

curl -F 'access_token=ACCESS-TOKEN' \ 
    https://api.instagram.com/v1/media/{media-id}/likes 

누군가이 설명을 할 수 있습니까?

미리 감사드립니다.

답변

3

curl로 세부로 불리는 비트에 대한

'-F, --form <name=content>' 

검색 시뮬레이션 리눅스 유틸리티입니다 웹 요청. curl -F 명령을 실행하면 양식 제출 데이터와 함께 http 요청이 발행됩니다. 이 경우, 폼 데이터는 데이터입니다 access_token=ACCESS-TOKEN과는 URL로 발행되고 https://api.instagram.com/v1/media/{media-id}/likes

이며, 무엇 컬에

추가 정보는 http://curl.haxx.se/docs/manpage.html

2

-F 양식을 작성한 사용자를 에뮬레이트하여 제출하십시오.

이 문제는 시스템의 컬 (curl) 맨 페이지에서 찾아 볼 수 있습니다. 이 옵션을 지원하면 매뉴얼 페이지에 항목이 있습니다. man curl에서

3

는 :

-F, --form <name=content> 
      (HTTP) This lets curl emulate a filled-in form in 
      which a user has pressed the submit button. This 
      causes curl to POST data using the Content-Type 
      multipart/form-data according to RFC 2388. This 
      enables uploading of binary files etc. To force the 
      'content' part to be a file, prefix the file name with 
      an @ sign. To just get the content part from a file, 
      prefix the file name with the symbol <. The difference 
      between @ and < is then that @ makes a file get 
      attached in the post as a file upload, while the < 
      makes a text field and just get the contents for that 
      text field from a file. 

      Example, to send your password file to the server, 
      where 'password' is the name of the form-field to 
      which /etc/passwd will be the input: 

      curl -F [email protected]/etc/passwd www.mypasswords.com 

      To read content from stdin instead of a file, use - as 
      the filename. This goes for both @ and < constructs. 

      You can also tell curl what Content-Type to use by 
      using 'type=', in a manner similar to: 

      curl -F "[email protected];type=text/html" url.com 

      or 

      curl -F "name=daniel;type=text/foo" url.com 

      You can also explicitly change the name field of a 
      file upload part by setting filename=, like this: 

      curl -F "[email protected];filename=nameinpost" url.com 

      See further examples and details in the MANUAL. 

      This option can be used multiple times. 
+1

붙여 넣기 한 남자 페이지의이 많이에서 찾을 수 있습니다 무엇을 이 사건은 도움이되지 않습니다. -1. – bfavaretto

0

이건 정말 프로그래밍 질문은 아니지만 나는 당신에게 당신의 방법에 당신을 도움이되는 몇 가지 지침을 제공 할 수 있습니다.

-F는 curl에게 제출 된 버튼을 클릭했을 때 채워진 HTML Form을 에뮬레이션하도록 알려줍니다.

이 페이지를 살펴 유무 : http://curl.haxx.se/docs/manpage.html

을 그리고 아래로 스크롤하거나 더 복잡

관련 문제