Zubrag.com :: Forum

zubrag.com => Website Thumbnail Generator => Topic started by: ziggaloop on March 05, 2010, 10:12:06 AM



Title: IECapt does not work when --url contains a query string
Post by: ziggaloop on March 05, 2010, 10:12:06 AM
No thumbnail generated when the URL contains a querystring such as: http://mydomain.com?page_id=8

Anyone know of a solution or workaround?


Title: Re: IECapt does not work when --url contains a query string
Post by: Quinn on April 10, 2010, 05:35:18 PM
Ya this is extremely annoying. I have not been able to find a solution yet.

It's to bad there is no development going on with this script.


Title: Re: IECapt does not work when --url contains a query string
Post by: agent47 on May 09, 2010, 10:17:35 PM
Try replacing this line: @exec('IECapt.exe ' . escapeshellarg($website_url) . ' ' . escapeshellarg($cached_filename));

With this: $output = shell_exec('IECapt --url='.$website_url.' --out=' .$cached_filename);

So far it is working for me with all files, even with query strings.

Hope this helps some people.  It took me a while to get it working right.


Title: Re: IECapt does not work when --url contains a query string
Post by: FarmerCharlie on July 11, 2010, 11:55:12 AM
Try replacing this line: @exec('IECapt.exe ' . escapeshellarg($website_url) . ' ' . escapeshellarg($cached_filename));

With this: $output = shell_exec('IECapt --url='.$website_url.' --out=' .$cached_filename);
Could you elaborate a little on this?
For example, If I use this command:
iecapt --url=http://www.wunderground.com/wundermap/?lat=32.6240057686166&lon=-85.45042097568512&zoom=13 --out=test3.jpeg
I get an error message presumably because it has a query.

Iecapt works fine for me for regular URLs.


Title: Re: IECapt does not work when --url contains a query string
Post by: FarmerCharlie on July 11, 2010, 04:08:53 PM
I found a work-around for this by using TinyURL <www.tinyurl.com> to create a standard URL from the url with the query.
This command worked fine.
iecapt --url=http://tinyurl.com/28pnkvl --out=test7.jpeg --delay=5000
I added the delay to give enough time for the map to display.

iecapt is a pretty neat app.

Charles


Title: Re: IECapt does not work when --url contains a query string
Post by: jexley on January 07, 2011, 11:43:33 PM
I switched those lines (above) in my PHP code and it worked a treat.

I know this thread is old, but I found it at the top of Googs and wanted to let others know what's working.

Cheers!


Title: Re: IECapt does not work when --url contains a query string
Post by: FarmerCharlie on January 08, 2011, 01:14:52 AM
Which did you use?  The PHP code or my TinyURL work-around?
Ain't Google wonderful?  :)