CpmFetch - using CFIMAGEGET to get remote images CpmFetch - using CFIMAGEGET to get remote images
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

CpmFetch - using CFIMAGEGET to get remote images

Started by vuud, April 10, 2005, 10:52:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

vuud


CFIMAGEGET is an accessory program that comes with CPMFETCH.  It allows you to access random images from an <IMG> tag anywhere on the internet.  There are some limitations - so this is best used only when you cannot use CpmFetch on PHP pages.


Ignore the cfimageget_classic.php - This is the old version that will be removed in the next stable release. 

Since there is a good amount of confusion with this... here are some good examples of when and when not to use cfimageget.php

GOOD USES

  • To provide random images for avatars
  • To display images on a page not on the same site as CPG
  • If you are subdomained and can't get anything else to work

BAD USES

  • Used on the same site as the CPG (Use cpmfetch or SSI stuff)







Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

cassie396

I do not understand how to use this.

I tried this:
<img src="http://www.guidinglightmultimedia.com/cpmfetch/cfimageget.php">

and it came up with a broken image. I can't seem to find an example or anything to help me.

Thanks,
Cassie

cassie396

I setup the variables in this: http://www.guidinglightmultimedia.com/cpmfetch/cfimageget_classic.php
and when I went to that url I got:

QuoteError in getImageTouse: Extension (strtolower): .jpg File:/gallery//albums/2003Screenshots/June/thumb_2003-0610_(203).jpg

Warning: Cannot modify header information - headers already sent by (output started at F:\home\Default\guidinglightmultimedia.com\htdocs\cpmfetch\coppermine_dao.php:593) in F:\home\Default\guidinglightmultimedia.com\htdocs\cpmfetch\cfimageget_classic.php on line 145

Warning: Cannot modify header information - headers already sent by (output started at F:\home\Default\guidinglightmultimedia.com\htdocs\cpmfetch\coppermine_dao.php:593) in F:\home\Default\guidinglightmultimedia.com\htdocs\cpmfetch\cfimageget_classic.php on line 146


I also tried setting the variables in the other imageget file. I tested it like in the readme....
http://www.guidinglightmultimedia.com/cpmfetch/cfimageget.php

And I get absolutely nothing. No errors, so output, nothing. I turned it on to true for access, and changed 'photos' to gallery. I even tried using the ../gallery that works in the other files, but still nothing.

Any help would be GREATLY appreciated.
Cassie

vuud


Heya,

First off... ignore the _classic version, its old and I don't support it anymore.  Probably will delete it sometime soon anyway

What version of cpmfetch are you using?  The latest dev or the latest stable?  Its a trick question because all my code is stable - lol

If you are getting nothing back for that one, it really really looks like the $ALLOW_DIRECT_ACCESS is not set to true. 

It should look like this:



$ALLOW_DIRECT_ACCESS = true;

... and ...

$urltocpm = "/gallery/"



If you have that, then it *should* work, or you should get an error, or something...

Quote from: cassie396 on May 20, 2005, 12:27:09 AM
I also tried setting the variables in the other imageget file. I tested it like in the readme....
http://www.guidinglightmultimedia.com/cpmfetch/cfimageget.php

And I get absolutely nothing. No errors, so output, nothing. I turned it on to true for access, and changed 'photos' to gallery. I even tried using the ../gallery that works in the other files, but still nothing.
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

cassie396

I swear to you that I set it to true and still nothing happens. I double-checked and re-uploaded the file. It is set to true and "/gallery/".

Any other suggestions? Is there a way to turn on errors because NOTHING comes up at all.

I am using 1.2.2 if that helps.

~ Cassie

vuud


Okay, if you swear :)

Try getting the newest dev version from my web site http://cpmfetch.fistfullofcode.com - not sure if anything changed, but its always better for me to work with the newest stuff.  Don't worry, its stable

As for turning on errors, you can add something like this:

<?php
error_reporting(E_ALL);
ini_set('display_errors',1);  // 0 is off, 1 is on
?>

