Jump to content
Sign in to follow this  
askwrite

[RST][PHP] Upload image to your imgur account

Recommended Posts

Salut,

La cererea lui @sandabot de aici: https://rstforums.com/forum/103516-imgur-upload-api.rst , am facut acest script care uploadeaza imaginile in contul tau de imgur.

Ce trebuie sa faceti:

Va faceti cont pe imgur, va logati si apoi va duceti aici: https://api.imgur.com/oauth2/addclient

Faceti request api pentru OAuth 2 authorization without a callback URL

Script:

 <?php error_reporting(0); $user = ""; $pass = ""; $client_id = ""; $client_ - Pastebin.com

Modificati-va usernameul, parola, client_id, client_secret cu ale voastre si imaginea pe care doriti s-o uploadati,

Scriptul este pentru CLI, nu l-am testat pe web, se poate sa mearga.

Edited by askwrite

Share this post


Link to post
Share on other sites

Nu stiu daca functioneaza, insa cred ca ai fi putut pune toate apelarile alea de curl intr-o singura functie ca parca prea se repeta.

Share this post


Link to post
Share on other sites

Salut !

Mersi pentru timp si pentru ajutor, l-am testat pe localhost insa de fiecare data primesc login failed, testat cu 2 conturi.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...