zozzen Posted February 17, 2008 at 02:31 PM Report Posted February 17, 2008 at 02:31 PM link expired. Content removed. Quote
msittig Posted February 18, 2008 at 04:58 AM Report Posted February 18, 2008 at 04:58 AM Great script! I'm downloading it and installing it on my server. I use Avantslash to read Slashdot on my phone's WAP browser: http://www.fourteenminutes.com/code/avantslash/ I tried writing a similar script to read the NY Times, but they kept changing their HTML and the Mobile NYTimes site is actually pretty usable: http://m.nytimes.com/ ------------------------------------------- EDIT: Oh no, what does the following mean? Warning: fopen() [function.fopen]: URL file-access is disabled in the server configuration in /home/xxx/econ.php on line 7 Warning: fopen(http://www.economist.com/printedition/) [function.fopen]: failed to open stream: no suitable wrapper could be found in /home/xxx/econ.php on line 7 Quote
zozzen Posted February 18, 2008 at 05:21 AM Author Report Posted February 18, 2008 at 05:21 AM your hosting company switched the fopen() off, possibly they will explain it's about a security reason, but i will keep myself away from any hosting company who switches off these standard functions. Or try fopensock() to replace fopen(). Quote
roddy Posted February 18, 2008 at 05:30 AM Report Posted February 18, 2008 at 05:30 AM You might also try using PHP's curl functions, that's what I've used when doing something similar for a BBC proxy, and also for newsinchinese.com You might also try skweezer, but it's not so efficient at reducing the page size. Quote
zozzen Posted February 18, 2008 at 06:01 AM Author Report Posted February 18, 2008 at 06:01 AM skweezer still doesn't fully support Chinese characters. I remembered that there's another more Chinese-compatible mobilizer (embedded in PIE Plus for Pocket IE ) but after a few search i still can't remember its name. The name is something like "mlvb" or "mbvl" . Any idea? And cURL seems to be very powerful at parsing a website too. But how is it exactly different from various php functions like file(), fopen() and fopensock()? They look very similar to me and i don't know how to distinguish them. Could you give me the link of BBC proxies too? Thx! Quote
roddy Posted February 18, 2008 at 08:59 AM Report Posted February 18, 2008 at 08:59 AM Skweezer has always worked fine for me, but I only use it on a small number of sites. here's what it does to a Caijing article. I use bloglines as an online RSS feed reader, and it automatically sends links on its mobile version through Skweezer. It still doesn't work on the BBC, as it includes the BBC url in its own url, which triggers a block. I don't know what the differences are between fopen and curl - as far as I understand it, fopen, etc, are for opening files and curl is more for handling online documents. From a security standpoint, one is obviously more risky and I'm not surprised fopen is restricted in some cases. No advice on BBC proxies, I made a very simple one myself years back but it's gone now. For English language content you can just use the url newsvote.bbc.co.uk with no problem, for Chinese or other languages I don't think that works. I now have a VPN from witopia.net which means I no longer need to mess around with web proxies. Quote
zozzen Posted February 18, 2008 at 03:35 PM Author Report Posted February 18, 2008 at 03:35 PM opening files and handling online documents technically means the same thing. But i've just figured out one very powerful function of curl. It can emulate a server as a web browser and parse a webpage that requires login and cookies. As far as i remember, Nytime requires user-login to access the website, and curl should be very useful in dealing with it. Frankly, i don't know why i spend so many time on trimming a website for GPRS phone when there's an easier choice like skewzzer, i think they're addictive. Quote
roddy Posted February 19, 2008 at 12:49 AM Report Posted February 19, 2008 at 12:49 AM I'm no expert. As I understood it using the file functions makes it easier to actually execute a script - hence why you shouldn't use them if you don't actually want to do that, and why hosting companies will prevent you opening files held off the server. Php.net may well prove me wrong. Quote
msittig Posted February 19, 2008 at 02:36 AM Report Posted February 19, 2008 at 02:36 AM I'm on Dreamhost, and I pretty much trust their judgement on this stuff. I guess I won't be using this. Skweezer is pretty cool. Quote
ipsi() Posted February 19, 2008 at 03:56 AM Report Posted February 19, 2008 at 03:56 AM For Slashdot, try http://slashdot.org/palm, which is basically Slashdot's WAP page. I'm not sure why they didn't use wap.slashdot.org, but there we are. Quote
msittig Posted February 20, 2008 at 04:25 AM Report Posted February 20, 2008 at 04:25 AM I tried using Slashdot's own WAP version, and still ended up choosing Avantslash. Seriously, check it out. Feel free to use my install as a demo: http://wubi.org/slash/ Quote
zozzen Posted February 20, 2008 at 07:47 AM Author Report Posted February 20, 2008 at 07:47 AM I've just updated the script. Added: cover, past issue. The link is the same as previously posted, and it will be removed at weekend. If you're interested, feel free to download. Quote
Recommended Posts
Join the conversation
You can post now and select your username and password later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.