How to Hide Zoom links in Address bar of any Browser - php

I have a project were client wants to hide Shared link to their student because client thinking that student sharing their links of zoom meeting with another students of another organization.(so the client doesn't wants to share links due to client is teaching a Paid Course).
So I'm Thinking that what if we open link window as popup window.
but the problem is target=_blank and opening new window not popup windows.
how to solve this thing?
I'm using following code of php
echo "<td><a href=" . $row['r_link'] ." target=_blank>". $row['r_topic'] ."</td>";

I had Solved this Problem using iframe. iframe hides the address from the normal user (not saying from a hacker).
I added all link details in html form with input type "hidden" and posted/set target on the next page. Where php fetches parameters of link and put in iframe src tag. Code as Fallows.
in HTML
<input type=hidden name=r_id value=$id>
in next page PHP and HTML
$r_link = mysqli_real_escape_string($con,$_POST['r_id']);
<iframe src="<?php echo $r_link ?>"></iframe>
Thank You,
in this way I have solved my issue of hiding the meeting link.

Related

a tag in a php while loop opens some details in a new window

I got some rows contains a tag (item name) from while loop, I want if I clicked on one of them a new page appears and that page contains some details about the item which I clicked on(without JavaScript).
I used on-click and could open the new page and get some details, but how to relate it to the clicked item.
Code:
while($package_fetch = $package_query->fetch_array()){
$package_td[] = "
<tr>
<td>".$package_fetch["package_no"]."</td>
<td><a href='../reports/r_package.php?hello=true' target='framename'>".$package_fetch["package_name"]."</a></td>
</tr>";
}
the attribue is target and the value is _blank
<a href='#' target='_blank'>Page</a>
that will open the page in a new window
I think you are mixing things.
Your question seems to be related to html rather than to the server side language you do the loop with.
In addition, it seems you are confusing JavaScript with Java.
Nevertheless, it seems you're looking for the "target" attribute in an anchor element.

Words after question mark are missing when I open a link in php/HTML

I know that it's kind of wrong to ask a question that's almost been answered in the past, but even though I'm trying to use this solution, it doesn't work.
Basically, I have a php table with a search link created in a HTML button from the strings inside the table.
Let's say that this string is creating a search in the website called Discogs and that the information I'm searching through a created link is the word "Beatles".
www.discogs.com/search/?q=Beatles
You notice the ?q=
Everytime I click on the link through a php code which looks like this, the opened link brings me to www.discogs.com/search/? WITHOUT THE REST OF STRINGS (in that case, the word Beatles)
I tried to rawurlencode the ? to have it as a %3F.
Here is what my code looks like
$discogslink = 'http://www.discogs.com/search/'.rawurlencode('?').'q='.'Beatles' ;
$form = "<form action='$discogslink' >";
$form .= "<input type='submit' value='Discogs'>";
$form .= "</form>";
echo '<td class="'.$lps->type.'">'.$form.' </td>';
The link that I would like to open is
http://www.discogs.com/search/?q=Beatles
The link that opens is :
http://www.discogs.com/search/? (nothing after the '?'...)
Do you have any idea why it does that?
BONUS QUESTION : How can I make the button open in a new tab instead of the same one?
The reason for this is the default behaviour of HTML forms. They send data as a GET request, just like links do. So in your case the content of the form (which is empty) overwrites your q-parameter because the form content wins over the parameters specified in the action link.
The solution is to add a hidden field:
<input type="hidden" name="q" value="Beatles"></input>
And concerning the new window:
<form target="_blank" ...

HTML/PHP - Send data with link without using JavaScript

I'm new to web programming and I have a problem with the website I'm trying to do : I want to send some data to another .php page when the user clicks a link (there are several links, each link is the title of an newspaper article and when the user clicks one of them, it sends the id of the article because the next page has to load the content of the article). But I must not use Javascript.
Here is my previous code :
<h2> Articles </h2>
<?php
$articlesSql = "SELECT id, title FROM Article A, ApproveArticle VA WHERE A.id = VA.article AND VA.state='published';";
$articlesQuery = pg_query($connect, $articlesSql);
while($articlesResult = pg_fetch_array($articlesQuery)) {
echo "<form id=\"linkArticle\" action=\"article.php\">";
echo "<input type=\"hidden\" name=\"article\" value=\"$articlesResult[id]\"> </form>";
echo "<a href='#' onclick='document.getElementById(\"linkArticle\").submit()'> $articlesResult[title] </a> <br/>";
}
?>
Is there a way to avoid using Javascript? If so, how do I do?
Thank you for your help in this matter and have a nice day.
There is no way to submit a form without using a submit button with HTML only.
You can however make your button look like a link. This will require some CSS. Have a look at this thread for inspiration.
A better alternative that also solves your problem would be to ditch the form completely.
Simply include the article id you want to transfer to your PHP script into the URL as a parameter:
echo " $articlesResult[title] <br/>";
After the user clicked the link, you will be able to read the article id using $_GET['article'].

facebook sharing using php

i have one page on that page having multiple images.On each image have their own share and like button.when i click on share button i want to share that perticular image but that is not happening please help me.
here is my code..
<script type="text/javascript">
var str;
function fbs_click(u,val)
{
var i;
var imgobj=document.getElementById(val).getElementsByTagName('img');
for(i=0;i<imgobj.length;i++){
str=imgobj[i].src;
//document.write("<br>");
}
alert(str);
//This is to show fb popup for sharing passed pageurl
window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u),'sharer','toolbar=0,status=0,width=626,height=436');
return false;
}
</script>
<!--This is for setting img for fb like -->
<script type="text/javascript">document.write('<link rel="image_src" type="image/jpeg" href="'+str+'">');</script>
$url="http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
<div class='sharebutton'>
<a href='#' onclick='return fbs_click(\"$url\",\"$src_value\");' class='fb_share_link'>Share on Facebook</a>
</div>
i have paste the code is short just understand you my problem
The problem is, you're only sending the page url. Facebook indexes its like counts based on the url.
Since Facebook has no idea which image on the page the user is intending to share, it grabs your default meta tags for the page and that's what shows up on the user's timeline. Since the urls for each photo are the same, sharing any one photo will result in the counter being incremented for all photos.
One way to make this work would be to create a separate page for each image on your site and pass that in your onclick function. That page has specific metadata for that image the Facebook parser can use. When a user follows that link, have a script on that page to redirect them back to your main page (preferably to an anchor at the right photo). You'll need to have some way to fail gracefully for people who don't have javascript enabled.

