|
Hi,
i want to monitor how often some external images are loaded. So what my idea was instead of giving a uri directly like this:
www.site.com/image1.jpg
i create a php script which reads the image, so i build a php file and my html would look like this...
Started by Michel on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Sending images through a scriptYou must set the content....
Like this, your script will need to :
send the right headers, which depend on the type of the image all images through php might put a bit of load on your server.
|
|
If I put this tag in my HTML:
<img src="http://server/imageHandler.php?image=someImage.jpg" />
instead of
<img src="http://server/images/someImage.jpg" />
and use the imageHandler.php script to read the image file, output expire headers and...
Started by Discodancer on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Instead, you can set I think it does) copies the file directly from disk to the network interface, so it sends the image itself about as fast as....
Htaccess Caching
Yes, running any PHP script is slower than serving a static file.
|
|
This was working a few moments ago, not sure what changed. error log reads
[08-Aug-2009 02:09:20] PHP Warning: readfile(/images/32321249694312.JPG) [<a href='function.readfile'>function.readfile</a>]: failed to open stream: No such file or...
Started by Patrick on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Hence at some point where it's supposed ....
This is okay until you try to divide some number by null :
PHP Warning: Division stream: No such file or directory
The image couldn't be opened, for whatever reason.
Of the image is null .
|
Ask your Facebook Friends
|
Okay I'm really new to PHP I found the following script below. But i dont know how to use it I was wondering where do I put the link to the image for example images/photo.jpg inorder to get me started in learning this script thanks.
Here is the code.
...
Started by PeAk on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
I use the following script for this: function getRoot(){ $cwd('Content-type: image/jpeg'); imagejpeg($imageResized);
Or check http://www.php.net/manual/en/function.imagejpeg.php and the Example....
To the image so that it can be read.
|
|
I need to create an ImageIcon from an image on a remote server. When I loaded it with a URL like http://www.server.com/1.png it worked fine.
But recently the server was changed so that the images are stored outside of web root and must be accessed with...
Answer Snippets (Read the full thread at stackoverflow):
To play a bit....
You used id in URL, but the PHP script expects uid .
Also ensure that the request parameter name is correct.
One of the reasons that ImageIcon(URL) may fail 301/302) or so .
Type header to image/png on the response.
|
|
Hi everyone,
I'm storing banner ads in a mysql table or I should say just the file name e.g: 'imagename.jpg' or 'banner3.gif'.
Obviously I am wanting to track when these banners are loaded so I'm thinking to create a php file called img.php and call it...
Started by cosmicbdog on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
See:
<?php header('Content-Type: image/jpeg'); header('Content-Type: image/png'); headerecho file_get_contents($image);
But I doubt your images are actually in /img/ (top level of filesystem hierarchy....
Will be sent.
|
|
A button click fires my function that fetches image data via an AJAX-call:
$("#toggle_album").click(function () { album_id = $("#album_id").val(); $.post('backend/load_album_thumbnails.php', { id: album_id }, function(xml) { var status = $(xml).find("...
Started by Mattis on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
However, it does not work on hover(), so I rewrote the script to use.
$(xml).find("image").each(function(){ //this actually creates to the JQuery live() function: live() .
Can add there the new binds too.
|
|
I have seen a lot of examples, but I am not sure how it can tie into the upload script i currently have. Could someone please explain how I might be able to use ImageMagick or something of the like to resize an uploaded image to a fixed width while keeping...
Started by Chris B. on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
ETA2:
I have seen a lot of suggestionsInstead of move_uploaded_file(), you'd load the file into the image processing library, resize() or imagecreatefrompng() (depending on what....
More discussion of PHP file upload script risks here .
|
|
Hello,
When sending a message on Facebook, if you include a URL it generally grabs a picture from the webpage and adds it at the bottom as a thumbnail. You then have the ability to select through a number of pictures featured on the site.
I can see how...
Started by Pete on
, 4 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Environment (5.3.1):
<?php /** * Sample CURL Image Extractor * * Prepared for stackoverflow.com('You need at least PHP 5.2 to use this script.'); } // // JSON & No-Cache Headers // Uncoment when I believe -- from there ....
|
|
Anything like this exist in the open source world? I can roll my own, but im looking to save time if possible.
Looking for something that will allow users to upload files and recieve a shortened URL to share. Possible have an api to allow other services...
Started by Patrick on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Solutions which are open source and GPL licensed:
script for imagepng.com Chevereto EDIT 2009-12-19.
|