to the top of the cfimageget.php file (ommit the <?php and ?> if you are putting it inside an existing php marker tag. 

In either case, jump to the newest dev version 1.3.4 I think... 

Typically problems end up being something easy... we just have to figure out what it is.  With the two above suggestions we should have some idea right?  Lol...

Sleep time... mmmmmm sleep
:P






Quote from: cassie396 on May 20, 2005, 06:26:09 AM
I swear to you that I set it to true and still nothing happens. I double-checked and re-uploaded the file. It is set to true and "/gallery/".

Any other suggestions? Is there a way to turn on errors because NOTHING comes up at all.

I am using 1.2.2 if that helps.

~ Cassie
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

cassie396

I downloaded and uploaded 1.3.4.

cftest.php -- changed to ../gallery
http://www.guidinglightmultimedia.com/cpmfetch/cftest.php
Works perfect. Pulls the images up, everything.

cfimageget.php -- changed to true and /gallery/
http://www.guidinglightmultimedia.com/cpmfetch/cfimageget.php
Still get nothing. Absolutely nothing. Now this isn't installed in the root, though. It is installed at the same level as /gallery, which is why I think for cftest.php the ../gallery worked. Although I tried this, and it didn't work. Maybe I should try the full script path?

Thanks!
Cassie

vuud


I hate windows.

That being said, aparently IIS behaves differently across different web servers.  Basically it looks for DOCUMENT_ROOT and if that is not there it looks for doc_root (which the last IIS we got this working on had).  From there it builds the path based on that gallery entry you have there.

Do you have control over this box?  The easiest thing to do in that case is to make an environmental variable named DOCUMENT_ROOT and have it point at:  F:\\home\\Default\\guidinglightmultimedia.com\\htdocs\

If not let me know and I will work out some different instructions... but thats the problem.  Cursed IIS



Quote from: cassie396 on May 20, 2005, 08:16:49 AM
I downloaded and uploaded 1.3.4.

cftest.php -- changed to ../gallery
http://www.guidinglightmultimedia.com/cpmfetch/cftest.php
Works perfect. Pulls the images up, everything.

cfimageget.php -- changed to true and /gallery/
http://www.guidinglightmultimedia.com/cpmfetch/cfimageget.php
Still get nothing. Absolutely nothing. Now this isn't installed in the root, though. It is installed at the same level as /gallery, which is why I think for cftest.php the ../gallery worked. Although I tried this, and it didn't work. Maybe I should try the full script path?

Thanks!
Cassie
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

betan

just want to say;

thank you Sir, you are the man. It works great!!!!

can you code menalto too!! just kidding!! :lol:


vuud


Thank you, thank you very much


Quote from: betan on May 28, 2005, 07:03:08 PM
just want to say;

thank you Sir, you are the man. It works great!!!!

can you code menalto too!! just kidding!! :lol:
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

cassie396

I don't have access to what you are talking about. I don't have shell access or anything....... I'm not really sure what you mean about about the varialbe thing. I know, Windows sucks. I've moved over most of my sites to a Unix based server, but this is budget, and unlimited memory and bandwidth.... you know how it goes.

Anyway, if you could find another way to work this out, that would be great.

Is there somewhere in the script where I could input the entire root path for the script?

Thanks!
Cassie

vuud


Yeah, when I get back to that computer I will post some instructions on that...  Check back tomorrow

I've known at least three people that had grandfathered unlimited bandwidth clauses... till thier sites got popular... then suddenly they would get cancelled for one reason or another...  usually suspicious...

Anyway, check back tomorrow

Quote from: cassie396 on May 30, 2005, 07:11:31 AM
I don't have access to what you are talking about. I don't have shell access or anything....... I'm not really sure what you mean about about the varialbe thing. I know, Windows sucks. I've moved over most of my sites to a Unix based server, but this is budget, and unlimited memory and bandwidth.... you know how it goes.

Anyway, if you could find another way to work this out, that would be great.

Is there somewhere in the script where I could input the entire root path for the script?

Thanks!
Cassie
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

sudden

is it possible to link the displayed thumbnail image to the actual location of the image!

im using this code..
<img src="http://domainname.com/cpmfetch/cfimageget.php" />

vuud

Quote from: sudden on June 03, 2005, 01:40:25 AM
is it possible to link the displayed thumbnail image to the actual location of the image!

im using this code..
<img src="http://domainname.com/cpmfetch/cfimageget.php" />

In short, no.

You can wrap it with a link to the album, and then limit cfimageget to draw only from that album, same with categories.

If you are on the same site and can do PHP, just use the normal way.

If you are HTML, check back in a few weeks when I will have an SSI variation you can use - or roll your own using the code.

Hope that answers your question... cfimageget is really just to grab pictures when you are on a different server than the coppermine gallery.

Vuud





Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

sudden

i have problems with php in blocks.

i will surely check back in a week

thanks

vuud

Quote from: sudden on June 04, 2005, 03:04:41 AM
i have problems with php in blocks.

i will surely check back in a week

thanks

Today I posted some solutions that use the SSI method in a thread in the cpmfetch board (parallel to this one)

Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

sudden


isajade

Can you please post the link please, thank you.

vuud

Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

marcelk

Is it possible te use cfimageget.php to always get the same image. I assume it would be something like  \cfimageget.php?Pic=1 instead of \cfimageget.php?album=1 to get a random image from album 1.