Trying to load a different iframe within a div popup box depending on which of several links is clicked to open the box

I have an overlay popup box (DIV + JavaScript + some CSS) which is toggled by a link, like this:
<a href="#" onclick="popup('popUpDiv')">
The box that pops up contains an iframe. Now I want different links on my page to load different iframes when the box opens; so that link A would toggle the box to appear, and load iframe1.html inside the box, while link B would toggle the same box to appear, but load iframe2.html inside the box, and so forth.
I'm a beginning programmer, and I first figured maybe this could be done with PHP, by putting something like this inside the popUpDiv:
<iframe src="http://mysite.com/iframe<?php echo $_GET ["iframeid"] ?>.html">
... and then simply adding ?iframeid=x to each link's href, where x is the id of the iframe to be loaded.
This obviously won't work in practice though, because it requires a page reload, and when the link is clicked, the popUpDiv is toggled to open, but at the same instant, the page reloads, now with the ?iframeid=x query string in place, but too late, since the popUpDiv disappeared on reload.
Is there perhaps a JavaScript equivalent that could be used, or can anybody suggest another way to make this work?
FYI, this is the kind of popup box I'm working with:
http://www.pat-burt.com/csspopup.html
I finally found a really simple way of accomplishing this without additional JavaScripting, by simply using the target attribute:
<iframe name="myfavoriteiframe">
Then:
This is a link.
P.S. Just FYI for any of those out there who might want to use this feature with Vimeo's JavaScript API, as I'm doing: In order to make API buttons work with this target method, it seems like the iframe src-attribute cannot be left blank. You need to specify a link to any of your videos in the src, so that a video loads into the iframe on page load, like this:
<iframe name="myfavoriteiframe" id="player_1" src="http://player.vimeo.com/video/[the_number_of_your_video]?api=1&player_id=player_1">
I simply inserted the URL to the first video on my page, but you can use any of them, since they're hidden anyway.
Then link to any of your videos using the target method described above, and the pre-set iframe video will be replaced by a video of your choice.
Create two divs with the two variations of content (the two iframes with each specific URL). Then toggle by the name of the div.
<a href="#" onclick="popup('popUpDiv1')">
<a href="#" onclick="popup('popUpDiv2')">
Set the id attributes of the div elements appropriately.
Rather than adding something to the popup DIV element, I would add a required link to the href property of the link that you use to open the popup:
<a href="http://example.com/first/uri" onclick="pre_popup('popUpDiv')">
<a href="http://example.com/first/uri" onclick="pre_popup('popUpDiv')">
<a href="http://example.com/first/uri" onclick="pre_popup('popUpDiv')">
And then inside the popup function I would take the href parameter of the link that has triggered the event and use it in a popup:
function pre_popup(id) {
// Take the href parameter of the link
var href = this.href;
// And then use it in the iframe
window.frames["your_iframe"].src = href;
// And then pop it
popup(id);
}

Categories