PHP URL Shortener: Build (Part 3/3)

preview_player
Показать описание

Official site

Twitter
Рекомендации по теме
Комментарии
Автор

I honestly don't know why there is 6 dislikes, but any way thanks for this great tutorial.. really helpful.

talatelash
Автор

Thanks to you and your tutorials I could learn about apps workflow and how to code in php the right way.. I lost myself searching for good tutorials, but it is hard to find something good and free on the web as yours. I love your tutorials because they make we think before coding, but it is still hard to me to understand how to plan an app and how to organize their classes and files from scratch based on an idea, even it's a simple application. I think it's very important to know how to put everything together before getting the hands dirty, and if you can show something like that I'll appreciate it !! :) Thank you

DanielBeckel
Автор

Hi Alex, a question here: I'm starting to think that the whole base_convert, insert and update could be done in one mysql query, but it's there any performance related issue for handling most of this on php? would it be slower to use mysql's CONV() and LAST_INSERT_ID() over php functionality?

juanpablodenis
Автор

Are you using XAMPP or MAMP...? What would you recommend for mac?

lauralindalena
Автор

Thanks! Can't thank you enough for doing this tutorials. You're amazing!

Djangokillen
Автор

Why are you using mysqli again? And prepared statements should still be used. PDO seems like a better choice to me. Is there a reason you didn't use PDO?

nuuou
Автор

How did you open that mysql "text editor" up? Is it only for Mac? Will using phpmyadmin give me same result?

masscantbecreatedordestroy
Автор

Why don't use Javascript and AJAX for the Form and the Response-Link ? ;)

LukasLindner
Автор

Can you give us the Source Code please??? :)

pumpkintime
Автор

hey Alex are you using "Sequel Pro" for your database? 
thanks

DMQ
Автор

Can you help me?

Warning: failed to open stream: No such file or directory in on line 3

Fatal error: require_once(): Failed opening required 'classes/Shortener.php' in on line 3

valleyview
Автор

I get this error "Parse error: syntax error, unexpected '$s' (T_VARIABLE) in on line 5"

$s = new Shortener;

kropkowyy
Автор

Had a quick look but cannot find one... do you have a video on php classes

stevenbarkley
Автор

Hey Alex, do you have a project file?

I seem to have an error I can't shake.

TKBuris
Автор

i got an error on "$this->db->query("INSERT INTO links (url, created) VALUES ('{$url}', NOW()");"

esaiastilly
Автор

i have an error "class 'mysqli' not found in shortener.php

jeimoj
Автор

Hey, I keep getting this issue:
Fatal error: Call to a member function escape_string() on a non-object in on line 21

slycegameplay
Автор

If Someone doesn't work for him .htaccess u must enable rewrite_module from Apache Modules!!

nouamanbentaj
Автор

Use prepared statements.
$code = $this->db->query("SELECT code FROM links WHERE url='{$url}' ");
This a bad idea, do this:
$code_stmt = $this->db->prepare("SELECT code FROM links WHERE url=?");
$code_stmt->bind_param("s", $url);

$code_stmt->execute();
$code_stmt->store_result();
$code_stmt->fetch();
Yes it is more lines of code but it is much safer.

morgohill
Автор

.htaccess doesn't seem to work for me.

curranrai