Build URL Shortener using PHP with MySQL & JavaScript | Short URL in PHP

Build URL Shortener using PHP with MySQL & JavaScript | Short URL in PHP

CodingNepal

3 года назад

34,668 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@adzra9476
@adzra9476 - 12.11.2023 10:04

bro
Can this project be made into a shortlink api? so that other friends can use our shortlink with an api like bitly api?

Ответить
@clevertech74
@clevertech74 - 23.07.2023 22:46

Good project but the code looks like a bit spaghetti code to me. I mean, no offense but this is the reason why there is so much hate towards PHP in the community out there. You could have made this on a more OOP approach, creating a class and a manager class to deal with all the queries to the DB from there. Then using the classes in your PHP files will be both cleaner and better to read. This is constructive criticism only and by no means the intention is to offend but next time if you want to showcase something do it right! PHP is an amazing language with infinite tools and possibilities to make things the right way :) One last thing, when declaring PHP variables try to give them meaningful names instead of "$c" and also is a good practice to mention the type the variable holds so you know what data type the variable is carrying. For example simply by putting the letter of the data type in front of the variable: $nCount (number/integer data type), $sTitle (string data type), $aNames (array data type), and so on...

Ответить
@Anji-Technical
@Anji-Technical - 03.04.2023 10:38

hii :) can you please make a searchbox like your website using any language

Ответить
@ourielperez1646
@ourielperez1646 - 16.03.2023 16:25

Thank you very much!

Ответить
@atornous8505
@atornous8505 - 31.01.2023 15:39

Dherai dherai dhanyawaad tapailai 🙏

Ответить
@yobouamalick3477
@yobouamalick3477 - 27.12.2022 12:24

Thanks! Tres bien expliqué !

Ответить
@hossainmbiddut7263
@hossainmbiddut7263 - 20.12.2022 06:11

Your tutorial helped me much. Could u please help me learning about how to get unique clicks?

Ответить
@purno-xyz
@purno-xyz - 07.11.2022 08:25

Can you give the shortner link please sir?

Ответить
@nazeerkhan1914
@nazeerkhan1914 - 31.10.2022 16:58

brother can you make a full dynamic blog , news or e-commerce website

Ответить
@anynoop2163
@anynoop2163 - 14.09.2022 01:04

Pls can I get ur attention pls?

Ответить
@henriquelenda9020
@henriquelenda9020 - 04.09.2022 16:37

Hello, could you demonstrate what would change if pdo was used instead of mysqli?

Ответить
@MobyGeek
@MobyGeek - 02.09.2022 19:22

I want to put a password for index page so people can't see my redirect pages , But when i tried to do it the password goes also for redirects so visitors to redirect was asked to put password. How to solve it please.

Ответить
@nawab8163
@nawab8163 - 14.08.2022 15:35

Bhai link shortner website ka kitna charge h btao bhai

Ответить
@WillSmith-qt7me
@WillSmith-qt7me - 16.05.2022 20:35

Amazing quality, very good. Thanks friend.

Ответить
@samannoyb
@samannoyb - 15.04.2022 13:05

Bless this guy 'Nilkamal Guy'!

Ответить
@jagadeeshchilukuri4660
@jagadeeshchilukuri4660 - 09.04.2022 23:32

I downloaded the file. But there's an issue. Let's say my saved project name is shorturl. If I enter a URL and click shorten. Then the shortened URL should be (for example) localhost/shorturl/1baff . But for me it's localhost/shorturl/localhost/url/1baff . Please help me to fix it.

Ответить
@kamalgajavalli6174
@kamalgajavalli6174 - 06.03.2022 11:27

Why I am getting file not found when redirecting

Ответить
@Geenzo69
@Geenzo69 - 28.02.2022 14:34

It's really helpful I mean Removing query string thank you very much

Ответить
@onlineincome5364
@onlineincome5364 - 19.02.2022 12:17

Please ptc website script video create

Ответить
@mapuiteavena1770
@mapuiteavena1770 - 17.02.2022 10:59

Please make php admin panel . User list , stylish list and ui . Animated

Ответить
@RTiN
@RTiN - 16.12.2021 13:38

Hello why my short link have a error "File not found."?

Ответить
@user-wm7do5kz4f
@user-wm7do5kz4f - 22.11.2021 18:53

Awesome Video..
The only thing i didn't understand that we are saving long url respectively with short url in our database but how search engine knows that short url ??

Ответить
@itzz_samael
@itzz_samael - 12.11.2021 13:36

Bro I Got Error when i Goto to Link Its Show 404! Not Found In my server

Ответить
@mhelbaterina9541
@mhelbaterina9541 - 18.10.2021 07:25

how to do php??

Ответить
@protapmistry2157
@protapmistry2157 - 30.09.2021 11:15

After (clicking on)/pasting the shortened link it shows "Object not found !!! - Error 404". Stored data and link conversion works fine. How can I solve it? @CodingNepal or Any viewers please response and help to solve it.

Ответить
@LA_RAMOS
@LA_RAMOS - 28.09.2021 01:39

Do i need to config xampp, because i'm stuck in getting the short url compattible with the full url which everytime i paste in other tab it displays: 404 error.
I downloaded the code and copy it, but nothing works.

Can someone help me

Ответить
@_Nolly_
@_Nolly_ - 11.08.2021 03:05

If someone wants, here are the .htaccess lines:

"""
RewriteEngine On

RewriteCond $1 !^(index\.php)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
"""

just copy them directly ;)

Ответить
@kousikraj4597
@kousikraj4597 - 19.07.2021 22:14

I got a error.. i dk whts it.. the shorten url is inserted into the db.. but when i paste url in the chrome.. it shows the requested url was not found on this server.. i done exactly wht have u done.. the values are inserted into the db.. please help me

Ответить
@anasnazean
@anasnazean - 14.07.2021 19:24

I just finish it... It working prefectly.
100%
Im testing it in 000Webhost..

The question.. How to make only login user can use it .. And they just can look their data only.

I don't know how to sync it

Ответить
@abdkun3212
@abdkun3212 - 13.07.2021 11:57

when the url is wrong how to redirect it to 404.html without to index.php

Ответить
@tholfikarmohammed887
@tholfikarmohammed887 - 12.07.2021 05:17

Thank you very much. It was nice project and not easy, keep up

Ответить
@atanujana8119
@atanujana8119 - 02.06.2021 18:05

hello sir pls make a video on all video downloader from url using php ,pls sir

Ответить
@cristianMoraJ
@cristianMoraJ - 25.05.2021 22:28

Excellent video, the only thing that changed was the ajax requests for fetch, and it remains to validate that it does not allow caracates like # or?.
Thank you brother for what you teach us

Ответить
@ranfisbarreto9758
@ranfisbarreto9758 - 29.04.2021 01:11

How could I after shortening the link I sent you to a waiting window of 5 seconds

Ответить
@omorfaruk6986
@omorfaruk6986 - 13.04.2021 07:36

awesome thanks u sir

Ответить
@madalitsosimbeye1553
@madalitsosimbeye1553 - 12.04.2021 23:55

When are you doing a music site sir?

Ответить
@herolooter3868
@herolooter3868 - 06.04.2021 22:12

Code wrong ha old ha

Ответить
@samiroli5466
@samiroli5466 - 04.04.2021 21:54

💟💟💟

Ответить
@johnaeronsencil8839
@johnaeronsencil8839 - 01.04.2021 10:25

Sir help me, how can I fix "The requested url was not found on this server" whenever I try to open the shorten link.

Ответить
@afreenparween6090
@afreenparween6090 - 30.03.2021 17:45

Hey bro plz make one social media app like instagram

Ответить
@TechWorld-qe2ku
@TechWorld-qe2ku - 30.03.2021 06:45

Can you please make qr code scanning page? please

Ответить
@ErwinnPratama
@ErwinnPratama - 30.03.2021 03:01

When i try to redirecting user to the original url i got error like this // The requested URL was not found on this server. // i already downloaded original file from description , but the error was same , please help me , (sorry for bad english)

Ответить
@pronehacker9915
@pronehacker9915 - 29.03.2021 16:39

how to u make that clear all funtion sir?

Ответить