Is there any Css for mobile Only where pc user cannot view sit

Started on the old forum in August 2011 · view the original in the archive · old links redirect here

30 replies · 1,820 views · started 15 years ago · 1 min read

TL;DR · summary of 30 replies
  • -subzero provided a code that blocks PC users from viewing a mobile site.
  • -Metulj insisted blocking PC users was nearly impossible and advised creating a separate PC version for the site instead.
  • -ReazulIqbal suggested using user agent switcher plugins to view mobile sites on PCs, implying this could be an alternative solution.
  • -The thread did not reach a conclusive fix or code approach.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

9 participants
atef Developer · 224 posts #2

Download this script then and upload it at ur site http://www.detectmobilebrowsers.mobi/?dl and add this code at all ur pages

require_once('mobile_device_detect.php'); 
mobile_device_detect
(true,true,true,true,true,true,true,false,'http://Error page link');

change error page link to where should pc users redirect, pc theme, error page whatever u want

metulj Super moderator Principal · 1,726 posts #3

kolkatawap wrote: Plz upload at zip i want it

i've told you once, you cannot block PC user/browser ! how many times you need to be told ?? beside... like you said your self

kolkatawap wrote: Search google best place ever

!

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

kolkatawap Junior · 18 posts #4

It is coding talk anyone can ask for help ok metuji dont mind i am just enhancing my knowledge

metulj Super moderator Principal · 1,726 posts #5

kolkatawap wrote: It is coding talk anyone can ask for help ok metuji dont mind i am just enhancing my knowledge

then why you are suggesting to others to search google ??

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

kolkatawap Junior · 18 posts #6

Gaining knowledge is good metuji plz i hope you are right human being to help me i want my site to view only 4m mobile and if pc user cums msg raise to cum 4m mobile can u do dis 4 me plz i shall gv u my hosting cpenal pas just do it 4 me my email=rishigupta651@gmail.com

metulj Super moderator Principal · 1,726 posts #7

kolkatawap wrote: Gaining knowledge is good metuji plz i hope you are right human being to help me i want my site to view only 4m mobile and if pc user cums msg raise to cum 4m mobile can u do dis 4 me plz i shall gv u my hosting cpenal pas just do it 4 me my email=rishigupta651@gmail.com

i dont need your cpanel, and once again, you cant block pc users to view your aka mobile site ! it is that simple

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

CreativityKills Lead · 833 posts #8

I will say what metulj is trying to say in straight english: its stupid, dumb, damned near impossible...not to mention, a waste of time (that could be better spent staring at the sky waiting for a comet to pass by) trying to stop PC users from viewing ur mobile site. The best thing you can do is create a PC version for ur site. Personally you should let the sleeping dog lie. If u really crave knwledge, expand ur knwledge on PHP this underated site can help 🙂 if after all i typed u still want to do this "wild goose chase" thing ur beyond help.

ReazulIqbal Developer · 103 posts #9

Yeah, you can not block pc browses. There are some plugins that can switch user agents for pc browsers. By using that anyone can browse your mobile site with out any problems.

kolkatawap Junior · 18 posts #10

Haha it means all you are master stupid Try to open www.wapday.com 4m your pc and say what was it?is that site owner stupid or in reality u are his foot step in php coding

Thanks bro subzero you are realy a master brain but some are now a day doing small paste and saying themselves master example here infront of u

Added after 2 minutes:

www.wapday.com is a site that cannot be viewed 4m pc it accese Only Mobile Metuji and creative u gven long lecture saying me stupid now do justify

subzero Super moderator Fellow · 3,954 posts #11

You can block pc browsers

i coded this long but ago

CHAT SERVICE!

You can only view it thou mobile phone and im using opera 🙂

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

subzero Super moderator Fellow · 3,954 posts #12

Here the code you can play around with

if($mobile_only == "1") { $u_agent = $_SERVER['HTTP_USER_AGENT']; function get_user_browser($u_agent) { $ub = '';if(preg_match('/MSIE/i',$u_agent)){$ub = "ie";}elseif(preg_match('/Firefox/i',$u_agent)) {$ub = "firefox";}elseif(preg_match('/Safari/i',$u_agent)){$ub = "safari";} elseif(preg_match('/Chrome/i',$u_agent)) {$ub = "chrome";} elseif(preg_match('/Flock/i',$u_agent)) {$ub = "flock";}{$ub = "opera";}return $ub; } $notallowd = array("ie","opera","firefox", "chrome","flock","safari"); $browser = get_user_browser("$u_agent"); foreach($notallowd as $blocked) { $blacked=str_replace('*', '', $blocked); $len=strlen($blacked); if ($browser==$blacked || substr($browser, 0, $len)==$blacked) { $_banned_i=true; }} if($_banned_i==true){
echo "<img src="img/site/logo.png" alt="Logo"/> "; echo "<a href="$ads_link">$ads_code</a> "; echo ""; echo "You can access this page only with your mobile phone!"; echo ""; echo "<a href="$ads_link">$ads_code</a> "; echo "Design by <a href="http://wapdiz.ru">inferno</a>"; exit(0);
} }else{ }

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

