Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by MrReynevan2 · Jun 27, 2014 at 08:27 PM · www

Downloading all images from given URL

Hello. I wonder, is it possible to download all images from some URL and store them... don't know, in array or something?

For any example code I'd prefer C#.

Here's the idea:

 1. Enter URL - string url - Some kind of GUI or just predefined URL.
 2. Check the URL (direct to image/html page)
  2a. If only one image found (or direct link), save to variable - Texture2D img
  2b. If more than one image found save 'em to array. - Texture2D[] array
 3. Return result

It might be silly question, but I never actually used WWW class. Thanks for any answers.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Graham-Dunnett · Jun 27, 2014 at 08:28 PM

There is no html way to say "tell me all the images that live at a url". If the images are linked form an html page then you can read the html of that page and then find the img tags it contains, and fetch those images one at a time. (This is what a browser does to display you the page.)

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image MrReynevan2 · Jun 27, 2014 at 09:50 PM 0
Share

I'm not searching for any HT$$anonymous$$L way. I'm only asking if is it possible to parse HT$$anonymous$$L file and check if there ARE ANY E$$anonymous$$BEDDED images using "" tag using Unity WWW class...

Or do I need $$anonymous$$ySQL n' PHP script to do it external way, then use GET/POST through Unity API?

Don't pretend like you don't know what I mean. I simplified the process, that's right, but still, that's not the point in the first place.

I hope it's clear enough.

avatar image gjf · Jun 28, 2014 at 10:44 AM 0
Share

"I'm not searching for any HT$$anonymous$$L way. I'm only asking if is it possible to parse HT$$anonymous$$L file and check if there ARE ANY E$$anonymous$$BEDDED images using "" tag using Unity WWW class..."

yes, it's possible.

"Don't pretend like you don't know what I mean. I simplified the process, that's right, but still, that's not the point in the first place."

don't pretend you actually asked HOW one would achieve this with unity's WWW class. see, i can be sarcastic too ;)

graham was trying to answer your question - no need to take that tone with anyone trying to help you. it's not big or clever.

in answer to HOW one might achieve it:

the WWW class would return the page which can be parsed (bytes or a string, whichever you'd prefer, although some regex on the string would probably be easiest) to find image tags, which could then be loaded into your structure of choice (array, list, etc.)

pretty much as graham suggested...

you're welcome.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Downloading all images from certain URL v2.0 0 Answers

Yield And Return 2 Answers

www class works fine in android but doesn't work in ios... 0 Answers

Getting info using WWW & PHP 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges