PHP programers





Hello PHP programers,

Welcome to you from a PHP help community. This platform of ours is a technical support forum of PHP where we answer questions or issues faced by programers in their work. We have an elite admin panel of experts who answer the query of people & people can write comments on others' posts. This is a simple system of question & answer in which we can do advanced options related with QA sequence like add further threads on answers, set our notification settings & bookmark selected posts. The setup is a very interesting one & we have built it with specialised resolvers to reply the queries. So, if you are a PHP programer, this is a place you can enjoy much as there are many solutions to your issues here. So, this is it, browse through our system & kindly raise as many tickets as you want to solve your concerns.




You need to be logged in to perform personal actions.

Ask your question












Posted questions





saurabh@gmail.com
This question of mine is regarding the File OnChange function. When I select a file for upload from browser, & it is an image file, it should show a small preview of it there before uploading. This enabling I know can be done by Javascript but I don't know the exact code. If someone can help.
02-May-2024 07:26 pm





Admin reply
The code for this is: First of all declare the calling of onchange function in file element. Like - [ input type = "file" name = "file1" onChange = change(); ] Then code that function in head. var a = document.getElementById('file1').value; document.getElementById('img1').src = a; This sets the source of the img img1 to that file.
02-May-2024 07:31 pm





   
vijaya@gmail.com
How can we deny directory browsing to people outside our system. I mean folders which contain media files, can they be prevented from opening the file list by unauthorised users?
02-May-2024 06:59 am





Admin reply
You can create in index file in the folder which redirects the accesser back or to some other page when it tries to access it. This way it can be handled.
02-May-2024 04:13 pm





Comments
I do this job this way only. I redirect it to "about:blank". Because if I push it to 1 step back in history, it may not find place to go if the user sets this page as his default page & clears the browser.
saurabh@gmail.com [02-May-2024 07:02 pm]

   
sidh@gmail.com
How can opening of most media files be maximised in the browser? Some files open in the browser, but others download. How can this be controlled?
02-May-2024 06:48 am





Admin reply
Media opening has been increased in the browser with Mp3 & Mp4 files now playing in it & the Sql scripts & Txt formats are also accessible.
02-May-2024 04:14 pm





   
anupam@email.com
How to logout from all devices? Is it done something by session or can it be controled by database?
02-May-2024 06:46 am





Admin reply
The complete control of it will come someway by the session only, but I for the time being am telling you that you can check it to some extent of logging out the users logged in into your account from elsewhere once they refresh their page by storing a status of 'Logged out from all devices' in the database & checking from it.
02-May-2024 04:17 pm





   
sid@ymail.com
My question: What is favicon & how is it displayed. I have been asked to provide facility of favicon in a project. I don't know what favicon is. Kindly tell how to script it.
02-May-2024 06:38 am





Admin reply
Favicon is a small symbol at the top of the browser tab in your website which shows an image before your title. It can be used like a logo. Its code is: [ link rel="icon" type="image/x-icon" href="images/favicon.png" ] where favicon.png is the image name.
02-May-2024 06:36 pm





Comments
But it is not visible in mobile tabs.
saurabh@gmail.com [02-May-2024 03:53 pm]
Favicon is a new development, some of the kind of new developments that are happening, it is making development work interesting.
gaurav@hmail.com [02-May-2024 12:02 pm]

   
dineshrana@email.com
My question: What are desktop notifications? One of my clients has asked for provision of facility of desktop notifications. What are they & how do they work?
30-Apr-2024 07:06 am





Admin reply
Desktop notifications means the net will effect outside of the browser also & will check whether there are notifications from some particular website for which it has been enabled. & It will show the notifications popup when it will happen in some corner of the desktop & this way we can remain updated about our websites of concern even when they are not open.
30-Apr-2024 07:26 am





Comments
Desktop notifications are a client side object. They read the notices without the browser being involved & provide a quick-alert update of the requisite.
gaurav@hmail.com [02-May-2024 12:04 pm]

   
rd@umail.com
My question is what is the provision of emojis in HTML? Are there codes for them & how are they implemented. Also, where can they be got from?
30-Apr-2024 07:04 am





Admin reply
There are HTML codes for emojis & there are around 700 of them. The dump can be found from search & the emoji display can be produced by writing its code on a web page.
30-Apr-2024 07:23 am





Comments
The WhatsApp archive of the emojis is the richest & has the expression of almost all the requirement.
virat@mymail.com [02-May-2024 11:28 am]
The setup emojis so far are also very useful & good in number also. The emoji library is rich & qualitative.
gaurav@hmail.com [02-May-2024 10:59 am]
Replies
The library of 700 emojis is unimaginable beyond normal & it has rather extensive fields like flags of all countries & all numbers & alphabets.
There are HTML codes for standard emojis so far, & more are being worked on. As the online socialisation is growing, the need for more emojis is growing. & It is being worked on.
nilay@email.com [02-May-2024 10:33 am]

   
arushi@email.com
I want to ask this dubious question to PHP TS that is there chance of some malicious code running into a PHP script due to some such text input by user? I mean, if a user writes some such HTML or Javascript code in a textfield can it be effective as a script code & cause harm in some way?
30-Apr-2024 07:03 am





