Rogers Email-to-Text Changes...
   Register

[x]

Rogers Email-to-Text Changes...


Icarus3000 is offline Icarus3000
Newbie
Posts: 6 Icarus3000 is on a distinguished road
March 9th, 2005, 03:18 PM

hmm... more problems..

I can't get the original code to execute at all. Some problem with imap_open.

I get the error message:

Fatal error: Call to undefined function: imap_open() in /home/vhosts/mywebpage.com/config.php on line 25

the imap_open line (line 25) in my code is:

$mbox = imap_open ("{pop6.sympatico.ca:110/pop3}INBOX", "myname@sympatico.ca", "mypassword");
Reply With Quote
Simon is offline Simon
Newbie
Posts: 4 Simon is on a distinguished road
March 9th, 2005, 03:52 PM

I also get the same errors that Icarus3000 is getting :

Warning: imap_open(): Couldn't open stream {localhost:110/pop3}INBOX
in /sms/config.php on line 25
Warning: imap_check(): supplied argument is not a valid imap resource
in /sms/auto.php on line 28
Warning: imap_fetch_overview(): supplied argument is not a valid imap
resource in /sms/auto.php on line 29
Warning: imap_close(): supplied argument is not a valid imap resource
in /sms/auto.php on line 109
Reply With Quote
aryko is offline aryko
Newbie
Posts: 9 aryko is on a distinguished road
March 9th, 2005, 04:38 PM

Alrighty, one at a time.

Simon: Your error is simpler than Icarus', in that your code is working, it's just not configured correctly. Everything hangs on imap_open, so if it doesn't work, nothing else will (hence the other errors). Try:
Code:
$mbox = imap_open("{mypopserver.com/pop3:110/notls}INBOX", "email@yourdomain.com", "password");
Where "mypopserver.com" is the address of your pop server; you might also get away with "localhost".

Your pop server may require different config codes, check the comment section of the original config.php for details.

Icarus: you might try the same code as above, but if it's giving you an error saying that imap_open is an undefined function, you may have a problem. Are you sure your web server supports PHP? I think PHP version 3 introduced imap functions, and now generally web servers come with version 4 or even 5 as standard...
If you're not familiar with PHP coding, you can easily mess things up. My suggestion would be to start over and try again.
- aryko
Reply With Quote
Icarus3000 is offline Icarus3000
Newbie
Posts: 6 Icarus3000 is on a distinguished road
March 10th, 2005, 06:23 AM

Well, I managed to put something together...
I can now send instant SMS messages without going through Rogers site by using this (hobbled together) code (which is no longer PHP I suppose...):


Quote:
File: SMS.html

<body onload="javascript:document.SendSMSForm">
<h2>Send Message to Cell Phone</h2>
<form method="post" name="SendSMSForm"
action="http://216.129.53.44:8080/cgi-bin/send_sm_rogers.new">
Rogers 10-digit PCS Number:
<input type="text" name="msisdn" value="XXXXXXXXXX" size="10" maxlength="10">



Message (max 160 chars):


<textarea rows="4" cols="40" name="text" maxlength="160" wrap=virtual>
</textarea>







<input type="submit" value="Send Message">
</body>
Still need to work on the imap e-mail thing though...
Reply With Quote
aryko is offline aryko
Newbie
Posts: 9 aryko is on a distinguished road
March 10th, 2005, 10:21 AM

Icarus,
Your code looks good - of course, you're really just replacing the Rogers front end with your own. Two things:
- add a </form> tag after the submit entry
- not sure why you have the onLoad code in the <body> tag, but if it works for you, then cool.

- aryko
Reply With Quote
Icarus3000 is offline Icarus3000
Newbie
Posts: 6 Icarus3000 is on a distinguished road
March 10th, 2005, 10:45 AM

I'm just learning here... after some reading, I see how I could clean up the above code - the onload doesn't really do anything.

One question i have though - is there a way (using just HTML (or maybe javascript)) so that when you submit the form, you are re-directed to another webpage instead of Rogers page, ie: when you click "send message" now, you end up at a dead-end Rogers page. I would like to send the user back to my home page instead, or a page that says "Message sent" or something like that.

Thanks!
Icarus
Reply With Quote
aryko is offline aryko
Newbie
Posts: 9 aryko is on a distinguished road
March 10th, 2005, 11:37 AM

Icarus,
Unfortunately I don't have the time to write the html for it, but you could use an IFRAME or just a set of frames to nest the Rogers code into; if you make the frame small enough, it'd be on the page, but the user wouldn't see it.
- aryko
Reply With Quote
Simon is offline Simon
Newbie
Posts: 4 Simon is on a distinguished road
March 10th, 2005, 09:50 PM

aryko: That didn't fix anything for me.
Code:
Warning: imap_open(): Couldn't open stream {localhost/pop3:110/notls}INBOX in /sms/config.php on line 26.
and I've tried using the site, as opposed to the localhost (even though it's running on the server) but to no avail. I've tried pretty much every combination for it too, but nothing seems to work.

