Jump to content

benyates1

New Members
  • Posts

    9
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://www.pervlens.com/

Profile Information

  • Gender
    Male
  • Location
    Manchester

benyates1's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for the response, its the building of the string I guess taht i'm having trouble with. I should have been clearer - I'm familiar with PHP variables and passing them in URLs. It's the taking of form fields and making them usable as parameters in an URL.
  2. I have a multi-step form that offers different options of membership to users with the e-mail domain 'vip.co.uk' I finally have it working but have hit a wall with pulling the variables together to form an URL that can be submitted to the payment gateway in the final step. The variables I need to pass are username, password, email, subscription id (a value attached to a radio button in step 2 - not yet built it). I have a JS fiddle at http://jsfiddle.net/zsasvoo4/15/. The final form will be in PHP and I'd prefer to use that language.
  3. Hi, I'm creating a badge generator. The purpose of the generator is to display, share, send and save custom badges. I have a selection of images to be used as the base or template image, each have two areas for differently formatted text, typically 1) being the title/award and 2) being a brief two-line summary of the achievement. The user would select an image template and enter text into text fields and then select a text colour. Once save button is clicked an image is generated with the text as part of the graphic. The user should be able to save the graphic to their hard drive, embed the graphic to their own web site, share it via social media sites. The created images should also be attributed to the user so that the site can keep a list of all users badges and accolades that they have created, attributed to themselves or other users. I'm really stuck and so far have made a pitiful attempt at realising this script. Below is what I have so far but have no idea how to tie in the features I have listed above. <?php header ("Content-type: image/png"); $string = "your text"; // try changing this as well $font = 4; $width = imagefontwidth($font) * strlen($string) ; $height = imagefontheight($font) ; $im = imagecreatefrompng("new.png"); $x = imagesx($im) - $width ; $y = imagesy($im) - $height; $backgroundColor = imagecolorallocate ($im, 255, 255, 255); $textColor = imagecolorallocate ($im, 0, 0,0); imagestring ($im, $font, $x, $y, $string, $textColor); imagepng($im); ?> Any help would be greatly appreciated. Kind Regards, Ben
  4. Hi, I'm looking to be able to link thumbs to their larger versions and display the thumbs by date order with the most recent displaying first. The code I have works well but I cannot get the link to work because the larger versions reside outside of the thumbs directory. <?php $dir = "thumbs/"; foreach (glob($dir . '/*') as $filename) { echo "<a href='images/" . $filename . "'><img src='" . $filename . "'></a> "; } ?> I've tried listing the root directory of the image host application as the $dir but then all other graphics are included from the sub-folders of the root directory. The only folders I want to display images from are thumbs (small images displayed on this page) and images (larger versions to be displayed once clicked). Any help would be greatly appreciated. Thanks. Ben
  5. Thanks, I'm aware that cookies can be bypassed with relative ease however I'm not relying on the cookie method to protect content but more as a way to persuade subscription by being more of an irritant than anything else.
  6. Hi, I have a web site that sells both video and images. The full versions are located securely behind a paywall, however in a bid to get visitors to purchase them and to promote the members offering I have trailer videos of 30 seconds to one minute and four free images per imageset. I want to be able to restrict the number of images a visitor can view for free to 12 and the number of videos a visitor can play to 5. With a little graphic/overlay notifying the user when they have exceeded their free play/preview limit. I have been advised that a tracking cookie and php if statement would be the way to go to achieve this. I have got a cookie that is successfully logging views that is written to on a free preview link as an onclick function. I have tried writing some php if code that will have the normal thumbnail or video divs display as usual if the views recorded in the cookie are below 12 or five, respectively, and have a not allowed, please subscribe div that would show over the thumbnails or video divs should the number of views exceed the threshold. My PHP code does not seem to be working at all, I have ran it through an online syntax checker - corrected the mistakes and now it's supposed to be working but opts to display nothing instead of either if argument. Videos then become a whole other problem because at the moment I have no other way to track the view/visit other than to count the loading of the video summary page with the free player as the preview, whether or not the clip is played - ideally I would like the view to be counted when the video begins to play. But I have no idea how to write to the cookie from Flash (is that even possible?) Any help would be greatly appreciated.
  7. Yes, I think that is what I need to do. Is it the same process as customising the 404?
  8. Thanks, I'm relying on the default browser login prompt/dialogue, so when there is a link to a file in a protected directory it would redirect the user to a join/alternate page. The same would happen if the user entered the wrong credentials or cancelled the dialogue. I don't have a database of users, that is handled by a payment processor so the easiest way I figure is to intercept unauthorised/forbidden error pages and have it redirect to an alternative page. Thanks
  9. Hi Folks, Glad to be joining the community. I'm having some trouble trying to get the correct code in place to automatically forward/redirect a user who has cancelled the browser login dialogue box and therefore not managed to successfully access restricted content to a specific page rather than the ugly error page that is default in browsers. Much like i've managed to achieve with my custom 404 error page. I'm pretty sure it can be done but i'm not having too much succes. Any help would be greatly appreciated Many thanks, Ben
×
×
  • 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.