Jump to content

ojsimon

Members
  • Posts

    109
  • Joined

  • Last visited

    Never

Everything posted by ojsimon

  1. Hi Bassically what i want to do is check the user agent and if it is a mac redirect to /mac if it is a pc redirect to /pc if it is another or unknown to /unknown does anyone know how to do this? Thanks
  2. Hi I am wanting to divert mac users to a different page to pc users, how do i do this? Thanks
  3. well, no i can't simplify because i dont have the user given variables
  4. ok so thought this was solved but just realised this solution won't work, as i am forming the equation from two simultaneous equations: u=S*(1+((x/P)-1)*-E) m=(u*(x-C))-F S, P, E, C and F are provided by the user hence i can use the following equation m=S*(1+((x/P)-1)*-E)(x-C)-F I want to find the maximum value for M given all the variables in the equation above are given apart from x this with those values should simplify to a quadratic which you could find a derivative for and optimize. Does anyone know how to do this with php?
  5. Ah yeah so the first solution is the one i will use anyway. Thanks all for your imput though, still useful for future refernece.
  6. cheers thanks a lot for that very useful
  7. ha, thanks didn't think of that, so obvious now
  8. i have no idea how to port that, i am a bit off a newbie to php. But also my function does not involve anything complex sin etc, it is just a quadratic equation with two variables, anything that i could use for that?
  9. using calculus, to differentiate the function then setting it to zero and solving. finding the maximum on the curve esentially. it is also known as optimization.
  10. Hi In my script i am trying to maximise a function, is it possible to do this with php? can you differentiate a function using php is what i am essentially asking? Thanks
  11. Hi I am having a problem fixing a bug with my site, which affects both IE and Opera, but does not affect Safari, Firefox or any other browser that i know of. the affected part goes like this. 1) The page widgetprep.html - This page creates the structure of the widget and shows the frame of google <bgcolor="black"> <div class="container2"> <b class="rtop"><b class="r1"></b> <b class="r2"></b> <b class="r3"></b> <b class="r4"></b></b> <p> <table bgcolor="black" > <tr> <tr> <th><font face="Verdana, Arial" size="4" color="black">Test</font></th> </tr> <tr> <td bgcolor="white"> <iframe src="http://google.com" name="frame1" width="500px" height="200px" id="frame1" scrolling="auto" frameborder="0"></iframe> </td> <tr > <th><font face="Verdana, Arial" size="" color="white"><a href="http://websnips.com/index.php/grab/check/" target="_blank">Get this widget</a></font> <font face="Verdana, Arial" size="4" color="white"> |<a href="http://www.websnips.com" target="_blank">Make a Widget Out of Any Site</a></font></th> </tr> </table> </p> <b class="rbottom"><b class="r4"></b> <b class="r3"></b> <b class="r2"></b> <b class="r1"></b></b> </div> 2) widget.html - This page is an iframe of the previous page in js document.write('<iframe allowtransparency="true" ' + 'scrolling="no" frameborder="0" hspace="0" vspace="0" ' + 'src="widgetprep.html"</iframe>'); 3) embed.html - This page embeds the widget using a JS SRC <body bgcolor="red"> <script src="http://localhost:8888/websnips7/widget.php?width=250&height=300&title=Widget&id=aHR0cDovL3d3dy5iYmMuY28udWsvbG9uZG9uL25ld3Mv/156&color=black&bg=567d8c" type="text/javascript"></script> Hello Basically the problem is when i look at the embed.html page in opera or ie i cannot see anything after the embedded widget for example the text saying 'hello' i added. Anyone got any ideas?? Thanks Olie
  12. Ok i have now made it w3c compliant http://thepricedetective.com/layout/ but notice how it hasn't fixed the problem, the submission box only looks normal in opera, in firefox and safari it looks like images separated. how do i fix this?
  13. Hi my html and css that i have coded is only valid in opera and does not run as it is meant to in firefox and safari. Can anyone help me fix it. The text input box is what is broken. here is the html: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <meta name="author" content="Husain Abdullah Al - Zabir" /> <title>WebSnips</title> <link rel="stylesheet" type="text/css" href="styles/main.css" media="all" /> <link rel="stylesheet" type="text/css" href="styles/rounded_corner.css" media="all" /> <link rel="stylesheet" type="text/css" href="styles/bottom_menu.css" media="all" /> </head> <body> <center> <div class="box"> <b class="tc"> <b class="L1"></b> <b class="L2"></b> <b class="L3"></b> </b> <div class="content"> <div class="box" style="width:100%;"> <b class="tc"> <b class="L1"></b> <b class="L2" style="background-color:#333333;"></b> <b class="L3" style="background-color:#333333;"></b> </b> <div class="content" style="background-color:#333333;"> <div style="width:630px; padding-top:10px;"> <div style="float:left; background-image:url(images/http.jpg); background-position:center; background-repeat:no-repeat; width:95px; height:40px;"> </div> <div style="float:left;"> <input style="height:28px; border:none; font-family:verdana; font-size:21px; color:#7d7d7d; padding-top:6px; padding-bottom:6px;" type="text" size="35" /> </div> <div style="float:left;"> <input type="image" value="submit" src="images/submit-button.jpg" /> </div> </div> <div style="clear:both; height:30px;"> </div> </div> <b class="bc"> <b class="L3"></b> <b class="L2"></b> <b class="L1"></b> </b> </div> </center> </body> </html> here is the css: #logo { width: 317px; height: 40px; /*background-image: url(../images/logo.gif);*/ background-image: url(../images/logo.jpg); background-position: center; background-repeat: no-repeat; } #logo-holder { padding: 20px; } #footer-logo { width: 609px; height: 40px; /*background-image: url(../images/footer-logo.gif);*/ background-image: url(../images/footer-logo.jpg); background-position: center; background-repeat: no-repeat; } #footer-logo-holder { padding: 5px; } #instruction { border-left:solid 4px #98CB00; padding-left:5px; font-family:verdana; font-size:17px; font-weight: normal; color:white; text-align:left; width:623px; } #instruction-holder { padding-top: 20px; padding-bottom: 20px; } .separator { width:10px; background-image: url(../images/separator.jpg); background-position: bottom; background-repeat: no-repeat; float: left; height:180px; } .urls { font-family: verdana; font-size: 12px; color: #7d7d7d; height:180px; font-weight: bold; line-height: 20px; width:203px; clear:both; padding-top: 20px; } .snips_name { font-family: verdana; font-size: 21px; color: #FFFFFF; text-align: left; } #top_snips { width:31px; height:38px; background-image: url(../images/top_snips.jpg); background-position: top; background-repeat: no-repeat; margin-right: 5px; float: left; } #latest_snips { width:38px; height:38px; background-image: url(../images/latest_snips.jpg); background-position: center; background-repeat: no-repeat; margin-right: 5px; float: left; } #partners { width:53px; height:38px; background-image: url(../images/partners.jpg); background-position: top; background-repeat: no-repeat; margin-right: 5px; float: left; } Can anyone help fix this? Thanks
  14. Hi I just finished redoing my site http://websnips.com there are still some problems but it now mostly works. It is an ideal tool for bloggers allowing them to embed content into their posts, likewise it could be useful for social networkers and general web users. What do you think? would you use it? Any bugs? Thanks
  15. Hi I am trying to set a users imput to a variable that can be used to add to the link to another page. I know about Post and Get but these do not fit my problem. I am trying to get a form response to show up in this lightbox http://particletree.com/features/lightbox-gone-wild/ Can anyone help me set user imput to a variable? Thanks
  16. What i was thinking is maybe when they buy the script they enter the domain they are going to use and it generates a serial relating to the domain, they insert this into the script config file. This is then turned into the domain and run into that script you said above. Would this work better? I understand about the encoding problem but unfortunately nothing is uncrackable, but some protection is better than none. Thanks
  17. no but if i encoded this so that it was invisible.
  18. Hi I am trying to protect my php script from piracy. I do not want to use a commercial protection script, instead i was wondering if there was a bit of php code i could use to make my code only run on a certain domain specified? I could then encode this script so that they can't change this. Any ideas? thanks
  19. still the .xml file is not running the php. It just returns the php code without it being processed in the server. any other advice? thanks
  20. How do i write an htaccess file to do that?
  21. Yeh but this will not run in a .xml file and the xml will not run iN A php
  22. Hi I am trying to create an xml file like this <?xml version="1.0" encoding="UTF-8" ?> <Module> <ModulePrefs title="hello world example" /> <Content type="html"> <![CDATA[ Hello, world! ]]> </Content> </Module> Insteas of the <![CDATA[ Hello, world! ]]> I would like to insert dynamic code. AS i am trying to allow my users to embed dynamic widgets to igoogle. How can i replace this hello world code with dynamically placed code. Any suggestions
  23. Hi I am trying to run an external javascript that is on one of my other systems When i view the source of the page the code i see is <SCRIPT language="JavaScript"> document.write('<iframe width="400" height="200" allowtransparency="true" scrolling="no" frameborder="0" hspace="0" vspace="0" src="/websnips copy/index.php/widget/show/aHR0cDovL3d3dy5iYmMuY28udWsvbG9uZG9uL25ld3Mv/156"></iframe>'); </SCRIPT> I am trying to create a document like this <script type="text/javascript" src="http://localhost:8888/websnips%20copy/index.php/widget/widget/aHR0cDovL3d3dy5iYmMuY28udWsvbG9uZG9uL25ld3Mv/156"></script> Which should embed the script above it, but it doesn't. Can anyone help me fix this problem? Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.