Jump to content

Suspended


cluelusshusbund

Recommended Posts

<p>Crop Tool</p>

<p>----------------</p>

<div><?php</div>

<div>session_start();</div>

<div>$ID = session_id();</div>

<div>$self = $_SERVER[php_SELF];</div>

<div>$_SESSION[views];</div>

<div> </div>

<div>if ( $_POST )</div>

<div>{</div>

<div>$url = trim("$_POST");</div>

<div> </div>

<div>if ( !preg_match("#^http#i", $url) )</div>

<div>{ die("<center>URLs start with http://</center>"); }</div>

<div> </div>

<div>$url = str_replace(" ","%20",$url);</div>

<div> </div>

<div>$blob = file_get_contents("$url");</div>

<div>$image = new imagick();</div>

<div>$image->readImageBlob("$blob");</div>

<div> </div>

<div>$format = strtolower( $image->getimageformat() );</div>

<div>$path = "tmp/$ID.$_SESSION[views].$format";</div>

<div>$_SESSION[path] = $path;</div>

<div> </div>

<div>$image->writeimage("$path");</div>

<div> </div>

<div>header("location:imagick-click-crop.php");</div>

<div>exit;</div>

<div>}</div>

<div>?> </div>

<div> </div>

<div><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"></div>

<div><html></div>

<div><head></div>

<div><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></div>

<div><title>Image Click To Crop</title></div>

<div><style type="text/css"> </div>

<div><!--</div>

<div>/* style forms */</div>

<div>input {</div>

<div> background-color: #c6ccd3;</div>

<div> color: #000060;</div>

<div>}</div>

<div> </div>

<div>select {</div>

<div> background-color: #c6ccd3;</div>

<div> color: #000060;</div>

<div>}</div>

<div> </div>

<div>textarea {</div>

<div> background-color: #c6ccd3;</div>

<div> color: #000060;</div>

<div>}</div>

<div> </div>

<div>form {</div>

<div> border: 1px solid #c6ccd3;</div>

<div> padding: 5px;</div>

<div>}</div>

<div> </div>

<div>/* end forms */</div>

<div>--></div>

<div></style></div>

<div></head></div>

<div><body bgcolor="#ffffff" text="#000060"></div>

<div><form action="" method="post"></div>

<div><table width="100%" align="center" cellpadding="0" cellspacing="8" border="0"></div>

<div><tr></div>

<div><td align="center"></div>

<div><h1 align="center">Image Click To Crop</h1></div>

<div><br></div>

<div>url: <input type="text" name="url" size="30" value="">&#160;<input type="submit"></td></div>

<div></tr></div>

<div></table></div>

<div></form></div>

<div><br><br></div>

<div></body></div>

<div></html></div>

<div> </div>

<div> </div>

<div> </div>

<div> </div>

<div> </div>

<div> </div>

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...