[Extract] Copy URL Image PHP

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
Gankyou4
Posts: 7
Joined: Fri Apr 10, 2020 11:42 am

[Extract] Copy URL Image PHP

Post by Gankyou4 » Fri Apr 10, 2020 12:03 pm

Someone help me, please, I'm trying to copy the URL of an image in php, but I'm not able to char the command :cry: :?

FCI = iMacros 9.0.3 Extension / Browser Firefox 50.0.2 / Windows 10

URL HTML = <img src="captcha.php" name="img_captcha" id="img_captcha" style="outline: 1px solid blue;" height="40" width="50">

The image command lines :

SET !ERRORIGNORE YES
SET !TIMEOUT 0.1
TAB T=1
TAG POS=1 TYPE=IMG ATTR=ID:img_captcha EXTRACT=IMG
Last edited by Gankyou4 on Fri Apr 10, 2020 1:02 pm, edited 4 times in total.
chivracq
Posts: 9318
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: [Extract] Copy URL Image PHP

Post by chivracq » Fri Apr 10, 2020 12:09 pm

Gankyou4 wrote:
Fri Apr 10, 2020 12:03 pm
Someone help me, please, I'm trying to copy the URL of an image in php, but I'm not able to char the command :cry: :?

Yeah..., this one approved, at least opened in the "correct" Sub-Forum now, and the Thread Title is OK, but the Quality is still pretty Low, and you still didn't read the Forum Rules... :|
=> CIM...! :mrgreen: (Read my Sig also...)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Gankyou4
Posts: 7
Joined: Fri Apr 10, 2020 11:42 am

Re: [Extract] Copy URL Image PHP

Post by Gankyou4 » Fri Apr 10, 2020 12:12 pm

chivracq wrote:
Fri Apr 10, 2020 12:09 pm
Gankyou4 wrote:
Fri Apr 10, 2020 12:03 pm
Someone help me, please, I'm trying to copy the URL of an image in php, but I'm not able to char the command :cry: :?

Yeah..., this one approved, at least opened in the "correct" Sub-Forum now, and the Thread Title is OK, but the Quality is still pretty Low, and you still didn't read the Forum Rules... :|
=> CIM...! :mrgreen: (Read my Sig also...)
I'm sorry, I'll do another topic!
chivracq
Posts: 9318
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: [Extract] Copy URL Image PHP

Post by chivracq » Fri Apr 10, 2020 12:18 pm

Gankyou4 wrote:
Fri Apr 10, 2020 12:12 pm
I'm sorry, I'll do another topic!

Don't be "sorry", simply read the Forum Rules and improve the Quality of your Post, to include some missing (Tech) Info... :roll:

And you don't need to quote yourself again when you post, that doesn't really help for Readability of the Thread...

And NO...!, don't create another Thread...!, that would be a Duplicate = SPAM...!, and a Show-Killer for me to help you at all... :shock:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
chivracq
Posts: 9318
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: [Extract] Copy URL Image PHP

Post by chivracq » Fri Apr 10, 2020 12:41 pm

Gankyou4 wrote:
Fri Apr 10, 2020 12:03 pm
Someone help me, please, I'm trying to copy the URL of an image in php, but I'm not able to char the command :cry: :?

Code: Select all

Version Imacros 9.0.3
Browser Firefox 
The image command lines :

Code: Select all

SET !ERRORIGNORE YES
SET !TIMEOUT 0.1
TAB T=1
TAG POS=1 TYPE=IMG ATTR=ID:img_captcha EXTRACT=IMG

Hum..., OK, and...?, don't stop, it's only the "beginning"...:
"CIM" => "FCIM"...! :mrgreen:
FF Version + OS are still missing... :roll:
(And correct Spelling is "iMacros" btw...)

And hum, your Script looks "very strange"... (But I'll start reacting to that part once you'll have mentioned your FCI...)

EDIT: Hum, OK, I see you are still busy editing/adding some Info to your OP, I'll check again a bit later... :wink:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Gankyou4
Posts: 7
Joined: Fri Apr 10, 2020 11:42 am

Re: [Extract] Copy URL Image PHP

Post by Gankyou4 » Fri Apr 10, 2020 12:54 pm

I have no idea what I'm doing. I created a captcha solver, I'm working on Imacros for the first time and I'm having trouble finding the command to copy the image, if that command exists I don't know :roll:
Gankyou4
Posts: 7
Joined: Fri Apr 10, 2020 11:42 am

Re: [Extract] Copy URL Image PHP

Post by Gankyou4 » Fri Apr 10, 2020 12:55 pm

I'm pretty much a noob in the imacros yet XD :lol: :lol: :lol: :lol:
chivracq
Posts: 9318
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: [Extract] Copy URL Image PHP

Post by chivracq » Fri Apr 10, 2020 1:17 pm

Gankyou4 wrote:
Fri Apr 10, 2020 12:03 pm
FCI =

Code: Select all

iMacros 9.0.3  Extension / Browser Firefox 50.0.2 / Windows 10


URL HTML = <img src="captcha.php" name="img_captcha" id="img_captcha" style="outline: 1px solid blue;" height="40" width="50">

Alright, good, we finally have your FCI...! :D

