Create Thumbnails Of Pictures That Are In An External Server
I have a website made it in php 4.4 and I used Gd library in order to create thumbnails of pictures that are localy in my host, but now I need to create thumbnails of pictures that are in an external server, Gd library said I can´t do it..
View Complete Forum Thread with Replies
Sponsored Links:
Related Messages:
Thumbnails To External Images
I have two servers, in the first one I have lot of images In the second one I have my site, in my site I am trying to use the GD library in order to make thumbnails of the images that are in my first servers, but it does´nt work, any idea of how I can do this using the GD library ?
View Replies !
View Related
Create Thumbnails For Index Views
Im pretty ok with php and mysql, but one thing ive never done before is make a picture gallery. I know i want to store the image in a directory, and store the file information in a mysql database. I have a few questions though, for on i dont even know where to start. How to i associate a file in a directory with information on a database? Second, i'll need to create thumbnails for index views. How do i do that? I mean im a total n00b when it comes to using images with php. I tried to search for tutorials, but man there is some real crap out there that answer none of my questions.
View Replies !
View Related
Creating Black Images When Trying To Create Thumbnails
I am trying to create thumbnails. However, I am only creating black image with the correct thumbnail size. I am using php 5.1.6 and GD 2.0.28. Below is the code that I am using. function createThumbnail($imageDirectory, $imageName, $thumbDirectory, $thumbWidth) { $srcImg = imagecreatefromjpeg("$imageDirectory/$imageName"); $origWidth = imagesx($srcImg); $origHeight = imagesy($srcImg); $thumbHeight =200; $thumbWidth =100; if($origWidth $origHeight && $thumbHeight < $origHeight){ $thumbHeight = $origHeight / ($origWidth / $thumbWidth); } else if ($origWidth < $origHeight && $thumbWidth < $origWidth) { $thumbWidth = $origWidth / ($origHeight / $thumbHeight); } else { $thumbWidth = $origWidth; $thumbHeight = $origHeight; } $thumbImg = imagecreatetruecolor($thumbWidth, $thumbHeight); imagecopyresampled($thumbImg, $srcImg, 0, 0, 0, 0, $thumbWidth, $thumbHeight, origWidth, $origHeight); imagejpeg($thumbImg, "$thumbDirectory/$imageName"); } if(!file_exists("/home/alanna/public_html/pics/thumb/")){ if(!mkdir("/home/alanna/public_html/pics/thumb/")){ echo "error making thumbs directory"; } } if(file_exists("/home/alanna/public_html/pics/thumb/". $imagename)){ echo "File already exists"; } else { createThumbnail("/home/alanna/public_html/pics/full/", $imagename, "/ home/alanna/public_html/pics/thumb/", 100); }
View Replies !
View Related
How To Install Ffmpeg-php To Create Thumbnails From Videos?
I'm trying to install this extension: http://ffmpeg-php.sourceforge.net/ I dont understand this part: Run autoconf in your php source directory to update the configure script. 1. cd /path/to/php_sources 2. autoconf Configure PHP with the ffmpeg option. 1. ./configure [other options...] --with-ffmpeg=yes im at /usr/local/lib/php and do not see anything about autoconf?
View Replies !
View Related
Upload Files (pictures) To Server From A Webpage?
Is there any way to have people upload files (pictures are what I would like for now) to my server from a webpage? What (if any) built in functions or variables would help me to be able to do this? (actually I just noticed the "attach file" segment below... and this appears to be a php page, so it must be possible)
View Replies !
View Related
Configure My Apache Server To Display Thumbnails Of Images
Is there a way to configure my Apache server to display thumbnails of images when it lists a folder's entries? I have thousands of images which I upload to a folder on the server, but when I want to remotely find a particular image, I have to guess it based on the filename. Can this be done in apache, or is there a simple PHP script that can take the contents of a folder then generate and display thumbnails? I don't want a fancy image gallery. I've had a good look around, but all my searches turn up how to set up image galleries etc. which is not what I want.
View Replies !
View Related
Thumbnails - Create "dead" Space At The Side Of The Picture
I've managed to create thumbnails successfully. However i have a slighty issue with this, the pictures are pictures, usually from digital cameras. Anyway, they have different aspect ratios at times and some are landscape, some portrait etc. I've got the thumbnail generator working that keeps the ratio the same and has a max width of 150 x 150. (this means portrate pictures are taller and thiner still and landscape wider and shorter). I was thinking a good solution would be to create "dead" space at the side of the picture, basically to make the ratio up to 1:1 on each picture. Just with black or White. So if say i was in photoshop i would be using the canvas resize tool.
View Replies !
View Related
Can I Execute PHP From External/different Server?
Hopefully there are some experts out there that can help with this - I've done a bit of searching here but haven't found an answer yet. The problem is, the site where I'm hosting a set of html files does not support PHP. I have another host which does support PHP. I need to have my html files located on the server which does not support PHP. Is there some way I can execute my PHP scripts within a regular HTML file? I've seen references to using Javascript for this but no working examples (and none I could make work). Unfortunately I can't get PHP on the site where I need it without redirecting my domain (among other things). If there is a way to execute the PHP remotely, that would be the preference..
View Replies !
View Related
Php.ini External Mail Server
I have setup WAMP server on my computer and I want the server to use an external mail server (my webhosts). My computer is running Vista and the mail server I want to use it running Linux. I can't figure it out from the PHP docs.
View Replies !
View Related
Using External SMTP Server
I need some help with an script: // send message if($_POST[submit]) { // check for suspected injection strings foreach($_POST as $name => $value) { filter_string($value); } // check for unexpected newline characters foreach($_POST as $name => $value) { if($name != 'message') filter_string($value); } $_POST = safe_data($_POST, 'display');.
View Replies !
View Related
Compiling With Oracle Support For External Db Server?
I'm trying to compile PHP as an Apache module with Oracle-oci8 support.. and at the moment I'm not having much luck because 'configure' needs Oracle to be installed on the same machine. Unfortunately, there isn't a local copy of Oracle, and the databases I want to interact with are on another server. Are there any workarounds for this or does Oracle need to be installed on the machine I'm compiling PHP on?
View Replies !
View Related
How To Configure External Mail Server On Linux In PHP.ini
Is there anyway I can configure PHP email to use external mail server on Linux? I know you can do it on Windows. I did an experience. I updated php.ini showed below. However I could not receive email. myServerAddress does have SMTP mail server running. Any comments? [mail function] ; For Win32 only. ; SMTP = localhost SMTP = myServerAddress smtp_port = 25 ; For Win32 only. ;sendmail_from = me@example.com ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). sendmail_path = /usr/sbin/sendmail -t -i
View Replies !
View Related
Mailing To External Server:Sender Domain Must Exist
My server gives this bounced mail only when I try to send it to another server.The mail I send to myself still arives! For some reason this mail works fine, but doesn't arrive? server error: Email adres sender doesn't exists? ... while talking to mail.somehost.com.: >>> MAIL From:<nobody@localhost.localdomain> SIZE=46 <<< 501 <nobody@localhost>... Sender domain must exist 501 someone@somehost.com... Data format error
View Replies !
View Related
External PHP/HTML Loader To A Iframe From A Server Side Php Script
I think I would call what i am trying to do is build a External PHP/HTML Loader where I am laoding a iframe on a web page from a server side PHP script - the action for trigering the event on making the iframe come visable i would like to be done in the server side script and because I do not want any user interaction on trigering that action or alert to happen. Hiding the iframe The only way to hide an iframe that allows both browsers to access its content is b setting the style property width and height to 0px for example like this: <iframe name="myIframe" src="blank.html" style="width:0px;height:0px" frameborder="0"> </iframe> In the example the scr="blank.html" would "blank.php" work also and does the file need to exist on the server of not will it throw a error condition? if so is there a better way to do that? i have also seen src=" " maybe that is a better solution - i just do not know? any comnets on that issue is welcome! Unstead of load a page that contains a javascript alert. I want to trigger the alert by either one of two metords first it could be done by passing something from a php server side script - but what can i do to acpompish that - I do not want to use the GET in the address bar due to the fact that i have a some security issues with that techique and feel quite uncomfertable about the GET Also there are differnces in the way the two browsers use the java script and the alert so by trigger the alert in the server side PHP avoids all that and i think as a lot cleaner for my use this time. A thought might be the following - I could also use some type of techique to test the size of the text contained in the file named in the src= in the iframe properties but not clear at this point what i can do here either? Any ideas or sujestions about how that can be done. I could also use both the server side PHP and the testing of the size of the file would be a shure way of makeing shure the ifrane stay hidden when nothing in the file named in the src= property. The name property in the iframe which in the above example myframe is that the proper way to reference the iframe or should i also set the id= property and why would i have to please explain? In the iframe construct or object above i want to have the scroll bar be active if the text being displayed in larger then the arae on the screen os the scroll bars set be default or do i have to explectly set the property handeling the scroll bars to get them to work? Npw how should i handle the speed of loading a exteranl file in this case a PHP file into the iframe that is the file named in the src= property. what is the impact of just referenceing the php file containing the text that is to be loaded into the iframe directly. It is or coould be a lot of text. Or is it the best policy to load the data in the background to a like hidden DIV or construct or some kind of blob variable or array of some kind something and then dump the text after it is local to the wab page then move it to the iframe? what are you thoughts on that also welcome.
View Replies !
View Related
Create A Server Using Sockets
I have created a server using sockets similar to: http://us.php.net/manual/en/ref.sockets.php. I run the script from the command line using php -q /path to php file. The problem is using mysql queries within the do events. On my script I replaced echo "$buf " with my mysql information and a query string. Code:
View Replies !
View Related
Create Session After Authentication On Other Server
I've posted my problem in an earlier thread and didn't get any luck. In this post I'm trying to make my question more clear: - I've wrote a php script that composes http get header, this script gets a file and does basic authentication (see below) - The server that recieves the request (this case: www.example.com) succesfully authenticates gives the script the page requested. What I would like to happen: - The page requested should initiate a session between the server and the client. Setting session_start(); in the page requested doesn't do the trick Code:
View Replies !
View Related
Create A New .html File On My Server...
i have some data in a variable ($message) that is being emailed with the php's mail() function (an html email actually)...i'd like to also take that html data in the $message variable and have my script also make a new .html (with any random name) file on my server with that $message data, any easy way to do that?
View Replies !
View Related
Create/write A File On A Remote Server
i call a php script which is sat on a php server from mydomain (its the way the isp is set up). i can call the script, send it a file name and data and it will create/write the file without any problems. that means it writes the file in a directory on the php server. i can specify a directory using a pathname and its all fine. i really want to write back to the mydomain and not the php server. the code i have does not work. Code: <?php $file = fopen ("ftp://ftp.mydomain.com/testfile.xml", "w"); if (!$file) { echo "<p>Unable to open remote file for writing. "; exit; } /* Write the data here. */ fwrite ($file, $_SERVER['HTTP_USER_AGENT'] . " "); fclose ($file); ?> ..............
View Replies !
View Related
How Do I Create User Name/password Protect Dirs On Apache Server?
On an Apache server, I want to be able to have a user name/password directory. I know this can be done with .htaccess, but I want to be able to do this for multiple users. The purpose of this, is that from the web page, I want clients to be able to have their own user name and password, which would grant them access to their own web page which would contain their client files for them to download. How can this best be accomplished considering I can't be root on the web server? I was thinking maybe this can be done in PHP?
View Replies !
View Related
SMTP Server - Create A Php Script Thazt Send An Mail
i'm trynig to create a php script thazt send an mail does someone know how to set the smtp server smtpserver=smtp1 and it is remote server not on my machine. Itried but i've got this[color=blue][color=green] >>Failed to connect to mailserver at "localhost" port 25, verify your[/color][/color] "SMTP" >>and "smtp_port" setting in php.ini or use ini_set()
View Replies !
View Related
Create A Script To Check A Server Status Based On IP And Port Number.
I am trying to create a script to check a server status based on IP and Port number. I know the server is up because I tested it first to make sure, but when I check it in my script it says it is offline. Not sure what the problem is, or if I am even doing this right <?php $gameserver = '64.182.161.102:27033'; if (preg_match ("/^[a-z0-9][a-z0-9-]+[a-z0-9](.[a-z]{2,4})+$/i", $gameserver)) { print "$gameserver is currently online."; } else { print "$gameserver is currently offline!"; } ?>
View Replies !
View Related
Pictures In A DB
I am working on a website where people register to model for photogrpahers. As they register, I want them added to a list of other models, which will be stored in a DB, and retrieved with PHP. I would like to create a <table> setting, and have PHP list out their names in alphabetical order. My question is this. Do I put the pictures into the DB (MySQL), or keep them in a separate directory? I would then use a foreach statement to build the <table> sequence and the rest of the page.
View Replies !
View Related
MB/KB Of Pictures
I have an image gallery and want to have a php script that shows how much MB/KB of pictures have been served that day. I am guessing that you just read how much a certain directory has been accessed and count that.
View Replies !
View Related
Thumbnails
I plan on having an images section on a page that I will be doing in PHP and I was wondering if there was anyway to have: -Only the full sized images with PHP making thumbnails on the fly -List the thumbnails in an orderly fashion, with, say, 15 thumbs on each page -Automatically index the thumb pages (ie " Previous 1 2 3 Next "etc)
View Replies !
View Related
To Use Thumbnails Or Not
I've seen a lot of posts regarding how to create thumbnails, but I haven't seen anything regarding WHEN to create the thumbnail (i.e., during the original image upload, before displaying the image, etc.), or if it's even worth it to use thumbnails. Our website is a listing service for real estate. Each listing can have up to 4 jpg/gif images up to 500k in size each. On a page, we can have up to either 10 or 25 listings. My first question is, when should I create these thumbnail images (i.e., during the original image upload, before displaying the image, etc.)? My second question is, is it even worth it to create thumbnails, or can I just display the original images and just resize them in the <IMG> tag? How server intensive is creating these images? Is it even worth it to create thumnails, or should I just continue with displaying the original image?
View Replies !
View Related
Using Thumbnails
I am displaying all the images on my site as h = 150 w = 200. It seems that I am wasting disc space by storing the full images and then displaying them smaller. The images are uploaded by the user. Is it possible to create a thumbnail with the uploaded image and then just save the thumbnail and discard (delete ? ) the uploaded image ?
View Replies !
View Related
Thumbnails On The Fly
I was helped earlier to get this going to create a thumbnail and save it. Now I wanted to go a step further and use it to create the thumbnail on the fly instead of saving it. however instead of outputting an image i get a bunck of jibberish text. Code:
View Replies !
View Related
|