Is anyone familiar with the IMAP2DB script on GitHub (https://github.com/dgesj/IMAP2DB)?
I have been using this for a while but there is one element that does not work and, despite searching unable to find a solution.
The script converts the email to a DB record and should save images in the email body that uses a 'cid' as the src to a file on the server and then change the src to that location, so when you display the record it has a proper src to pull the image with. The problem is this does not work and I cannot figure out why.
Everything else in the script works correctly, the DB record is created and if there is a physical attachment then that is saved as expected, however imbedded images (using the 'cid' as a src) do not save.
Anyone have any ideas how this could be resolved?
I have tried to debug and resolve, but honestly it has all been guess work and I really have no idea what I am doing with this one,
Any support would be appreciated.
Related
So I was thinking and thinking and couldn't figure it out. So I was following this tutorial which I want to implement on my site https://www.w3schools.com/php/php_file_upload.asp and on the tutorial when the user uploads their image it sends it straight to a folder, which will obviously be in the server files. Now my problem here is, if I want to display their image somewhere on their profile when they upload it, how would I go about grabbing the image from the folder, or do I have to change the code on the tutorial so that it saves in my database? I really have no clue, and I am now officially lost and anxiety is slowly falling down my imaginary tears that are illustrated by my depressed brain, and yeah.
You save the images in a specific folder, then save the filename in the database. Whenever you want to retrieve this file in your front-end you just take the filename from the database and link to wherever you put the file.
I need to know the image upload date from a jpg file on another website. The image has no EXIF information (everything empty).
How can it be done? It's not my own server so I can't just use FTP.
You can only get what the server sends you, which in this case is the image data. You don't know where it got the image-data from, and you don't know when it was put there. ... Unless, by a separate request, the server gives you such information.
My question is about HTML and PHP.
This is my setup right now:
A website where user have accounts
A FTP server with pictures (currently none)
Files are currently saved on the website in the "PICTURES" folder (which is accessible by everybody who know the full URL)
So, I would like to know how I can display the images without storing them on the website (which will fix my URL problem).
My idea was to move the files on the FTP server, and when a users logon and request a page with those images, download them through a FTP connection, save them on the website, display the images, and remove them. Which would make them accessible only between the downloading time. But this solutions sounds REALLY bad to me.
You need always to have a place where your images are stored. But, if you don't want to give a user the chance to know where are stored, you can create a system which is used to show the images.
Think about this, if you want to download a file from Mega, you can't access to the URL where the file is stored, instead of that, the server itselfs calls a system who assign you a "key" and you can download the file only through that system using your "key".
You could use a system like "base64" so you can encode your image, and show it using it, or, you can use the "header" modifier so, you can display an image using a PHP code.
For example your image tag will be like:
<img src="processImage.php?id=01&user=10&key=123" />
So, your processImage will return a "tricky" image, actually not the image, but the code processed by PHP will be returned, like using "imagejpg()" function with the header "Content-Type:image/jpeg" and then the user will not know where the image is stored actually but the img will works actually.
I have constructed a site for users to upload their own work and share it.
At the moment, people can search the database for pieces of work and they can upload their own which is working fine.
However, when someone uploads a piece of work I have to manually duplicate a php page, add the url into the database and edit the query to show the relevant content.
I was wondering if there was any way of getting my php file to do this for each upload.
Thanks, Tyler
I am using curl to store webpage in txt file and then reading the file to parse its content.
For some website its running fine but for some websites it is(file_get_html) returning null.
I have checked that txt file is generated with data but it is unable read the content.
For this website when i use direct link in file_get_html at that time also it returns null.
I have added user agent but not working.
Finally i removed all the content from file except one div tag at that time it read the content.
Kindly suggest why is it happening like this?