![]() |
Automatic upload.
Hello,
is there any way how can I automatically upload images to pimpandhost, by any script, external app, or anything else? |
Automatically how? Give me example.
|
Sorry for late response.
Well i have C# aplication what works with images. I need to upload images to pimp and host and get url for original image size, something like: http://www.pimpandhost.com/image/14226799-original.html I can get that url thats not problem with search, but i dont know how to upload images with C#, im not familiar with this flashuploader :{ Any hints? |
Here are my own function
public static string UploadImage(string imageLink, string imageSize) { string Link = ""; string command = ""; Post_Get login1 = new Post_Get("http://www.pimpandhost.com/upload/postUrl?req=%7B%22hash%22%3A%227582909469429%22%2C %22vall%22%3A%22" + imageLink + "%22%2C%22albumId%22%3A-1%7D"); try { Link = @login1.postGet(); } catch (WebException ex) { return "bad"; } StringBuilder sb = new StringBuilder(Link); sb.Replace("\\/", "/"); Link = sb.ToString(); string pattern = @"http://www.pimpandhost.[a-z|/]+([0-9|a-z]+)"; Match Match = Regex.Match(Link, pattern); Link = Match.Groups[1].ToString(); command = "http://www.pimpandhost.com/image/" + Link + "-original.html"; try { login1 = new Post_Get(command); Link = @login1.postGet(); } catch(WebException ex) { return "bad"; } switch (imageSize) { case "original": pattern = "<input.+bb_codes_original.+.*"; break; case "thumb": pattern = "<input.+bb_codes_thumb.+.*"; break; case "small": pattern = "<input.+bb_codes_small.+.*"; break; case "medium": pattern = "<input.+bb_codes_medium.+.*"; break; } Match = Regex.Match(Link, pattern); Link = Match.ToString(); if (imageSize == "small" || imageSize == "thumb") { pattern = "http://.*jpg"; Match = Regex.Match(Link, pattern); if (Match.ToString() == "") { pattern = "http://.*png"; Match = Regex.Match(Link, pattern); } Link = Match.ToString(); return ""; } else { pattern = "http://i.*jpg"; Match = Regex.Match(Link, pattern); if (Match.ToString() == "") { pattern = "http://i.*png"; Match = Regex.Match(Link, pattern); } Link = Match.ToString(); return "[IMG]" + Link + "[/IMG]"; } } Post_GEt is just modified get request But this is Remote upload by the link. |
Thx, i will look at it later, gtg work now.
|
All times are GMT. The time now is 08:32 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
(c) www.Pimpandhost.com