Jump to content

BrainPill

Members
  • Content count

    25
  • Joined

  • Last visited

Community Reputation

1 Neutral

About BrainPill

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Enable
  1. BrainPill

    textlink/banner outside own server possible with PHP?

    Great answer . I got it working they way you said it. Using the right definitions surely does clarify a lot. But one thing I could not get to work was the way of passing the $_GET query params with the iframe src. But that is a bit of topic maybe. Thanks anyway. Edit: I solved the query string passing with adding a piece of javascript code to the page that was called in the iframe.
  2. BrainPill

    textlink/banner outside own server possible with PHP?

    my idea is that the example you give is not what I want. In the OP I explained I wanted to make a piece of script that registers the number of impressions the text / banner link has. So at the moment a div (or iframe not sure what is the best way) loads on an external site. (not my site, but the site that links to me) I want some code that counts the download and send this information towards a page on my server where I use PHP/mysql to store the number in my database.table. The visitor should not have to click (yet) so before the click the div has loaded and that's what I would like to measure. The more I try to grasp this set up , the more I become convinced it can not be done with PHP but rather with javascript. Maybe it is possible, but I would like an easy set up. So everyone who wants to link towards my site should be able to easily copypaste some code and paste it in. This makes me think javascript is the best solultion. Not 100% sure so that's why I wanted to ask it here. So if these impressions cant be measured with php then let me know and I go on in javascript.
  3. BrainPill

    textlink/banner outside own server possible with PHP?

    This only works when a user clicks the link. But that is not what I want. I want to know the download, so I assume javascript is moreoften used. I am not really familiar with javascript. What is the easiest and least restricted / blocked way of doing it in AJAX/Javascript/jquery?
  4. BrainPill

    textlink/banner outside own server possible with PHP?

    okay but in what way can I count the number of downloads of an html element? Can that be done with HTML/PHP or is another language needed?
  5. Hello I'm facing a problem I cant really solve. I want to place a backlink in the shape of either a textlink or an img banner outside my own server. (for instance inside an iframe) I want to be able to track download impressions and referrer clicks. Can this be done with php or not? It seems technically not possible to place php on someone else's server. What would you recommend?
  6. BrainPill

    serial number and divide it over multiple database cols

    Do you know and example online about how to do this?
  7. Hi I have a question, but no real example yet. I wonder if someone can tell how to create a serial number that counts from 10000 to 100000 en divide it as a unique id over several databases and table.columns? I dont want to have an example with uniqid() , but counting up with one. I have no clue how to do this can someone please give any suggestion?
  8. BrainPill

    DELETE records before specific time

    Thanks for helping me out Ingolme
  9. BrainPill

    DELETE records before specific time

    Hi. This is the table output I have while using SELECT. Now I want to DELETE all records , except those from the last 3 hours. I tried mysql combined with now() and I tried this: SELECT * FROM `my_tab` WHERE SEC_TO_TIME(-10800) > `created_on` If someone can give the right setup how to do this in PHP/MYSQL then I would be very happy.
  10. BrainPill

    change column names without changing the type

    My goal is to make column names, tablenames and database names variable. I use escape functions and I created filters myself to avoid wrong input in the database. As an extra security measure I would like to have a few scripts to change column, table and database names , making it easier to mitigate sql attacks. You say the problems stack up quickly. But what do you try to say with that? What problems do you mean?
  11. BrainPill

    change column names without changing the type

    I see this as a problem of mysql. Is there a database system that does not have this problem?
  12. If I use the following commands: ALTER TABLE yourtab CHANGE `$colname1` `$colname2` VARCHAR(20) NOT NULL; ALTER TABLE yourtab MODIFY `$colname1` `$colname2` VARCHAR(20) NOT NULL; ALTER TABLE yourtab CHANGE COLUMN `$colname1` `$colname2` VARCHAR(20) NOT NULL; And because I use a variable inside a loop I can change an array of column names. The challenge I'm facing is that VARCHAR or other type formats are obviously obliged. is that true? Is there a possibility to change a column name and keep the type set as the original table create settings?
  13. BrainPill

    SHOW COLUMNS with prepared in php

    Hi Roddy. I think your method of querying is (almost) obsolete and I prefer the methods I described.
  14. BrainPill

    SHOW COLUMNS with prepared in php

    Using the 2nd option was a useful solution. Thanks for helping me out dsonesuk.
  15. BrainPill

    SHOW COLUMNS with prepared in php

    Its the same case as above. I have to arrays. But one array has the wrong output. Its like this: It is all assigned to key value 0. But it should be an array with: 1=> value 2=> next value 3=> next value etc. this is the script I use for it: $pr_ar = array( 0 => 'cola' , 1 => 'colb' , 2 => 'colc' , 3 => 'cold' ) ; $unique = uniqid(); $suf = substr($unique, 0, 11); foreach ($pr_ar as $pre) { // var_dump($pre); $new_col = $pre.$suf; //var_dump($new_col); $cna = array($new_col); var_dump($cna); } how to assign the values to different keys? Please help
×