Jump to content
Chinese-Forums
  • Sign Up

reading The Economist in mobile phones in China


Recommended Posts

Posted

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

Posted

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().

Posted

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.

Posted

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!

Posted

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.

Posted

opening files and handling online documents technically means the same thing. :mrgreen:

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.

Posted

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.

Posted

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.

Posted

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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Click here to reply. Select text to quote.

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...