Create template page for showing jpg's from direct links [closed] - php

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
When I click on a link to an jpg image, the browser will usually open a new tab, and diplay it on a white background.
I want to use a generated php page, that will diplay the image, so I could use css on it.
I could put every image on a single php site, and simply link to that, but I want it to happen automatically, once any image link is clicked.
Link
How do I do that?

Change the links to Link or similar, create a showimage.php page that has the formatting you want and use $_GET[ 'image' ] to get the requested image's url.

Related

Why the carousel doesn't automatically change - PHP [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I've created simple page where you can add images to database. Here is my code, where i pull images to website:
enter image description here
in DevTools i can see that all images are pulled correctly:
enter image description here
But when i click next/previous
website is reloading, but picture is still the same, and URL is changed:
enter image description here
Do you have any idea why?
I even add JS script to add intervals to this carousel but it's still doesn't work.
Thank you
It seems the problem about javascript library. it is not loading. You need to add full code to test it.

PHP or jq code for opening multiple links in new tab but in only one tab [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have site in php and and i have multiple links to open in new tab (by using _blank). But i want to that all links will in only one tab. So i open first links it open in new tab and clicked on second link it will open in same tab where first link currently open. So it is possible, If yes then how?
Instead of using target="_blank", you can choose a name and all links with that same name will go to the same tab. For example:
Link 1
Link 2

Photogallery with last/next photo. How does it work? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want to make a photo gallery for my users and I want it to look like this:
last img. img. next img.
<- [] ->
I wonder if someone could explain how the last/next image link/button works.
I use mysqli and i have imgID, imgURL etc stored in the db
You mention you have an imgID stored in the database.
when someone clicks on the 'Next' button, pick the id of the image that is currently showing.
Query the database to find out the next higher (or lower, based on whatever sort), imgID.
Then fetch its URL.
Show that image, in the same way, however you are showing the current image.

retrieve a web page without images [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am writing a web scraper for a specific site using PHP.
I use file_get_contents function to retrieve web pages.
some pages have images and images are also retrieved with the page.
In my case I don't want images to be there. (I want text only)
my question is, is it possible to retrieve pages without images? if so how?
additional info: I have checked the source of the page. there base tag is defined inside head tag and pointing to the same url.
Edit: I just notice images are base64 encoded.
It is not possible to "retrieve" the page with the images not included. You would need to parse/scrub the contents after retrieving it.
Inline with a previous comment, one method (of several) is this way if you simply need the image tags removed:
$data=file_get_contents();
preg_replace("/<img[^>]+>/i", "(image) ", $content);
echo $content;

How to add webcam feed to my webpage [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
its me again.. is it possible to take webcam stream and add it to webpage? I checked page source. looks like it creates image in folder on their server
(http://www2.hak.hr/rmt/?l=135) is it posible to get that image to my webpage? Thanks anyone for help
You can embed the image with something like this:
<img src="http://www2.hak.hr/hak_webcam/cam.asp?id=22" alt="img"></img>
You just have one problem when the image adress is changing you have to do it too! To prevent the embed from another site it seems like they are adding as url parameter a timestamp.
As you can see they have a copyright on this so you aren't allowed to embed it.

Categories