Guys I’m trying to making a page called slider and that page include both data passing and data getting methods. I created separate sections and i preformed that task. The question is when I using database bootstrap(cloud tables) the filtering fields not showing.pls help me to fix this..THE QUESTION OCCERS WHEN Extend with master layout.
Category: PHP
Category Added in a WPeMatico Campaign
PHP : How to select specific parts of a string
I was wondering… I have two strings :
"CN=CMPPDepartemental_Direction,OU=1 - Groupes de sécurité,OU=CMPP_Departementale,OU=Pole_Ambulatoire,OU=Utilisateurs_ADEI,DC=doadei,DC=wan",
"CN=CMPPDepartemental_Secretariat,OU=1 - Groupes de sécurité,OU=CMPP_Departementale,OU=Pole_Ambulatoire,OU=Utilisateurs_ADEI,DC=doadei,DC=wan"
Is there a way in php to select only the first part of these strings ? I would like to just select CMPPDepartemental_Direction and CMPPDepartemental_Secretariat.
I had thought of trying with substr() or trim() but without success.
Saving LDAP User Entity in Database without Password
Theory: Is there a way to store an Ldap User in your own database, necassarly for relations, without the password and somehow still make refreshUser work?
I have changed my system to work without having to store the pwd by checking on every login if the password matches the ldap server user password.
Symfony calls on every request the refreshUser method of your Provider, I have a custom LDAP Provider, to refresh the user using doctrine from the database. Symfony insures so that the object is always upToDate after an edit.
The problem is that this method call the User Entity getPassword() method, which is not implement due to none pwd in db.
I have seen an approach to fix it, which is saving the Entity in an session and everytime when refreshUser() is called, returning the session entity. But then there is no way to get it always updated after edit. And I don’t want to ruin the symfony infrastructure.
So is there an way to refreshUser() with maybe calling the LDAP Server again and asking if informations still match?
ROBOCOPY ERROR 5 (0x00000005) Accessing Source Directory Access is denied
i am using robocopy in php code to copy a file from one server to another.
but whenever i try to copy file from/to outside the xampp it’s through an error
ERROR 5 (0x00000005) Accessing Source Directory Access is denied
this is my code
$output = shell_exec(‘robocopy c:Userskhushi.agarwalDesktop “.” “QOH2.xlsx”‘);
echo “
$output
“;
echo ‘
‘;
output
ROBOCOPY :: Robust File Copy for Windows
Started : Tuesday, May 3, 2022 2:55:34 PM
Source : c:Userskhushi.agarwalDesktop
Dest : C:xampphtdocskhushiphpseclib
Files : QOH2.xlsx
Options : /DCOPY:DA /COPY:DAT /R:1000000 /W:30
2022/05/03 14:55:34 ERROR 5 (0x00000005) Accessing Source Directory c:Userskhushi.agarwalDesktop
Access is denied
mysqli bind_param or add directly into query [duplicate]
why people use bind_param not directly add content in query
$query=$sql->prepare("INSERT INTO table (id,column) VALUES (?,?)");
$query->bind_param("is",$VarID,$VarData);
$query->execute();
you can do this in single line and it is very simple and easy :
$sql->query("INSERT INTO table (id,column) VALUES ('$VarID','$VarData')");
so why not used easy way ?
Using MYSQLI_USE_RESULT with stmt prepare function? (Data stream)
How can i use
$stmt = $db->query($sqlString, MYSQLI_USE_RESULT);
but with prepare function? I need it, because i am using bind params, but now i need to also use MYSQLI_USE_RESULT for big data.
I need something like this:
$stmt = $db->prepare($sqlString, MYSQLI_USE_RESULT);
Error: SQLSTATE[HY000] [1044] Access denied for user ‘epiz_31603255’@’192.168.%’ to database ‘srms’
i Have tried to use PDO connection so it’s works on localserver but here in CPanel i’m getting the above error
In Plaid API, is it possible to pass bank account credentials that are already stored in my website? [closed]
I have different bank account credentials securely stored in my website database, i want to get account balances by implementing Plaid API, is it possible to pass bank account credentials that are already stored in my website without using plaid interface?
I would like fetch value last ‘timedate’ of day ….everday [closed]
| timedate |
|---|
| 2022-05-02 11:59:33 |
| 2022-05-02 11:58:42 |
| 2022-05-02 11:57:14 |
| 2022-05-01 11:59:18 |
| 2022-05-01 11:58:32 |
| 2022-05-01 11:57:29 |
I would like…
2022-05-02 11:59:33 and 2022-05-01 11:59:18
Thanks!
How to refresh PHP form
So here’s my problem:
I want to make a small quiz app using PHP, and here’s my code unitl now –
<?php
$questions = [
['What is 10 + 12?','23','19','22','21'],
['What is 19 + 21?','212','2','-15','40','80'],
['What is 3^4?','1987','27','81','33'],
['What is 2^5?','32','64','10','8']
];
$answers = ['21','40','81','32'];
$currentques = 1;
$index = $currentques - 1;
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Quizzes</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<div class="container border shadow" name="questiondiv" id="questiondiv">
<form action="" method="POST">
<p name="questiontext">
<?php
echo $questions[$index][0];
?>
</p>
<?php
$options = count($questions[$index]) - 1;
for($i = 0;$i < $options;$i++)
{
$lindex = $i + 1;
echo '<input type="radio" name="option" id="option'.strval($lindex).'">';
echo '<label for="option'.strval($lindex).'">'.$questions[$index][$lindex].'</label><br>';
}
?>
<button type="submit" name="btnnext">Next</button>
</form>
</div>
</body>
</html>
When I click on the ‘Next’ button to submit the form, I want to save the answer (I know how to do that), change the $currentques value and then ‘refresh’ the form/dynamically generate it again, this time to show the next question and its respective options. This will go on until I reach the last question and create an array called $useranswers. I will compare this with my $answers array and generate a score.
I am confused regarding the ‘refresh’/re-dynamically generating part. I would be grateful for any help.
Scraping nuxt.js web page with curl in php
I want to scrap a web that use nuxt.js.
I use curl in PHP, but output is not the same with browser output.
It’s not having HTML elements and its NUXT function.
I want to get last and finished result.
$curl = curl_init();
$url = "http://example.com";
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_TIMEOUT, 5);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.41 Safari/537.36");
$response = curl_exec($curl);
response:
<!doctype html>
<html data-n-head-ssr lang="fa" size="md" data-n-head="%7B%22lang%22:%7B%22ssr%22:%22fa%22%7D,%22size%22:%7B%22ssr%22:%22md%22%7D%7D">
<head >
<title>40nama-website</title><meta data-n-head="ssr" name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, maximum-scale=1, user-scalable=no"><meta data-n-head="ssr" data-hid="format-detection" name="format-detection" content="telephone=no"><meta data-n-head="ssr" data-hid="application-name" name="application-name" content="40nama"><meta data-n-head="ssr" data-hid="msapplication-TileColor" name="msapplication-TileColor" content="#191919"><meta data-n-head="ssr" data-hid="theme-color" name="theme-color" content="#191919"><meta data-n-head="ssr" data-hid="apple-mobile-web-app-capable" name="apple-mobile-web-app-capable" content="yes"><meta data-n-head="ssr" data-hid="apple-mobile-web-app-status-bar-style" name="apple-mobile-web-app-status-bar-style" content="black-translucent"><meta data-n-head="ssr" data-hid="charset" charset="utf-8"><meta data-n-head="ssr" data-hid="mobile-web-app-capable" name="mobile-web-app-capable" content="yes"><meta data-n-head="ssr" data-hid="apple-mobile-web-app-title" name="apple-mobile-web-app-title" content="40nama-website"><meta data-n-head="ssr" data-hid="description" name="description" content="## Build Setup"><meta data-n-head="ssr" data-hid="og:type" name="og:type" property="og:type" content="website"><meta data-n-head="ssr" data-hid="og:title" name="og:title" property="og:title" content="40nama-website"><meta data-n-head="ssr" data-hid="og:site_name" name="og:site_name" property="og:site_name" content="40nama-website"><meta data-n-head="ssr" data-hid="og:description" name="og:description" property="og:description" content="## Build Setup"><link data-n-head="ssr" rel="icon" type="image/x-icon" href="/favicon.ico"><link data-n-head="ssr" rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link data-n-head="ssr" rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"><link data-n-head="ssr" rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"><link data-n-head="ssr" rel="manifest" href="/site.webmanifest"><link data-n-head="ssr" rel="mask-icon" href="/safari-pinned-tab.svg" color="#d34040"><link data-n-head="ssr" data-hid="shortcut-icon" rel="shortcut icon" href="/_nuxt/icons/icon_64x64.8dabdc.png"><link data-n-head="ssr" data-hid="apple-touch-icon" rel="apple-touch-icon" href="/_nuxt/icons/icon_512x512.8dabdc.png" sizes="512x512"><link data-n-head="ssr" rel="manifest" href="/_nuxt/manifest.6187793d.json" data-hid="manifest"><script data-n-head="ssr" src="/najva.js"></script><link rel="preload" href="/_nuxt/2c5002f.js" as="script"><link rel="preload" href="/_nuxt/af3d680.js" as="script"><link rel="preload" href="/_nuxt/f998c68.js" as="script"><link rel="preload" href="/_nuxt/ae4184e.js" as="script">
</head>
<body theme="dark" id="body-40nama" data-n-head="%7B%22theme%22:%7B%22ssr%22:%22dark%22%7D,%22id%22:%7B%22ssr%22:%22body-40nama%22%7D%7D">
<div data-server-rendered="true" id="__nuxt"><div class="loading-page fininshed" data-v-24b98260></div><div id="__layout"><!----></div></div><script>window.__NUXT__=(function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x){j.titleData=k;k.id=6832;k.title=l;k.stream=b;k.is_series=b;k.year="2005ان";k.year_end=c;k.title_type="movie";k.persian_subtitle=b;k.persian_title="دوستان معمولی";k.persian_plot=m;k.english_plot="While visiting his hometown during Christmas, a man comes face-to-face with his old high school crush whom he was best friends with -- a woman whose rejection of him turned him into a ferocious womanizer.";k.director=[{name:n,imdb:"nm0474955",order:h}];k.creator=a;k.cast=[{name:"Ryan Reynolds",as:"Chris Brander",imdb:"nm0005351",order:h,id:"148408",image:{cover:b,poster:{big:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30148408-b_40nama.jpg?1637524710",big_webp:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30148408-b_40nama.webp?1637524710",large:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30148408-l_40nama.jpg?1637524710",large_webp:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30148408-l_40nama.webp?1637524710",medium:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30148408-m_40nama.jpg?1637524710",medium_webp:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30148408-m_40nama.webp?1637524710",small:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30148408-s_40nama.jpg?1637524710",small_webp:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30148408-s_40nama.webp?1637524710"}}},{name:"Amy Smart",as:"Jamie Palamino",imdb:"nm0005442",order:o,id:"418360",image:{cover:b,poster:{big:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30418360-b_40nama.jpg?1641064368",big_webp:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30418360-b_40nama.webp?1641064368",large:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30418360-l_40nama.jpg?1641064368",large_webp:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30418360-l_40nama.webp?1641064368",medium:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30418360-m_40nama.jpg?1641064368",medium_webp:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30418360-m_40nama.webp?1641064368",small:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30418360-s_40nama.jpg?1641064368",small_webp:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30418360-s_40nama.webp?1641064368"}}},{name:"Anna Faris",as:"Samantha James",imdb:"nm0267506",order:2,id:"148667",image:{cover:b,poster:{big:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30148667-b_40nama.jpg?1637524997",big_webp:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30148667-b_40nama.webp?1637524997",large:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30148667-l_40nama.jpg?1637524997",large_webp:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30148667-l_40nama.webp?1637524997",medium:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30148667-m_40nama.jpg?1637524997",medium_webp:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30148667-m_40nama.webp?1637524997",small:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30148667-s_40nama.jpg?1637524997",small_webp:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30148667-s_40nama.webp?1637524997"}}},{name:"Chris Klein",as:"Dusty Dinkleman",imdb:"nm0005098",order:3,id:"426376",image:{cover:b,poster:{big:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30426376-b_40nama.jpg?1639593255",big_webp:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30426376-b_40nama.webp?1639593255",large:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30426376-l_40nama.jpg?1639593255",large_webp:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30426376-l_40nama.webp?1639593255",medium:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30426376-m_40nama.jpg?1639593255",medium_webp:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30426376-m_40nama.webp?1639593255",small:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30426376-s_40nama.jpg?1639593255",small_webp:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30426376-s_40nama.webp?1639593255"}}},{name:"Chris Marquette",as:"Mike Brander",imdb:"nm0549815",order:4,id:"426377",image:{cover:b,poster:{big:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30426377-b_40nama.jpg?1639642128",big_webp:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30426377-b_40nama.webp?1639642128",large:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30426377-l_40nama.jpg?1639642128",large_webp:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30426377-l_40nama.webp?1639642128",medium:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30426377-m_40nama.jpg?1639642128",medium_webp:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30426377-m_40nama.webp?1639642128",small:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30426377-s_40nama.jpg?1639642128",small_webp:"https:u002Fu002Fcdn.40nama.comu002Fpersonu002F30426377-s_40nama.webp?1639642128"}}},{name:"Giacomo Beltrami",as:"Young Mike Brander",imdb:"nm2274386",order:5,id:"426378",image:{cover:b,poster:{big:"https:u002Fu002Fcdn.40nama.comu002Fnoneu002Fnone-b_40nama.jpg?2",big_webp:"https:u002Fu002Fcdn.40nama.comu002Fnoneu002Fnone-b_40nama.webp?2",large:"https:u002Fu002Fcdn.40nama.comu002Fnoneu002Fnone-l_40nama.jpg?2",large_webp:"https:u002Fu002Fcdn.40nama.comu002Fnoneu002Fnone-l_40nama.webp?2",medium:"https:u002Fu002Fcdn.40nama.comu002Fnoneu002Fnone-m_40nama.jpg?2",medium_webp:"https:u002Fu002Fcdn.40nama.comu002Fnoneu002Fnone-m_40nama.webp?2",small:"https:u002Fu002Fcdn.40nama.comu002Fnoneu002Fnone-s_40nama.jpg?2",small_webp:"https:u002Fu002Fcdn.40nama.comu002Fnoneu002Fnone-s_40nama.webp?2"}}}];k.cast_cache=d;k.cast_cache_key="6832_single_a01ff574_free_website_cast";k.writer=[{name:p,imdb:"nm0204129",order:h}];k.genre=[q,r];k.genre_full=[{name:q,slug:"romance"},{name:r,slug:"comedy"}];k.country=[{name:"آلمان",code:"DE",order:s},{name:"آمریکا",code:"US",order:"1"},{name:"کانادا",code:"CA",order:"2"}];k.language=a;k.primary_language={name:t,code:"en",order:s};k.time="۱ ساعت و ۳۶ دقیقه";k.budget=c;k.age=u;k.imdb="https:u002Fu002Fwww.imdb.comu002Ftitleu002Ftt0433400";k.imdb_score="6.2";k.imdb_votes="116392";k["40nama_score"]=v;k["40nama_votes"]="16";k["40nama_userrate"]=a;k.total_watchlist="۵۷";k.total_favorite="۱۸";k.coming_soon=b;k.free_stream=b;k.imdb_250=c;k.release_date=a;k.web_release_date=a;k.bluray_release_date=a;k.post_note=c;k.updates_note=[{title:"اضافه شدن کیفیت جدید",content:"BrRip 1080p",date:"۰۹ آذر ۱۴۰۰ ۰۸:۲۸"},{title:"اضافه شدن انکود جدید",content:"YIFY",date:"۲۲ دی ۱۳۹۸ ۲۱:۴۰"}];k.metacritic="http:u002Fu002Fwww.metacritic.comu002Fmovieu002Fjust-friends";k.metacritic_score=47;k.rottentomatoes="https:u002Fu002Fwww.rottentomatoes.comu002Fmu002Fjust_friends";k.rottentomatoes_score=42;k.airstatus=a;k.nextepisode=a;k.image={cover:"https:u002Fu002Fcdn.40nama.comu002Fcoveru002F306832_40nama.jpg?1638248269",cover_webp:"https:u002Fu002Fcdn.40nama.comu002Fcoveru002F306832_40nama.webp?1638248269",poster:{big:e,big_webp:"https:u002Fu002Fcdn.40nama.comu002Fposteru002F306832-b_40nama.webp?1650970290",large:"https:u002Fu002Fcdn.40nama.comu002Fposteru002F306832-l_40nama.jpg?1650970290",large_webp:"https:u002Fu002Fcdn.40nama.comu002Fposteru002F306832-l_40nama.webp?1650970290",medium:"https:u002Fu002Fcdn.40nama.comu002Fposteru002F306832-m_40nama.jpg?1650970290",medium_webp:"https:u002Fu002Fcdn.40nama.comu002Fposteru002F306832-m_40nama.webp?1650970290",small:"https:u002Fu002Fcdn.40nama.comu002Fposteru002F306832-s_40nama.jpg?1650970290",small_webp:"https:u002Fu002Fcdn.40nama.comu002Fposteru002F306832-s_40nama.webp?1650970290"}};k.subtitle=[{language:"فارسی",quality:w,link:"https:u002Fu002Fsubscene.comu002Fsubtitlesu002Fjust-friendsu002Ffarsi_persian",single:b,season:a},{language:t,quality:w,link:"https:u002Fu002Fsubscene.comu002Fsubtitlesu002Fjust-friendsu002Fenglish",single:b,season:a}];k.subtitle_cache=d;k.subtitle_cache_key="6832_single_a01ff574_free_website_subtitles";k.collections=a;k.trailers=[{title:"Just Friends",quality:"480p",link:"https:u002Fu002Feu.trailer.cloudam.ccu002Fju002FJust_Friends_2005_Just_Friends_480p_2460549401_40nama.mp4",ip:"https:u002Fu002Fu002Ftraileru002Fju002FJust_Friends_2005_Just_Friends_480p_2460549401_40nama.mp4",cover:"https:u002Fu002Fcdn.40nama.comu002Ftraileru002FJust_Friends_2005_Just_Friends_480p_2460549401_40nama.jpg"}];k.trailers_cache=d;k.trailers_cache_key="6832_single_a01ff574_free_website_trailers";k.soundtracks=a;k.reviews=a;k.news=a;k.quotes=a;k.related_posts=a;k.seo={"og:type":"video.movie","video:duration":5760,"video:writer":[p],"video:director":[n],robots:"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1","google-site-verification":"FTU8iuuyDN_kHsCzraKFogOjABpWjHfIvroXdS77KQE","og:locale":"fa_IR","og:site_name":"دانلود فیلم و سریال با لینک مستقیم و زیرنویس فارسی بدون سانسور - سی نما","twitter:card":"summary_large_image","twitter:creator":x,"twitter:site":x,"twitter:title":f,"og:title":f,title:f,h1:f,"twitter:image:alt":g,"twitter:description":g,"og:description":g,description:g,canonical:i,"og:url":i,"twitter:image":e,"og:image":e,schema:{"@context":"http:u002Fu002Fschema.org","@type":"Movie",url:i,name:l,image:e,description:m,aggregateRating:{"@type":"AggregateRating",ratingCount:16,bestRating:10,worstRating:o,ratingValue:v},contentRating:u,genre:["Romance","Comedy"]}};return {layout:"default",data:[j],fetch:{},error:a,state:{menu:{genres:[],categories:[],tops:[],boxoffice:[]},ASParameters:a,currentPage:c,single:k,asyncCache:{ServerLRU:new Set([{key:"SINGLE::ID::6832::USER::null",payload:j}])},homepage:{homeTitles:{anime:[],movies:[],recommended:[],series:[]},top10:[],articles:{news:[],reviews:[]},watchHistory:c,loaded:b},options:{theme:"dark",size:"md",articleGridType:"grid",supportsWebp:d},party:{chat:[],options:{},serverStatus:{},isConnected:b,isAuthenticated:b,partyInitialized:b,allSockets:[],mutedUsers:[],schedule:[],logs:c,searchCache:c,pinnedMessage:a},session:{user:a,fullLibrary:[],notifications:[],UDMPending:d,ipAddress:"146.70.108.69"}},serverRendered:d,routePath:"u002Fmovieu002F6832u002FJust-Friends-2005",config:{_app:{basePath:"u002F",assetsPath:"u002F_nuxtu002F",cdnURL:a}}}}(null,false,"",true,"https:u002Fu002Fcdn.40nama.comu002Fposteru002F306832-b_40nama.jpg?1650970290","دانلود فیلم Just Friends 2005 (دوست معمولی)","دانلود فیلم Just Friends 2005 (دوست معمولی) دارای لینک مستقیم و کیفیت عالی بلوری (1080p و 720p) بدون سانسور و حذفیات",0,"https:u002Fu002F40nama.comu002Fmovieu002F6832u002FJust-Friends-2005",{},{},"Just Friends 2005","زمانی که کریس برای کریسمس به محل زندگی کودکی اش برمیگردد، به طرز اتفاقی با عشق دوران دبیرستانش یعنی جیمی که در آن زمان بهترین دوستش هم بود برخورد میکند، همان جیمی ای که با ردکردن کریس و خواستن فقط « دوستی معمولی » با او باعث شد که کریس به شخصی که به طرز وحشتناکی بی بند و بار است تبدیل شود. اما با دیدن مجدد جیمی کریس میفهمد که شانسی دوباره دارد تا بعد از سالها روابطش با جیمی را بیش از دوستی معمولی ببرد...","Roger Kumble",1,"Adam 'Tex' Davis","عاشقانه","کمدی","0","انگلیسی","PG-13",7.5," تمام کیفیت ها ","@CinamaOfficial"));</script><script src="/_nuxt/2c5002f.js" defer></script><script src="/_nuxt/af3d680.js" defer></script><script src="/_nuxt/f998c68.js" defer></script><script src="/_nuxt/ae4184e.js" defer></script>
<script defer src="https://static.cloudflareinsights.com/beacon.min.js/v652eace1692a40cfa3763df669d7439c1639079717194" integrity="sha512-Gi7xpJR8tSkrpF7aordPZQlW2DLtzUlZcumS8dMQjwDHEnw9I7ZLyiOj/6tZStRBGtGgN6ceN6cMH8z7etPGlw==" data-cf-beacon='{"rayId":"704791157821975b","token":"0ffdd30f4ba74c82be543ed9c518cf69","version":"2021.12.0","si":100}' crossorigin="anonymous"></script>
</body>
</html>
Order alphabetically SimpleXML array by attribute
I need a bit of help ordering a SimpleXML array in an alphabetical order using one of it’s attribute ($url). I have the following code that generate a page:
<?php
$xml = simplexml_load_file($xml_url);
$ids = array();
foreach($xml->list as $id) {
$ids[] = $id;
}
foreach ($ids as $id) {
PopulatePage($id);
}
function PopulatePage($id) {
$url = $id->url;
$img = $id->img;
//OTHER CODES TO GENERATE THE PAGE
}?>
The problem I have is that, if I convert the SimpleXMLObject to an Array and then order it, the code stops working since $id is no more valid. What can I do? Thanks!
`ShouldBeUnique ` cannot be used for `Queued Event Listeners`
Queued Event Listeners Code:
<?php
namespace AppListenersTest;
use AppEventsTestRollEvent;
use IlluminateContractsQueueShouldBeUnique;
use IlluminateContractsQueueShouldQueue;
use IlluminateQueueInteractsWithQueue;
class CapterBEventListener implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
public $uniqueFor = 3600;
public function handle(RollEvent $event)
{
echo 'RoolEventB' ,PHP_EOL;
sleep(10);
echo 'over--',PHP_EOL;
}
public function uniqid(RollEvent $event)
{
return 5;
}
}
Test in tinker:
$ php artisan queue:restart
for($i = 0; $i < 2; $i++) event(new AppEventsTestRollEvent(5))
Execution results are not unique:
> [2022-04-30 18:29:17][VlGCdjmgniuAKbFuJ6QL7t7jLuhxzEN6] Processing: AppListenersTestCapterBEventListener
> RoolEventB
> over--
> [2022-04-30 18:29:27][VlGCdjmgniuAKbFuJ6QL7t7jLuhxzEN6] Processed: AppListenersTestCapterBEventListener
> [2022-04-30 18:29:27][uh4p7EuDmVSVEf17SrbcoUdKNQ1xVKzo] Processing: AppListenersTestCapterBEventListener
> RoolEventB
> over--
> [2022-04-30 18:29:37][uh4p7EuDmVSVEf17SrbcoUdKNQ1xVKzo] Processed: AppListenersTestCapterBEventListener
Used ShouldBeUnique in unique-jobs:
<?php
namespace AppJobs;
use IlluminateBusQueueable;
use IlluminateContractsQueueShouldBeUnique;
use IlluminateContractsQueueShouldQueue;
use IlluminateFoundationBusDispatchable;
use IlluminateQueueInteractsWithQueue;
use IlluminateQueueSerializesModels;
class TestPodcast implements ShouldQueue, ShouldBeUnique
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public function handle()
{
echo 'handle start', PHP_EOL;
sleep(10);
echo 'handle end', PHP_EOL;
}
public function uniqueId()
{
return 5;
}
}
Test in tinker:
for($i = 0; $i < 2; $i++) AppJobsTestPodcast::dispatch();
Execution result is unique:
> [2022-05-01 10:47:30][jaEFh5PeZGVeVsDRVKD3qok5LiQ7E7ub] Processing: AppJobsTestPodcast
> handle start
> handle end
> [2022-05-01 10:47:30][jaEFh5PeZGVeVsDRVKD3qok5LiQ7E7ub] Processed: AppJobsTestPodcast
How can I use ShouldBeUnique in Queued Event Listeners
How to prevent pdf file downloads in wordpress just read pdf file online
I hope you are well I have an e-book store by wordpress woocommerce I want only books to be displayed in the store online And non downloadable
What solution do you suggest for this?
thanks
Suggest a plugin for WordPress please
PHH Datetime difference
service start = 2022-04-29 02:30:00
service end = 2022-05-05 02:40:00
emergency = 02:00 – 03:00
Work in total emergency time === ????
I need PHP function.

