Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 228
  • Last Modified:

image must cause a popup/popunder

Ok Boyz (and Galz) here's one for you. I need to have an image cause a popup/popunder an a client machine.

Example:

abs.com is displaying an image on a page as so <img source="www.somesite.com/aPicture.php">

aPicture.php is generating an image as so (example)

<?php
Header("Content-type: image/png");
$im = imagecreate(100,200);
$background_color = imagecolorallocate($im, 255, 255, 255);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, "www.shockads.com", $text_color);
imagepng($im);
imagedestroy($im);
?>

What I need to do, is have a popup/popunder open up when the user views the abc.com page (only by making changes to the aPicture.php page)

Ideas ? Since the headers are changing to image/png is it even possible ?
0
odditysoftware
Asked:
odditysoftware
3 Solutions
 
hernst42Commented:
No there is no way to generate a popup/popunder with an image. This can only be achieved by generating JS in the img-tag with onMouseOver onMouseOut -Events
0
 
iceboxmanCommented:
This is called DHTML (Dynamic HTML) and makes use of Javascript, CSS, and Layers.
0
 
Diablo84Commented:
This is most certainly not possible, besides the reasons of logic this would be something of a security issue. If a site, for example, allowed users to post images it would be a serious issue if users were able to trigger pop ups via these images on a site that is otherwise not in their control. The only way you can achieve this is by editing the html page hosted on the sites server using the methods mentioned by iceboxman above, there is no way to do what you want i'm afraid.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
iceboxmanCommented:
If you do find a page that has one of these images on it, perhaps you can try viewing page source and copy the Javascript that way.  You may be hindered from this IF they put in in a separate .js file AND they put a copy protect on it through Apache.
0
 
winglis4Commented:
Here's a link to a free JS pop-up calander. I like this one because it uses CSS to let you cusomize the appearance.
http://www.softricks.com/products/calendar/index.html

Hope this helps,
winglis4
0
 
rockstar_dubCommented:
How about this...
You need to request the image to a new page

in your request file...

//request.html
<? $text = 'www.shockads.com' ?>
<img src="image.php?text=<? echo $text ?>">


in your image file...

//image.php
<?php
Header("Content-type: image/png");
$im = imagecreate(100,200);
$background_color = imagecolorallocate($im, 255, 255, 255);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, $_GET[text], $text_color);
imagepng($im);
imagedestroy($im);
?>
0
 
Diablo84Commented:
My recommendation:

SPLIT hernst42 {http:#12501863} && iceboxman {http:#12506082} && Diablo84 {http:#12513375}
0
 
iceboxmanCommented:
I agree.
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now