473,396 Members | 1,914 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

transfering edited images from web resizer api back to my server

anfetienne
424 256MB
hi, im using the web resizer api to use as an online image editor for a project. i've got everything working up until the point where i need to save the images from the api server and i cant think of how to even start writing the php code for this.

i have an example of an asp used to do it.....the api site doesn't have a php but has an asp example (weird as the rest of the coding they use is php)

Expand|Select|Wrap|Line Numbers
  1. <%
  2. imagename = request("fileName")
  3. url = request("url")
  4.  
  5. 'Creating variables
  6.  
  7. imageUrl = url 
  8. strImageName = imagename
  9.  
  10. 'Function and subroutine calls
  11.  
  12. saveImage getImage(imageUrl), strImageName
  13.  
  14. 'Here is code library:
  15.  
  16. Function getImage(strImageUrl)
  17.   ' Set objHttp = CreateObject("Microsoft.XMLHTTP")
  18.   ' Set objHttp = CreateObject("MSXML2.ServerXMLHTTP")
  19.   Set objHttp = CreateObject("WinHttp.WinHttpRequest.5.1")
  20.   ' Set Http = CreateObject("WinHttp.WinHttpRequest")
  21.   objHttp.Open "GET", URL, False
  22.   objHttp.Send
  23.  
  24.   getImage = objHttp.ResponseBody
  25. End Function
  26.  
  27. Sub saveImage(ByteArray, strImageName)
  28.   Const adTypeBinary = 1
  29.   Const adSaveCreateOverWrite = 2
  30.   Const adSaveCreateNotExist = 1
  31.  
  32.   Set objBinaryStream = CreateObject("ADODB.Stream")
  33.   objBinaryStream.Type = adTypeBinary
  34.  
  35.   objBinaryStream.Open
  36.   objBinaryStream.Write ByteArray
  37.   objBinaryStream.SaveToFile server.mappath("images\" & strImageName) , 
  38.       adSaveCreateOverWrite
  39.   response.Write("Image has been downloaded and saved!")
  40. end sub
  41.  
  42. %>
  43.  
can someone point me in the right direction, tell me what functions i have to use etc?
Sep 6 '09 #1
1 1726
anfetienne
424 256MB
i have found some demo files but dont understand much about them.....could someone just add comments to help me get started please?
Attached Files
File Type: zip demoFiles.zip (2.3 KB, 63 views)
Sep 6 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: LORD BROWN | last post by:
Was wondering if any one knew of any code, or could point me to a site that has an example of resizing images using JavaScript (have a site were many of the image are not the same size and want to...
7
by: Ravi J | last post by:
What is the best way to transfer files between two .NET executables? I have a service, and a client program. Client asks service for data. The service creates one, and passes it back to client....
2
by: Niyazi | last post by:
Hi, I have BIG question and I gues it is the BEST question. I have a problem that I am guessing the best solution is to create some sort ..NET Services. This Service(s) must check every...
3
by: AL | last post by:
Hello, I want to transfer all my VB.Net application files from my IIS server to another IIS Server on another machine. Once I have created the virtual folder and transferred all files to wwwroot...
10
by: Neo Geshel | last post by:
I am seeking to hand-roll my own blog in ASP.NET 2.0 and SQLExpress 2005. Why? Because I can. Because I will gain experience. The one thing that has me stumped at square one is inline images....
5
by: Pilence | last post by:
Hy!! Can someone tell me please how to do this type of work done by using C#......
2
by: Poppa Pimp | last post by:
ImageResizer.php Image Resizer PLEASE HELP The URL of the page this is on in my site is http://poppa-pimps-wallpapers.com//ImageResizer.php You can click on browse and get image,but...
1
by: vovan | last post by:
I need to make my VB 2005 Windows Form application resolution independent. I bought Klik resizer control. But it doesn't work with some Infragistics controls properly. Can anyone suggest any other...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.