Admin reply
Yes this is true. HTML & Javascript code can be effected in a webpage just by scripting the text. & The Javascript code can be hurtful also. But there are ways to check that & the possibility of the hurt happening can be nullified thus.
30-Apr-2024 07:22 am





   
nilay@email.com
My question is regarding filesize validation. I can check a filesize to be > the allowed size after post. But how can I detect it before form submission? Is there a way to do it?
30-Apr-2024 04:29 am





Admin reply
The code for filesize retrieving in Javascript is: var filesize = document.formname.filename.files[0].size; var fs = new Number(filesize); Where filesize is the variable which is scanning the size of the file. formname is the name of the form, filename the filename & the value read will have to be converted into number after that.
30-Apr-2024 12:45 pm





Comments
Filesize can be validated after post process, but this pre-code of Javascript is better.
saurabh@gmail.com [02-May-2024 03:55 pm]

   
bhavya@email.com
My question is regarding the dropdown OnChange function. How can I perform this facility - It is easy in VB, but how can I do it when I am working in PHP?
30-Apr-2024 04:27 am





Admin reply
The dropdown OnChange function in PHP works through some AJAX code. It is not exclusively in PHP & that code has to be embedded in the page's code at the function which calls for it.
30-Apr-2024 07:12 am





   
girish@gmail.com
Admin Sir, This is my question regarding programed SMS. I want to ask from where can I send programed SMS. I have taken a pack to send web SMS, but I don't know how to use that in my website. This is my question.
30-Apr-2024 04:24 am





Admin reply
When you take an SMS pack with facility of programed SMS in that, they provide you an API key using which you can plug in their API. It is triggered somewhere in the URL when you strike it. This is how it is done.
30-Apr-2024 05:46 am






Further threads on this ticket






Closed thread
I want to know won't there be breach threat in triggering this API key in the url, users can see the key in the address bar? The API key will be the same for every trigger?
30-Apr-2024 04:23 pm





Thread reply
The API is safe & it is built securely to undisclose the key & the key doesn't show in the URL bar, rather it uses a one-time validation code to verify the functioning of the app.
30-Apr-2024 05:11 pm






Closed thread
My concern is this that even if some user gets to know my API key, can he be able to use it unauthentically?
30-Apr-2024 06:28 pm





Thread reply
No, the system of API is robust & fool-proof & is 100% secure from the point of view of unauthentication.
30-Apr-2024 08:06 pm






Closed thread
Can we construct our own SMS APIs so that the cost of the service is lessened?
02-May-2024 04:07 am





Thread reply
You can construct your own APIs, but these APIs are regulated by the TRAI authority of India.
02-May-2024 04:18 am







Comments
There were some vendors providing free supply of web SMS sometime back but all these freebirds were swiped out by TRAI.
saurabh@gmail.com [02-May-2024 03:57 pm]
The higher level made APIs are more safe & give surity of compensation if case of fault.
gaurav@hmail.com [02-May-2024 12:05 pm]

   
gaurav@hmail.com
Admin Sir, This is a question regarding timezone I am facing. If I want to set a particular timezone in my dates, I am able to do it. But if I want to detect the timezone automatically, I can't detect the region. How can I convert all my times into local timezone automatically?
30-Apr-2024 04:01 am





Admin reply
The autotimezone in PHP codes in enabled by detecting the geographical region which is detected by the I.P. address. Then the timezone is set according to the region.
30-Apr-2024 06:32 am





Comments
I also face problem of timezone conversion. I have till now done it converting the GMT into IST manually as default timezone.
saurabh@gmail.com [02-May-2024 07:00 pm]
The I.P. address is detectable in PHP easily, hence earlier it was easy to detect the region. But now due to I.P. addresses being portable, it is being of a different method.
saurabh@gmail.com [02-May-2024 04:00 pm]
The region was earlier detected by the I.P. address. Now it is done by the location.
vijaya@gmail.com [02-May-2024 12:06 pm]

   
saurabh@gmail.com
Admin Sir, This is a problem regarding outgoing mails from my website. The mails I am trying to send programatically, they aren't going. Can't I send mails like Gmail, Yahoomail etc. from my own system?
30-Apr-2024 03:48 am





Admin reply
For sending programed mail, you need a mail account at the domain at which this script is running. A personalised mail domain is what effects the mail at the server concerned. The mail will go from it only & it will have to be specified at the 'From' header in the mail function.
30-Apr-2024 07:11 am






Further threads on this ticket






Closed thread
The webmail function calls for 4 parameters - To, Subject, Body & Headers which includes the From & Attachments. Can there be more than 1 attachment enclosed at the same time?
02-May-2024 04:03 pm





Thread reply
It is possible to enclose more than 1 attachment at a time but there develop constraints of size then.
02-May-2024 04:04 pm






Closed thread
What is the constraint of size & can it be lessened to some extent?
02-May-2024 04:24 pm





Thread reply
The limitation is different for different platforms & its delimitation is also different for different forums.
02-May-2024 04:25 pm






Closed thread
Can I know the restriction for AppServ in Windows?
02-May-2024 04:26 pm





Thread reply
Appache also has different versions. It is different for different versions. There is a system of LAMP (Linux, Appache, MySQL, PHP) which works very profusely together.
02-May-2024 04:28 pm






Closed thread
AppServ is my favourite version of PHP server. I have used it for ten years & it has worked perfectly & 100% satisfactorily to the hilt. I prefer AppServ forums wherever I have to host webapps live.
02-May-2024 06:55 pm





Thread reply
AppServ is the most efficient PHP server.
02-May-2024 07:33 pm







   









<< Back