metulj Super moderator Principal · 1,726 posts #13

subzero wrote: You can block pc browsers

i coded this long but ago

CHAT SERVICE! You can only view it thou mobile phone and im using opera :)

Sorry HTTP request was interrupted by the host!

i get this from mobile even 😛

Added after 6 minutes:

kolkatawap wrote: Haha it means all you are master stupid Try to open www.wapday.com 4m your pc and say what was it?is that site owner stupid or in reality u are his foot step in php coding

Thanks bro subzero you are realy a master brain but some are now a day doing small paste and saying themselves master example here infront of u

Added after 2 minutes:

www.wapday.com is a site that cannot be viewed 4m pc it accese Only Mobile Metuji and creative u gven long lecture saying me stupid now do justify

dont ever again call anyone here stupid, else i will ban you for sure ! now... look at the attached screen, and explain to me which mobile phone has such screen resolution ??? better STFU

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

Attachments: screen.png
joban111 Junior · 24 posts #14

Metulj u might be using some kind of scripting to get into that link or something out of our brains or this world but the guy who posted this thread just asked for normal innocent help. we all know normal visitors are not so smart that they can view that site from pc as u can. he just asked for some coding for that. now see subzero as a real moderator provided him some sort of coding and tried to help him as he can instead of just insulting users. i suggest u if u cant help someone than please bro better dont reply to that post. u r super mod of this site so this does not mean that u can be rude to anyone. i saw u many times just doing bully on users instead of try to help them. totally unfair behaviour by a moderator. DONT BAN ME FOR THIS POST. 🙂

metulj Super moderator Principal · 1,726 posts #15

joban111 wrote: Metulj u might be using some kind of scripting to get into that link or something out of our brains or this world but the guy who posted this thread just asked for normal innocent help. we all know normal visitors are not so smart that they can view that site from pc as u can. he just asked for some coding for that. now see subzero as a real moderator provided him some sort of coding and tried to help him as he can instead of just insulting users. i suggest u if u cant help someone than please bro better dont reply to that post. u r super mod of this site so this does not mean that u can be rude to anyone. i saw u many times just doing bully on users instead of try to help them. totally unfair behaviour by a moderator. DONT BAN ME FOR THIS POST. :)

poster has been told many times that blocking PC is nearly impossible, yet, he is persistant to get code... and btw he must be superlazy as redirection code been posted here many many times ! but i haven't insult him, not even once ! on the other hand, he insulted here in general(FIRST LINE)! so feel free to NOT post bollox !!!

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

Anthony Developer · 82 posts #16

lol How easy it was to visit that site using my PC see the attach image

FREE International SMS

GYSMS.com Provides FREE International sms Reach over 775 networks in more than 221 countries at no cost to you. and the Good News is we own our SMS Hardware so there is no third party SMS API involved our services are completely Ad supported.....

http://gysms.com

Send FREE International MMS and Share Files worldwide using our MMS Service.

http://gysms.net

GTriddim Live Online Radio Station

http://www.gtriddim.com

Attachments: wapday.png
subzero Super moderator Fellow · 3,954 posts #17

metulj wrote: i get this from mobile even 😛

Added after 6 minutes:

dont ever again call anyone here stupid, else i will ban you for sure ! now... look at the attached screen, and explain to me which mobile phone has such screen resolution ??? better STFU

i think i was a sleep by then or errors on script didn't like the browser i still need to fix but yeah the script i posted will block web browsers also can add types so if firefox can change the browser name like to nokia to any name well this script is useless i posted is for web browers that has name to it

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

puge Developer · 54 posts #18

metulj, what is your function as a mod? Just to ban people? In many occasion now, i had come across ban n ban n ban of you. As a mod, E.G: ( If a user keep complaining of same problem, then as a mod, if you dont know the solution, then ignore it or get a life. ) check: waptrick.com, Can u view it with ur Pc? you are still a noob.( YOU ARE FREE 2 BAN ME. Its what you good in. )

metulj Super moderator Principal · 1,726 posts #19

puge wrote: metulj, what is your function as a mod? Just to ban people? In many occasion now, i had come across ban n ban n ban of you. As a mod, E.G: ( If a user keep complaining of same problem, then as a mod, if you dont know the solution, then ignore it or get a life. ) check: waptrick.com, Can u view it with ur Pc? you are still a noob.( YOU ARE FREE 2 BAN ME. Its what you good in. )

ofcourse i'm noob, if i would be pro, i'd have job for $15000/month ! but then again, even as a noob, i can view waptrick.com from PC !

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

Attachments: screen.png
ReazulIqbal Developer · 103 posts #20

Use user agent switcher plugin for Mozilla FireFox, then you can visit any mobile site from PC

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close