
12.07.2015, 18:40
|
|
Новичок
Регистрация: 09.05.2015
Сообщений: 18
Провел на форуме: 5690
Репутация:
0
|
|
PHP код:
[COLOR="#000000"][COLOR="#0000BB"][/COLOR][COLOR="#007700"][/COLOR][COLOR="#0000BB"]prepare[/COLOR][COLOR="#DD0000"]("[/COLOR][COLOR="#0000BB"]SELECT[/COLOR][COLOR="#007700"]*[/COLOR][COLOR="#0000BB"]FROM links WHERE title[/COLOR][COLOR="#007700"]=?[/COLOR][COLOR="#DD0000"]"); [/COLOR][COLOR="#0000BB"]$result[/COLOR][COLOR="#007700"]->[/COLOR][COLOR="#0000BB"]bind_param[/COLOR][COLOR="#DD0000"]("[/COLOR][COLOR="#0000BB"]s[/COLOR][COLOR="#DD0000"]",[/COLOR][COLOR="#0000BB"]$_GET[/COLOR][COLOR="#007700"][[/COLOR][COLOR="#DD0000"]'title']); [/COLOR][COLOR="#0000BB"]$result[/COLOR][COLOR="#007700"]->[/COLOR][COLOR="#0000BB"]execute[/COLOR][COLOR="#DD0000"]();
[/COLOR][COLOR="#0000BB"]$goto[/COLOR][COLOR="#DD0000"]=[/COLOR][COLOR="#0000BB"]$result[/COLOR][COLOR="#007700"]->[/COLOR][COLOR="#0000BB"]get_result[/COLOR][COLOR="#DD0000"]()->fetch_array(); [/COLOR][COLOR="#0000BB"]$g[/COLOR][COLOR="#DD0000"]=[/COLOR][COLOR="#0000BB"]$goto[/COLOR][COLOR="#007700"][[/COLOR][COLOR="#0000BB"]1[/COLOR][COLOR="#007700"]][/COLOR][COLOR="#DD0000"]; header("[/COLOR][COLOR="#0000BB"]Location[/COLOR][COLOR="#007700"]:[/COLOR][COLOR="#0000BB"]$g[/COLOR][COLOR="#DD0000"]"; }
if (isset([/COLOR][COLOR="#0000BB"]$_POST[/COLOR][COLOR="#007700"][[/COLOR][COLOR="#DD0000"]'shorten'])) { [/COLOR][COLOR="#0000BB"]$title[/COLOR][COLOR="#DD0000"]= generateRandomString(); if (substr([/COLOR][COLOR="#0000BB"]$_POST[/COLOR][COLOR="#007700"][[/COLOR][COLOR="#DD0000"]'url_to_shorten'], 0, 7) != "[/COLOR][COLOR="#0000BB"]http[/COLOR][COLOR="#007700"]:[/COLOR][COLOR="#FF8000"]//" { [/COLOR][COLOR="#0000BB"]$url[/COLOR][COLOR="#007700"]=[/COLOR][COLOR="#DD0000"]"http://"[/COLOR][COLOR="#007700"].$[/COLOR][COLOR="#0000BB"]POST[/COLOR][COLOR="#007700"][[/COLOR][COLOR="#DD0000"]'url_to_shorten'[/COLOR][COLOR="#007700"]]; } else { [/COLOR][COLOR="#0000BB"]$url[/COLOR][COLOR="#007700"]=[/COLOR][COLOR="#0000BB"]$_POST[/COLOR][COLOR="#007700"][[/COLOR][COLOR="#DD0000"]'url_to_shorten'[/COLOR][COLOR="#007700"]];
[/COLOR][COLOR="#0000BB"]$result[/COLOR][COLOR="#007700"]=[/COLOR][COLOR="#0000BB"]$db[/COLOR][COLOR="#007700"]->[/COLOR][COLOR="#0000BB"]prepare[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#DD0000"]"INSERT INTO links VALUES('',?,?)"[/COLOR][COLOR="#007700"]); [/COLOR][COLOR="#0000BB"]$result[/COLOR][COLOR="#007700"]->[/COLOR][COLOR="#0000BB"]bind_param[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#DD0000"]"ss"[/COLOR][COLOR="#007700"],[/COLOR][COLOR="#0000BB"]$url[/COLOR][COLOR="#007700"],[/COLOR][COLOR="#0000BB"]$title[/COLOR][COLOR="#007700"]); [/COLOR][COLOR="#0000BB"]$result[/COLOR][COLOR="#007700"]->[/COLOR][COLOR="#0000BB"]execute[/COLOR][COLOR="#007700"](); echo .[/COLOR][COLOR="#0000BB"]$title[/COLOR][COLOR="#007700"]; } [/COLOR][COLOR="#0000BB"]?> [/COLOR]
fuck ur mom
Shorten your links
[/COLOR]
что в нем изменить, чтобы работал?
|
|
|