Then OK, now, about your Script... You mention you are a Newbie/Noob, but hum, I wonder where you found that '!TIMEOUT' Command, as this Command has now been deprecated for about 8 years...!? ... => and replaced by the '!TIMEOUT_PAGE' Command..., which only accepts Integers as Value, no Decimals...

Then the 'EXTRACT' Command will indeed be the Command that you'll need to use, and you can try "creating" some "exotic" Parameters like your "IMG" Param, but I don't think that will work...! :P
The List of "valid" Params accepted by the 'EXTRACT' Command is documented in the Wiki, like you would expect...! :idea:
(=> You'll be interested by the 'HREF' Param to get the URL/Source of an Image...)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Gankyou4
Posts: 7
Joined: Fri Apr 10, 2020 11:42 am

Re: [Extract] Copy URL Image PHP

Post by Gankyou4 » Fri Apr 10, 2020 1:33 pm

The only one that worked was HREF, but it is copying the image address. I just want to copy the image.

my command :

SET !ERRORIGNORE YES

TAG POS=1 TYPE=IMG ATTR=ID:img_captcha* EXTRACT=HREF
SET !CLIPBOARD {{!EXTRACT}}
chivracq
Posts: 9318
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: [Extract] Copy URL Image PHP

Post by chivracq » Sat Apr 11, 2020 1:29 pm

Gankyou4 wrote:
Fri Apr 10, 2020 1:33 pm
The only one that worked was HREF, but it is copying the image address. I just want to copy the image.

my command :

Code: Select all

SET !ERRORIGNORE YES

TAG POS=1 TYPE=IMG ATTR=ID:img_captcha* EXTRACT=HREF
SET !CLIPBOARD {{!EXTRACT}}

Yeah, well, I don't know what "URL" means to you in "Copy URL Image" in your Thread Title and in the Description in your OP ("I'm trying to copy the URL of an image in php"), but it means "Address" to me, ah-ah...! :?

But hum, so if you want to copy an Image as a Blob to your OS Clipboard, to paste later in a 'Word' or 'Paint' Document for example, hum..., I'm not sure you can do that from iMacros... :?
What iMacros can, is saving the Image locally to your Computer, and you have several Commands for that: 'SAVEITEM', 'SAVE_ELEMENT_SCREENSHOT', 'SCREENSHOT', and even the 'SAVEAS' Command... :idea:
(The 'SAVE_ELEMENT_SCREENSHOT' Wiki Page has more Info about saving a Captcha Image...)

Another "Option" you can explore, is with 'Select' (with the Mouse or Keyboard) + 'Copy' ('Ctrl^c' from Keyboard) that could be triggered from the 'EVENT' Mode, same maybe also with in FF the Right Click on a Image and the contextual Item 'Copy Image' with a Shortcut on the 'y' that might also work from the 'EVENT' Mode... :idea:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Gankyou4
Posts: 7
Joined: Fri Apr 10, 2020 11:42 am

[Extract] Copy URL Image PHP

Post by Gankyou4 » Sun Apr 12, 2020 4:04 am

xd

"COPY IMAGE"
Last edited by Gankyou4 on Sun Apr 12, 2020 4:46 am, edited 3 times in total.
chivracq
Posts: 9318
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: [Extract] Copy URL Image PHP

Post by chivracq » Sun Apr 12, 2020 4:17 am

Gankyou4 wrote:
Sun Apr 12, 2020 4:04 am

Code: Select all

https://i.imgur.com/6roR63P.png
I want to copy this here

... And you can read the Forum Rules again...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Gankyou4
Posts: 7
Joined: Fri Apr 10, 2020 11:42 am

Re: [Extract] Copy URL Image PHP

Post by Gankyou4 » Sun Apr 12, 2020 4:46 am

xd , Well I think you already understand what I want to do, Sorry for the print, but can you do this art or not?

"COPY IMAGE"
chivracq
Posts: 9318
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: [Extract] Copy URL Image PHP

Post by chivracq » Sun Apr 12, 2020 3:17 pm

Gankyou4 wrote:
Sun Apr 12, 2020 4:04 am
xd

"COPY IMAGE"
Gankyou4 wrote:
Sun Apr 12, 2020 4:46 am
xd , Well I think you already understand what I want to do, Sorry for the print, but can you do this art or not?

"COPY IMAGE"

Yeah, well, the Screenshot was fine and "helpful" (even if that's exactly "one thing" that I had mentioned in my previous Reply), you didn't "need" to delete it, but you need to upload it directly to the Forum without using any external Pix Hosting Site like mentioned/explained in the Forum Rules... :roll:

>>>

But..., pfff..., I'm getting a bit "tired" of the Low Quality you provide in your Thread and in your Use of the Forum... If you can't "concentrate" for a few Minutes, alright, fair enough, then good luck with other (Advanced) Users, I'm out..., I only help Users who provide "Quality" for the Forum Community and really get stuck after they've "tried their Best", which is not "really the Case" in this Thread... :|

As an "Example", here is a "Quality Thread" for which I feel "motivated" to help, even if I "normally" don't help for the Functionality this User wants, they joined the Forum after you, everything I say, I have to say it only once, and their Thread is now probably already "Solved"... :idea:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Post Reply