Solet's talkaboutredirecting a WebpageusingPHP, sothiscouldbe a valuablethingforanynumberofreasons.
Sobasically, theideaisyouhave a domainandyouhave a Webpage, andwhatyouwantiswewantpeopletogotothatWebpage, andthenyouwantthemtogetautomaticallyredirectedsomewhereelse.
Soinsteadofusing a girlshorterlikeBentleyorsomethinglikethat, whatyoucandoisyoucancomeupwithWebpagesonyourownsiteandthenhave a simplePHPscriptthatredirectspeopleto a differentWebpageagainstherlikesomekindofaffiliatelandingpage.
SologhowmanytimesWebpagehasbeenaccessalongthe I p addressesofpeople, theaccessoftheWebpagelog, thingslikeWebbrowsers, allkindsofdifferentinformation.
Um, andsothat's whywe'regonnashowyouhowtodointhescriptisusingtheheadertoredirectpeopleto a differentWebpage.
Sowiththat, let's goover, and I'llshowyouhowthisvery, verysimplescriptactuallyworks.
Sothisis a simplescriptcalledheaderdotPHPandallthisisgoingtodoisisgoingtoredirectpeoplefromtheheaderdotPHPpage, andwe'rejustgoingtosendthemtoourfriends, OurfriendsoveratCNNdotcom s so I'm gonnadois I'm gonnauploadthistosilicondojodotcom.
SogivebacktotheWebbrowser, a newlocationsofthelocationofandthenwhereveryou'resendingthemwwwdotCNNdotcomandthenyoucloseoutthedoublequotationmarkspastthat.
Youclosetheparenthesesandthen, ofcourse, youdothesemicolon, andthat's thesumtotalofwhat's requiredinordertodo a redirectusingPh.
We'regoingtogotoSilicon, doesjoedotcomandthenwe'resimplygoingtoputinheaderdot p a p Soagain, tobeclearhere, we'regoingtosilicondoesohdotcomThisisthisismyThisismywebsiteismydomainname.
Well, wehitenter, youwanttoseerelativelyquickly.
It's simplyfiresoffandwegetredirectedtoCNNdotcom.
Andsothat's howitcouldwork.
So I couldhaveagain I couldhaveElicrittergoddotcomforwardslashnordVPNdotPHP.
IfyouwanttheNordVPN, thenthatwouldautomaticallysendyoutomyNordVPNaffiliatepageOr, youknow, a lotofcomputerguydotcom.
ForwardslashbetterhealthdotPHP.
I coulddoit, I suppose, andthenthatwouldsendyoudirectlytomybetterhelpaffiliatepig.
Andthenicethingaboutthisis I completelyownedthis.
Thisisnotthisisnotsomebodyelse's u r l Shorter.
I havetoworryifit's gettingshutdown.
It's notsomebodyelse's servicewhere I havetoworryagain.
I havetoworryaboutwhatinformationtheregrabbingfrommyusers.
I completelyownedthis, andthisisallliterallywithinPHP.
Soit's notlikeit's gonnagetdeprecateIDin a yearortwolikethiswillbearoundforever.