Icarus: I've got a perl script to do pretty much what you want - but beware friend, it is the dirtiest code ever to be created in 10 minutes. http://www.0x90.org/~semen/sms2.pl
Reply With Quote
Simon is offline Simon
Newbie
Posts: 4 Simon is on a distinguished road
March 10th, 2005, 10:51 PM

Well, I figured out the combination. It worked as :
Code:
{mail.domain.org/pop3/notls:110}
.
But now it throws back
Code:
Fatal error: Call to undefined function: curl_init() in /sms/auto.php on line 9
.
and a quick phpinfo shows that as always, the universe is against me. PHP 4.3.10 compiled without cURL. Any simple way around this ? I'm looking into using Snoopy for it, but I have never used PHP before. Any suggestions ?

Edit: Word up. Recompiled it, added curlwrappers and libs and it's working perfectly. This is an awesome script you guys. Thank you very much for making it.
Reply With Quote
aryko is offline aryko
Newbie
Posts: 9 aryko is on a distinguished road
March 11th, 2005, 10:21 AM

Simon,
Glad you worked it out. I'm fixing a few errors in the auto.php script - the 'get' function isn't working properly. Expect a new post on the MSN group shortly.
- aryko
Reply With Quote
Icarus3000 is offline Icarus3000
Newbie
Posts: 6 Icarus3000 is on a distinguished road
March 11th, 2005, 02:45 PM

Simon:

Cool! Unfortunately, I know even less about Perl than I do about HTML and I don't have a clue as to what I am supposed to do with your script...

- Icarus
Reply With Quote
Simon is offline Simon
Newbie
Posts: 4 Simon is on a distinguished road
March 22nd, 2005, 12:10 AM

Ok. So did the script stop working for anybody else for no apparent reason ?

I think it may be my server, but it was working fine for a few days, until I went to check my screen(1) session and lynx was spitting back:

Alert!: Unexpected network read error; connection aborted.
Can't Access `http://localhost/auto.php'.

It was working fine. Now it's not. Boo. Any clues before I go ravaging the server?
Reply With Quote
aryko is offline aryko
Newbie
Posts: 9 aryko is on a distinguished road
March 22nd, 2005, 01:08 PM

Still working for me, Simon.
I can't for the life of me figure out how to remove line feeds from messages, and that's what's screwing up the 'get' command for me.
a.
Reply With Quote
aryko is offline aryko
Newbie
Posts: 9 aryko is on a distinguished road
March 24th, 2005, 11:07 AM

Fixed the 'get' command... yay. New version on msn group.
Reply With Quote
evilmonkey is offline evilmonkey
Newbie
Posts: 2 evilmonkey is on a distinguished road
Location: Toronto, Canada
April 14th, 2005, 06:50 PM

Rogers now requires you to enter a "verification code" displayed in a picture in order to sens sms messgaes. Does this code go around that?

Cheers!
Reply With Quote
evilmonkey is offline evilmonkey
Newbie
Posts: 2 evilmonkey is on a distinguished road
Location: Toronto, Canada
April 17th, 2005, 10:37 AM

I see that it does. I set it up on my webserver. Great idea, I would've never thought of that, and I'm a PHP programmer. =)
Reply With Quote
rex_and123 is offline rex_and123
Newbie
Posts: 1 rex_and123 is on a distinguished road
Location: Toronto
May 11th, 2005, 02:40 PM

I had the same problem, I used to subscribe to many alerts from Yahoo and other services, but since Rogers made this change to 'prevent spam', alerts are a pain to get. I would get alot of alerts every day, initially I wanted to bail on Rogers and switch to someone else, but then thought that everyone will go this way.

Recently found this site, it seems to do the job, they send SMS messages to the phones and works well - www.textspin.com. I've been using it for a little while and no complaints.

it'll be interesting to see if Rogers makes the same restrctions with Fido now that they've bought them out.

perhaps we should complain against Rogers to the CRTC!!??
Reply With Quote
ragingtory is offline ragingtory
Newbie
Posts: 1 ragingtory is on a distinguished road
May 11th, 2005, 04:15 PM

I get this message when I go to run the auto.php through the server. It looks like there's something wrong with the code - but it could be a server side issue. I'm using v 4 from the msn group.

/home/<username>/public_html/sms/auto.php: line 1: ?php: No such file or directory

/home/<username>/public_html/sms/auto.php: line 3: syntax error near unexpected token `"config.php"'
/home/<username>/public_html/sms/auto.php: line 3: `include("config.php");'

EDIT: fixed --> was chmoding everything to 777 - changed it and now runs but gets the "couldn't open stream" argument
Reply With Quote
Reply
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
About Canadian Content | Contact Us | Archive | Technology | Free Downloads | Top
(C) Copyright Canadian Content Interactive Media. Usage is subject to our Terms of Service at http://www.canadiancontent.net/corp/TOS.html