18 / 18
Jun 2008

I have been looking at how to integrate the thank you page into my site with the download link here is also.



After looking at the available options, I decided on the particalarly unglamourus, iframe hack.



Can anyone tell me why the default page of the e-junkie 'thank you page' has a tables and hard coded html (not only CSS) layout?



Trying to integrate this into an existing site with the e-junkie hardcoded td of 90px height makes things very difficult



Where is your support for web standards and css? How hard is it to use divs and css layout to allow custom css on the page to control the layout and general look and feel?

>>Generally, the degree of customization you describe would be done by overriding our default thank-you page entirely, instead using a redirect to your own thank-you page URL:



No, I am using my own custom thank-you page on my site.



The problem arises when I want to integrate the download link into my site via iframe. The iframed page that comes from ejunkie uses hard coded html and tables that forces the iframe integration to look wrong (90px header width 750px etc etc)



Isn't there a better way to allow the e-junkie link from a users site, can't we pass some variables to make the direct link available from ausers site without iframe hacks and php fopen hacks?

I agree with Kiwi_Dude - it would be such a simple thing to update the thank you page to modern standards.



Kiwi_Dude, your other option right now is to screen scrape the thank you page server side and display the links on your page however you like. A little bit more complicated than an iframe, but not very hard.

Hi Cemdev,



>>...your other option right now is to screen scrape the thank you page server side and display the links on your page however you like



Do have any sample php code that do this?

Speaking of screen scraping, is there a way to take input from a use from your site, and put that input into a different site now owned by you, get the results and display them on your own site?

I messed up my english on that previous post.



Just to make sure I was clear, I need to...



1. Take single input number from a user on my site.



2. Take the input, put it into a textbox on another site I do not own, where you must press enter to have that site do a lookup and provide results.



Note that there is no logging in on the other site. Just a simple text box for entry and a button to press to have it do a lookup.



3. Get the result and display the resulting text from the other site onto my site.



All while the user has no idea it was grabbed from elsewhere?



How much might you want to do this once for me so I can see how its done? It seems very complicated without doing it once since there are so many variables.

@lemonbar:



Regarding #1/#2, is it GET or POST method?


3 What format is the result? Plain text/CSV/XML/HTML?



PCRE would be good for scraping, and if you can kick me some content that's right around what you want to parse (e.g. "The temperature is presently: 73 F" where 73 is what you want to parse), then I'll see if I can jot something up real quick once I'm off of work.



-thad

@lemonbar,



k thnx. No promises on when I'll be able to get to it as we're knee-deep in E-junkie improvements etc. BUT, I will get to it! :)



Also, by chance are you making use of Asterisk anywhere? If so, check out this macro script that VoicePulse has done: http://connect.voicepulse.com/FlexRate.aspx This definitely gives some inspiration for some cool stuff that you could do, though I tend to lean towards PHP/MySQL for just about anything and everything. :-)



Last but not least, do you have access to CRON? You don't want to pull for every user making a request (for starters, it's rude), and instead want to cache. I personally like dumping everything on CRON though you can also have it update the cache upon user demand; though I tend to get really paranoid when multiple people are hitting the same script and thus there's that 0.001% chance that you'll have a collision when writing to a cache file (then again, MySQL is super nice for things like this as well.)



-thad

hi thad,



thanks for giving it a try. would appreciate it!



please dont post my specific details on this site just in case. you can write me at the other email i sent you.



the rates change and i would need to scrape it each time to be accurate. it wont be a rude scrape.



thanks

@lemonbar:



NP, I'll try and work more on it this weekend and will release the code to you, and then a cleaned up copy of the code for everyone else here on the forum that does NOT divulge any of your insider secrets, etc. That way people can see the basics of how I did it, and none of your personal details are exposed.



I would define rude scrapes if it's the same request or similar in a short amount of time. For example, I run my own phone line at my house on Asterisk and my Linux box, and when I call back to friends in Austin, TX it's [always?] the same rate for anywhere in Austin that I call. Thus if I were to query the ratecenter that I use (sooner or later I'll be adding VoicePulse onto my line-up, and breaking out their Macro script as well), I would take the easy way out and only query area code 512. If it turns out that another area that uses 512 (Bastrop for example?) is not equal to Austin, then I could target the area code and the prefix of the # if I had to.



In summary, caching is our friend; and (in theory) doesn't trouble the administrators that are sifting through log files and noticing that 1 IP is making a lot of similar requests in a short amount of time. :)



-thad

thad,



i hope the code you provide as an example for others doesnt connect to the site that i am trying to scrape. it probably doesnt but want to make sure. that would definetly be rude scraping lol.



thanks again

cemdevI agree with Kiwi_Dude - it would be such a simple thing to update the thank you page to modern standards. Kiwi_Dude, your other option right now is to screen scrape the thank you page server side and display the links on your page however you like. A little bit more complicated than an iframe, but not very hard.





Update: now when you call the thank you page in an iframe using the noredirect parameter, the header and footer are not shown.

Update: now when you call the thank you page in an iframe using the noredirect parameter, the header and footer are not shown.





This is great news Thanks.



Now how about a way to pass the download link back to the users site?

Kiwi_Dude
Now how about a way to pass the download link back to the users site?



Getting just the download-link URL out of our thank-you page -- to apply in a custom link presentation on your own thank-you page -- would require you to develop some PHP/Perl/etc. scripting. I.e., you'd need to grab our thank-you page to extract the URL from it and then rewrite that URL into the custom link on your own page.



The latest update mentioned by E-junkieChef above means that you can apply a somewhat simpler method (albeit with more limited customization potential for how the link is presented), where your custom scripting only needs to receive the txn_id value we pass to your page and then write that value into an IFRAME src URL as described on our redirection help page:

1http://www.e-junkie.com/ej/help.redirection.php1